Strange stamp reset bug
I've got a weird bug I can't figure out and I'd like some advice.
Using the schematics in Nuts and Volts Column #22 I built a matrix keypad using
pushbuttons.
I followed the schematic exactly and included·220 ohm "zap" resistors (which I assume are
for static protection) and 10k pullup resistors.
I put the whole thing on a header that plugs right into the BOE's pins P7-P0 slots... plus
a wire hanging off that plugs into VDD.
I used a slightly simplified version of the code provided in the column and the keypad works
absolutely perfectly. The keys are read and translated exactly as expected and I can read
in the keys and take action based on what is entered.
The problem is after every 2 key presses, the stamp resets.
I've tried using both fresh AAs in the BOE-bot battery pack, and a 9volt with no difference.
I've got both a second BS2 (OEM) connected and a serial LCD on the same BOE but no other
power drain. Not even a single LED.
I tried disconnecting the BOE and LCD, and the same still happens.
Its got to be in my matrix keypad somewhere but I'll be danged if I can figure out where. I
checked every solder joint and there are no bridges anywhere.
Any idea what can be causing the stamp to reset in this case?
Using the schematics in Nuts and Volts Column #22 I built a matrix keypad using
pushbuttons.
I followed the schematic exactly and included·220 ohm "zap" resistors (which I assume are
for static protection) and 10k pullup resistors.
I put the whole thing on a header that plugs right into the BOE's pins P7-P0 slots... plus
a wire hanging off that plugs into VDD.
I used a slightly simplified version of the code provided in the column and the keypad works
absolutely perfectly. The keys are read and translated exactly as expected and I can read
in the keys and take action based on what is entered.
The problem is after every 2 key presses, the stamp resets.
I've tried using both fresh AAs in the BOE-bot battery pack, and a 9volt with no difference.
I've got both a second BS2 (OEM) connected and a serial LCD on the same BOE but no other
power drain. Not even a single LED.
I tried disconnecting the BOE and LCD, and the same still happens.
Its got to be in my matrix keypad somewhere but I'll be danged if I can figure out where. I
checked every solder joint and there are no bridges anywhere.
Any idea what can be causing the stamp to reset in this case?
Comments
Here's the code I'm using on the master stamp... Please excuse how messy it is.
I basically just copied and pasted the keypad code and used a simple serial interface from another Nuts and Volts column to get two stamps to communicate. At the moment the communication is one-way so I can safely disable the second stamp for debugging.
Your absolutely right. I just dug around in the PBASIC syntax guide and I realize I've been under the incorrect assumption
that IF... THEN <subroutine> does a GOSUB, instead it does a GOTO. That seems like such a subtle difference... but seems
to be an important one.
Thanks Mike.