Using the TRIS register, simply state TRISx = %11111100 assuming you have already set the portx to %00000011 that would make outputs on. You would be switching between input and hot(logic 1) output. Why a macro?
Using the TRIS register, simply state TRISx = %11111100 assuming you have already set the portx to %00000011 that would make outputs on. You would be switching between input and hot(logic 1) output. Why a macro?
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Maybe I didn't explain it right.
Lets say you had a keypad with button 0 to 10. Each button press is read as a number under normal operation. Now put a big read button on the wall and allow that button to be custom programmed to be any button combination. So I could make that big red button on the wall bee 554422 or 541874, whatever I wanted. So you would put that button in to a "programming mode" and then on the keypad, type in the sequence you want, exit programming mode and now the big red button does that sequence every time you press it. It's like using a gaming keypad on a computer. You can record a macro or keystrokes that are replayed when pressing the button you chose to use to play the macro back (in our case the big red button).
The only way I see to do this with little code space is getting creative with arrays but I have nearly zero experience with arrays.
I'm a little weak with arrays too, but a keypad reader will require one. What you can do is have a subroutine with the master code and use the "big red button" control it. Mister_e did a keypad routine as an include, but you'll have to roll your own array to store the results.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks