Button
hi,
I have a BS2Pe and using push-buttons I want the microcontroller to log the entry
This is how I wanted to monitor each button.
Nomally if I dont press any button it should keep looping forever right?... but it doesnt. for some reason some of the buttons think they are pressed and execute the concequent code
I'm starting to doubt that maybe this is not the best way of using the BUTTON command?
any ideas?
I have a BS2Pe and using push-buttons I want the microcontroller to log the entry
This is how I wanted to monitor each button.
Nomally if I dont press any button it should keep looping forever right?... but it doesnt. for some reason some of the buttons think they are pressed and execute the concequent code
I'm starting to doubt that maybe this is not the best way of using the BUTTON command?
any ideas?
check0:
offset = 0
BUTTON bu0, 0, 255, 20, b0ws, 0, check1
offset = 0
RETURN
check1:
BUTTON bu1, 0, 255, 20, b1ws, 0, check2
offset = 1
RETURN
check2:
BUTTON bu2, 0, 255, 20, b2ws, 0, check3
offset = 2
RETURN
check3:
BUTTON bu3, 0, 255, 20, b3ws, 0, check4
offset = 3
RETURN
check4:
BUTTON bu4, 0, 255, 20, b4ws, 0, check5
offset = 4
RETURN
check5:
BUTTON bu5, 0, 255, 20, b5ws, 0, check6
offset = 5
RETURN
check6:
BUTTON bu6, 0, 255, 20, b6ws, 0, check7
offset = 6
RETURN
check7:
BUTTON bu7, 0, 255, 20, b7ws, 0, check8
offset = 7
RETURN
check8:
BUTTON bu8, 0, 255, 20, b8ws, 0, check9
offset = 8
RETURN
check9:
BUTTON bu9, 0, 255, 20, b9ws, 0, check10
offset = 9
RETURN
check10:
BUTTON bu_ok, 0, 255, 20, b10ws, 0, check11
offset = 10
isSer = isSer + 1
IF(isSer = 3) THEN
GOTO SerialControl
ELSE
GOTO here
ENDIF
RETURN
check11:
BUTTON bu_clr, 0, 255, 20, b11ws, 0, check12
GOTO Main
offset = 11
RETURN
check12:
BUTTON bu_can, 0, 255, 20, b12ws, 0, check0
offset = 12
GOTO Main
RETURN

Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thank you for the quick reply
Here is my complete code.
Basically the code takes in the entries from the user (8digits) and stores them to EEPROM
my other concern is that my 8-digits entries are 32 bits each which means I wont be able to store that much in my EEPROM
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
My other question is how can I add more memory in odrer to be able to store more entries on the EEPROM?
Should I use registers? or uMMC controllers?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
One more little question: do you think this is a good algorithm to log entries? my concern was that maybe my algorithm uses too much space.
Thank you for your help
·· I did not analyze how you were storing data.· Just the original issue regarding the inputs.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax