for pic16, can anyone briefly describe what I should do if, for instance, when "1" on the keypad is pressed, I want to clear all the words on the lcd and display another line of words? I'd like to use an interrupt, but then Emami's sample code is something else which I've no idea what it's doing.

Views: 14

Reply to This

Replies to This Discussion

his code is polling the keypad to see if something is pressed, where he says disable interrupts, you want to set the bit, you then want to make an ISR that tests to see if the keypad was pressed, if so you want to do something

you want to see if the input from whatever port you are looking at is b'0000' (use xorwl), and hten you want to send the correct input to the lcd to clear it (I can't remember what it is, but you can take part of his code in his lcd code and turn it into a macro to do this), you then want to give his display macro a new table

yep great, need to find time to figure the whole interrupt thing out, cause he didn't give us the sample code for that T_T. thx!

RSS

© 2024   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service