NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Basic Electronics » Debug with lcd

November 13, 2009
by Farmerjoecoledge
Farmerjoecoledge's Avatar

I'm missing something really simple here at least by the way "the lcd will display debug data in hexidecimal format." is explained. That's it, i can't find anything more about it. As far as i can tell there should be a jumper wire added to the lcd from the mcu. And then it's just a matter of the sequence. Like when is this data supposed to show? During flash or after?

And Mike, i found a obdii.c file and just need a short explanation of how it works. fjc

November 14, 2009
by Farmerjoecoledge
Farmerjoecoledge's Avatar

I looked up obdii.c in the search, smart hey? Now, is there a simple way of explaining if the protocol can be adapted for hobby sensors or turbines?

November 15, 2009
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Farmerjoe,

I'm not sure what you mean by the "lcd will display debug data in hexidecimal format." Where are you referring to? Sometimes it is useful to print debug data to the LCD, and many times when you wish to print the value of a register for example, it is helpful to show the data in hex format, which you can then easily turn into binary.

The obdii protocol is implemented on cars. It is a way to talk to a cars onboard computer. It is not really applicable to other things. If you were looking ot instrument a different system you could probably base it off of something like the obdii protocol, but most likely you would just develop something to more specifically fit what you were doing.

Humberto

November 15, 2009
by Farmerjoecoledge
Farmerjoecoledge's Avatar

Hi Humberto,

This is a quote of Mikes. I've checked out debugWIRE and the one wire interface is impressive but does it magicly connect.Maybe i'm not lookin in the right place for these things but really,where is it hooked? to the lcd but what pin?

Mike's quote: In my experience, I've found that I'm able to get the debugging information I need through a combination of the LCD screen, serial port, and LEDs / measuring voltages directly. The ATmega168 chip supports something called a "debugWIRE On-chip Debugging System" from this tread http://www.nerdkits.com/forum/thread/39/

So the data in hex format is going to show up on the lcd, right? all i need to know is the process, symatic.

November 16, 2009
by hevans
(NerdKits Staff)

hevans's Avatar

Mike was referring to the (debugWIRE On-chip Debugging System)[http://www.atmel.com/dyn/resources/prod_documents/doc2562.pdf] which is a feature of the chip that requires some extra hardware to use. The device is able to get information about what is happening inside the chip and show that in the AVR Studio IDE. So you would not only need to get this piece of hardware, you would also need AVR Stuido installed on your computer. For small hobbyist projects it is definitely a good idea to just debug using print statements to the LCD, or to the serial port to be read from the computer.

A lot of the interesting learning about electronics happens when you are chasing down your own bugs =)

Humberto

November 16, 2009
by Farmerjoecoledge
Farmerjoecoledge's Avatar

Thank's Humberto, So it's the print statments, good enough, I seen the AVR Studio 4 part but when these guy's are talking "lcd is also good for displaying debug data" I thought i was missing something easy. So i'm off to the print statement department, it'll keep me busy while i'm waiting for my new programmer, thx.

farmerjoe

Post a Reply

Please log in to post a reply.

Did you know that SPDT stands for "Single Pole, Double Throw"? Learn more...