problem using two switch at same time PIC16f877
Posted: 01 Oct 2015 22:38
hello friends , i am using two switches in a program with pic16f877A, one switch is used as external interrupt (at RB0/INT)and other is used as a normal switch (at RC0), my program and my proteous file is attached
(if both switches are active)
when i run this simulation, and press switch at RB0, output leds i.e. PORTD.B7 and PORTD.B1 are start blinking, instead of steady light. when i pressed again the RB0 sw, next two leds are start blinking and
(if only interrupt switch active)
all led are glow steady as desired,
(but when both switches are activated )
output leds at portd starts blinking
i dont why this happen, is any wrong in my code then please help me . i am new with pic microcontrollers. please
(if both switches are active)
when i run this simulation, and press switch at RB0, output leds i.e. PORTD.B7 and PORTD.B1 are start blinking, instead of steady light. when i pressed again the RB0 sw, next two leds are start blinking and
(if only interrupt switch active)
all led are glow steady as desired,
(but when both switches are activated )
output leds at portd starts blinking
i dont why this happen, is any wrong in my code then please help me . i am new with pic microcontrollers. please