need help learning
This is the code i used to display my keytroke from my keypad to the lcd (using a keypad ecoder 74c922)it works great...
how would i store those entry in the basicstamp eeprom is that possible? how do i add that in my code
i am using a tutorial hand book that has no info on logging entry.
btn var byte
number var byte
A var byte
B var byte
C var byte
D var byte
n9600 con $4054 'baudrate
clrLCD con 12 'clear LCD
input 1 'makes pin 1-5 a input
input 2
input 3
input 4
input 5
btn =0
loop:
button 1,1,50,10,btn,0,nokey 'check pin 1 for data
'available for keypress(1 for but press 0 for no but pres)
A=in2 'put binary value into a variable
B=in3 ' "
C=in4 ' "
D=in5 ' "
serout 0, n9600, [noparse][[/noparse]bin A, bin B, bin C, bin D,cr] ' display the
binary value of the key pressed
A=1*A ' Lsb convert a binary 1 to 1 or 0 to 0
B=2*B ' convert a binary 1 to a 2 and a 0 to 0
C=4*C '· " ··· "··· "·· 1 to a 4 and a 0 to 0
D=8*D 'msb convert a binary 1 to a 8 and a 0 to 0
Number =A+B+C+D 'convert to a decimal
serout 0,n9600, [noparse][[/noparse]dec Number,cr] 'display a 0-15 on LCD
pause 2000
serout 0, n9600, [noparse][[/noparse]clrLCD] 'clear
nokey: goto loop
thanks for any help
how would i store those entry in the basicstamp eeprom is that possible? how do i add that in my code
i am using a tutorial hand book that has no info on logging entry.
btn var byte
number var byte
A var byte
B var byte
C var byte
D var byte
n9600 con $4054 'baudrate
clrLCD con 12 'clear LCD
input 1 'makes pin 1-5 a input
input 2
input 3
input 4
input 5
btn =0
loop:
button 1,1,50,10,btn,0,nokey 'check pin 1 for data
'available for keypress(1 for but press 0 for no but pres)
A=in2 'put binary value into a variable
B=in3 ' "
C=in4 ' "
D=in5 ' "
serout 0, n9600, [noparse][[/noparse]bin A, bin B, bin C, bin D,cr] ' display the
binary value of the key pressed
A=1*A ' Lsb convert a binary 1 to 1 or 0 to 0
B=2*B ' convert a binary 1 to a 2 and a 0 to 0
C=4*C '· " ··· "··· "·· 1 to a 4 and a 0 to 0
D=8*D 'msb convert a binary 1 to a 8 and a 0 to 0
Number =A+B+C+D 'convert to a decimal
serout 0,n9600, [noparse][[/noparse]dec Number,cr] 'display a 0-15 on LCD
pause 2000
serout 0, n9600, [noparse][[/noparse]clrLCD] 'clear
nokey: goto loop
thanks for any help
Comments
WRITE address,value
So, if you wanted to write the number $15 to address location $100, you would write,
WRITE $100,$15.·
There is a pitfall to using this command.· WRITE will write wherever you tell it to, even if you already have something stored in that location.· Also, the data stored during a WRITE cycle will not show up in your memory map.·
We've got lots of information to learn from, you just need to spend a bit of time reading. It will be worth it though, and your programming time will become more effective and productive.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
would be greatly appreciated
thanks
There's so much support there, it can be hard to find the piece you need.
http://www.parallax.com/html_pages/downloads/siccurriculum/documentation_sic_curriculum.asp
Scroll down to the "What's a Microcontroller" entry.· Right-click on "download", and save it somewhere on your hard disk.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Just a quick sidenote on downloading the Stamps in Class documents and curricula. As is CERTANLY appropriate, they can not be downloaded and used for commercial purposes (money making uses). Other than that use, they are just as available as any of the other excellent Stamp Manuals and Documents.
Thank you PARALLAX!
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->