NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Clock time / keyboard / LED Marquee combined
December 10, 2009 by Guss |
Hi folks, I am trying to make a new twist on the LED Marquee. Using two MCUs I want to use one to accept input from the keyboard, and send it to the second for output on the marquee. (marquee build to come later) I have the first MCU running the time and the temperature. I use the LCD as the screen for the keyboard/clock. When I introduce the modules for the keyboard input, the clock no longer functions. Before: clock and temperature display properly After: clock counts to one or two seconds, LCD goes blank, count starts over at 1 second. The question (finally): Are the various interrupts doing too much? I disabled the clock calculations, and now I can use the keyboard for input, and the temp stays displayed without flashing. This is the modified interrupt code to calculate the time and read the temp:
This the while loop from main() which outputs to the lcd:
I have not modified the keyboard input module yet, and I disabled all output to the UART. (this will be enabled to pass data to the 2nd MCU for the marquee.) Any help appreciated. Guss |
---|---|
December 14, 2009 by hevans (NerdKits Staff) |
Hi Gus, It's hard for me to see what the flow of your program is without the full source code. The behaviour you are describing where LCD goes blank and time starts from 0 again, suggests that the chip is resetting due to a low battery. Perhaps your battery has enough juice to run the LCD/chip, but when it tried to run the keyboard too it just reset. Also make sure your keyboard is wired up correctly, and not causing a short. If you put up some pictures of your setup, as well as possibly linking to the full source, I'm sure we can help your project move along. Humberto |
Please log in to post a reply.
Did you know that you can connect a pushbutton to a microcontroller with only one wire? Learn more...
|