Hi guys,
I am having a little problem with the WKPT Interrupt. It is stopping the program just fine but it dosnt do the handler routine or resume. I am sure Its something stupid that I dont know how to do. The BAP Manual is missing the info on pmr5, iegr2, and pucr5 but I found it in another post after a few hours of frustration. There must be somthing else I am missing.
Can someone take a look and give me some pointers?
[code]
enablehservo2
enablehserial
sethserial h9600,h8databits,hnoparity,h1stopbits
oninterrupt wkpint_0, inthandler
PMR5.bit0 = 1 ;enables pin as WKP interrupt instead of normal I/O
IEGR2.bit0 = 0 ;0 = Pin will interrupt on a falling edge, 1 to interrupt on a rising edge.
PUCR5.bit0 = 1 ;turn on the internal pull up resistor
enable wkpint_0
enable ;
main
hservo [p8\0,p9\0]
pause 2000
hservo [p8\16000\150,p9\16000\150]
hservowait [p8]
hservo [p8\0\150,p9\0\150]
hservowait [p8]
hservo [p8-16000\150,p9-16000\150]
hservowait [p8]
hservo [p8\0\150,p9\0\150]
hservowait [p8]
hserout “no interrupt”,13,13]
goto main
inthandler
hserout “interrupt”,13,13]
pause 2000
resume[/code]
Smitty