it including in picture that i post (training Kit) use socket 230VAC to DC i think it 12VDC because based on circuit i only see Vpp/Vcc/Vdd is 12v or 5v...
but i just connect jumper from PIC to ZIF socket with exact pin number... i got another problem when i do it on training kit it work but when i do it on protoboard/breadboard it not working. so i make simulation on Proteus ISIS and it show not working also...
Code:
#define LED_DIR TRISB7_bit
#define SW1_DIR TRISB0_bit
#define SW1_PIN RB0
#define LED_PIN RB7
void main() {
while(1) // continually
{
LED_DIR = 0;
SW1_DIR = 1;
if (SW1_PIN) // if the switch is at logic one
{
LED_DIR = 0; // turn the LED off
}
else
{
LED_DIR = 1; // otherwise, flash LED one time
delay_ms(200);
LED_DIR = 0;
delay_ms(200);
}
}
}
the high voltage error the one that i want to test program PIC using training kit but just use jumper from the needed pin(PIC) to ZIF socket(TrainingKIt)...
the new post is new problem... ya if push switch it will give 0 cause go to ground maybe... if i press the switch it will on the LED...
the high voltage error the one that i want to test program PIC using training kit but just use jumper from the needed pin(PIC) to ZIF socket(TrainingKIt)...
the new post is new problem... ya if push switch it will give 0 cause go to ground maybe... if i press the switch it will on the LED...
ya i already loaded the code into PIC here with simulation log :
if i put LED into pin RB0 which i code for SW1, and SW1 to pin RB7 which is code for LED... it work but got error message with logic contention detected... when i change and fix the error by put back the input and output pin to exact location, i cant even on when push the button...
ya i already loaded the code into PIC here with simulation log : View attachment 72183
if i put LED into pin RB0 which i code for SW1, and SW1 to pin RB7 which is code for LED... it work but got error message with logic contention detected... when i change and fix the error by put back the input and output pin to exact location, i cant even on when push the button...
if u asking for that high voltage error, i do not have it... the training kit is in lab, i only can go there on Tuesday and Thursday... that why i want build programmer for myself...
if from the circuit that newly i post it do not show any error but not working...
this one will stop the blinking LED, if LED on=Off, if LED off=On but only as long the Push button is pressed... i want to make LED not On or even not blinking when receive voltage(initial condition), then i hit push button and release the LED will On, i hit again and release the LED will Off...
for the high voltage error i will post the screenshot when i able to catch it in Lab... I need postpone it because many assignment...