Dragon Tamer
Member
I have been trying to program my PIC18F242 for a while now and I am stuck on a few important details. I am using ASM to program my PIC but if you can help me understatnd what is going on it would be greatly appreciated.
First; I have to interface a keypad with my PIC, I have read Nigels tutorial and it was a big help. I plan on using a HEX key pad but it instead of having it labeled A-F it will be control commands such as MENU, ENTER and what not. I am very confused on how to get the main code to alter it's program path based on the value returned. The best thing I can think of right now is to have the code run something like:
Is there a better way to do this?
I do have some more issues but I feel like I am making progress with them so I will post them here when I feel I can't make any more progress.
First; I have to interface a keypad with my PIC, I have read Nigels tutorial and it was a big help. I plan on using a HEX key pad but it instead of having it labeled A-F it will be control commands such as MENU, ENTER and what not. I am very confused on how to get the main code to alter it's program path based on the value returned. The best thing I can think of right now is to have the code run something like:
Code:
cpfsgt MENU ;this would be the value for the menu command
goto $+2
cpfslt MENU
goto $+2
;command for adjusting the menu pointer
Is there a better way to do this?
I do have some more issues but I feel like I am making progress with them so I will post them here when I feel I can't make any more progress.