Hi there,
1st: how you know it is not working? Are you debugging your code and looking for the registers on mplab? (I supposed you are using mplab)
2nd: I took a very quick view on your code but seams it not returning from wait0 call. I didn't saw a retlw instruction.
3rd: what is the fin: for? it will lock you code execution on endless loop with no instruction on that, ok?
Hi there,
1st: how you know it is not working? Are you debugging your code and looking for the registers on mplab? (I supposed you are using mplab)
2nd: I took a very quick view on your code but seams it not returning from wait0 call. I didn't saw a retlw instruction.
3rd: what is the fin: for? it will lock you code execution on endless loop with no instruction on that, ok?