internetuser2k11
Banned
Hello!
My Circuit Contains a PIC16F877A. PIN RB0 and PB1 is connected to two mom switches with pull-ups and pin RD0 is configured as output pin and is connected to a relay via uln2003a. The mikroBasic code below is not working properly. When I press sw2 the relay gets turned ON but the relay turns off after 3-4 secs. what might be the problem.
wend
My Circuit Contains a PIC16F877A. PIN RB0 and PB1 is connected to two mom switches with pull-ups and pin RD0 is configured as output pin and is connected to a relay via uln2003a. The mikroBasic code below is not working properly. When I press sw2 the relay gets turned ON but the relay turns off after 3-4 secs. what might be the problem.
Code Basic4GL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 main: TRISB = $FF TRISD = $00 PORTB = 0 PORTD = 0 while(1) if(Button(PORTB, 0, 10, 0)) then PORTD.0 = 1 end if if(Button(PORTB, 1, 10, 0)) then PORTD.0 = 0 end if
wend
Last edited by a moderator: