what am I doing wrong? probably something simple/stupid
Bobb Fwed
Posts: 1,119
I have a simple program that checks the temperature and turns on a relay based on the value.
i am having problems with an interface of buttons. Between temperature checks the software watches four buttons. It checks them more than 150 times each second, but it only seems to register one button press per second. What am I doing wrong. I know it is something simple, and a few extra pairs of eyes will help.
I am new to the oLED, is it just that taking so long to return an ACK before the program can move on?
Attached is the whole project. oled_program.spin is the main file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
i am having problems with an interface of buttons. Between temperature checks the software watches four buttons. It checks them more than 150 times each second, but it only seems to register one button press per second. What am I doing wrong. I know it is something simple, and a few extra pairs of eyes will help.
I am new to the oLED, is it just that taking so long to return an ACK before the program can move on?
Attached is the whole project. oled_program.spin is the main file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
zip
63K
Comments
One advantage of the propeller is it has 8 processors. You can assign one processor to *just* look at the buttons full time!
So might want to think about doing that.
Then another thing which is helpful is to "see" what is going on. Perhaps connect LED's and turn them on/off with each button press to verify the program is "seeing" the button press.
A typical problem is the processor is busy doing something else and is not looking at the button the moment you press it (can only do one thing at a time)...
I have been using the debuging method to test if the prop is seeing the buttons, it is, but once it sees it, it appears to stop looking until the next cycle/second. The only obvious thing would be, I have a simple mistake in the timing or logic, or the driver is just taking that long to return back to the loop. That is something I can test tomorrow, to see how long the driver takes to return once called.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!