venthan
Junior Member level 3

dear seniors,
I want to write a program on IR sensor using NEC protocol, for that i just started to understand basic codes of interrupt. Just blink an led port when interrupt is occurred. Wrote a coding n executed in proteus too. But when try to implemented in hardware mode the interrupt part is not working. I was tried my best to solve the issue, but failed all times. Here i am attaching my source code and simulator file and photos of my hardware. Kindly suggest what went wrong exactly.
Micro controller - pic16f887
platform - mikro c.
I want to write a program on IR sensor using NEC protocol, for that i just started to understand basic codes of interrupt. Just blink an led port when interrupt is occurred. Wrote a coding n executed in proteus too. But when try to implemented in hardware mode the interrupt part is not working. I was tried my best to solve the issue, but failed all times. Here i am attaching my source code and simulator file and photos of my hardware. Kindly suggest what went wrong exactly.
Micro controller - pic16f887
platform - mikro c.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 void interrupt() { if(INTF_bit) { PORTA=0X00; delay_ms(3000); INTF_bit=0; } } void main() { ansel = 0x00; anselh = 0x00; TRISB0_bit=1; TRISA=0X00; OPTION_REG=0X40; INTCON =0X90; RBIF_bit = 0; OSCCON = 0X70; IOCB0_bit = 1; while(1) { PORTA=0xFF; } }