INTERRUPT.hightech c for PIC 16f877a

Status
Not open for further replies.

p80nf10

Newbie level 4
Joined
Jan 4, 2010
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,311
INTERRUPT.hightech c

i used 16f877a pic.when a rising edge of signal is aplied to pin INT0(RB0),the LED (RB5)will toggle,toggle led again theINT0 pluse must be brought back LOW and then forced HIGH to create arising edge to activate interrupt .how do this program please help me.i used c version complier is mplab icd3
 

Re: INTERRUPT.hightech c

You need to put a pull down resistor to ground between the switch and pin RB0 so the line is pulled down when the switch is open and pulled high when the switch is closed.
It is also advisable to filter the line with a series resistor and a cap to ground to debounce the switch.
I suggest a 100nF cap to ground close to RB0. Then a series resistor of 1K to the pull down resistor. Then the pull down resistor of 47K to ground, then the switch to supply.
For the code, if you have Hi-Tech, look in the samples directory for the interrupt demo.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…