Hi,
i read the ON INTERRUPT section on PBP book and still trying to understand it.
if i want to implement an interrupt command on my codes, should i declare the interrupt in the main loop?
below is the coding for type 1 :
let say:
anything wrong with this codes?i need to write it in the main loop?Code:ON INTERRUPT GoTo faultsignal INTCON = %10010000 'Enable RB0 INTERRUPT OPTION_REG.6 = 0 'Interrupt on rising edge of RB0/INT pin Disable 'Disable interrupts in handler faultsignal: CCP1CON = %00000000 'off ccp1 INTCON.1 = 0 'Clear INTERRUPT flag Resume 'Return TO main program Enable 'Enable interrupts after handler
did really pin rb0 can detect changes from 5v to 0v using ONLY this codes?




Bookmarks