NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Support Forum » tempsensor blank LCD
July 10, 2011 by BlueFusion |
I just got my NerdKit Friday and set it up that night. It was a pain to get the avr-gcc libraries working correctly on Gentoo, but I finally get them working (seemingly) correctly. My first problem that I am experiencing is that while doing the tempsensor_edu project, my LCD remains blank and nothing is output to serial. This is after removing the battery and unplugging the USB cable, switching to run mode, and plugging battery then USB cable in. Just blank, nothing doing. I tried the tempsensor sample program and the same thing - no output to LCD or serial. I just can not get it to do anything. The connections are all made just as in the picture and description as far as I can tell but just to be safe, I attached a picture. It does work fine with the initload program. I even altered the code a bit to display a personalized message without issue. I did have to remove the "-j .text" from the Makefile to get it to display all of the LCD lines. FWIW, I do get the "ba" boot code from the MCU over serial, but nothing thereafter. Absolutely nothing. I tried 3 different batteries - the one in the kit, and 2 from 2 different brand new packs of 9V batteries. |
---|---|
July 10, 2011 by Rick_S |
Try the non _edu version of the tempsensor project and see if it compiles and runs. If it does, then you missed something when you were writing your program. Rick |
July 10, 2011 by BlueFusion |
Like I said above, I tried the tempsensor example code (non _edu one) and it had the same exact result. I get no output (except the boot code) via serial or on the LCD. |
July 10, 2011 by BlueFusion |
By the way, here is a picture of the setup: http://richgannon.net/2011-07-09_12-22-02_158.jpg |
July 10, 2011 by Rick_S |
Sorry, missed that. I don't see anything wrong with your setup (other than I can't see the contrast resistor... but I assume it's there). I'm not a Linux person so I don't know exactly what you see when compiling... but do you see the process when you type make? Does avrdude do it's thing and connect and verify? I'm assuming you modified the tempsensor makefile since you stated you modified the initiallad makefile.... Maybe a Linux person will step in and help out. Rick |
July 10, 2011 by BlueFusion |
Here is the output when making and writing:
|
July 10, 2011 by Rick_S |
That's odd, it appears to compile and send the file over. I really don't know what is going on. It's probably something staring me right in the face but I sure don't see it. Hopefully another set of eyes will pop in here and be able to help. Rick |
July 10, 2011 by BlueFusion |
Rick, Can you compile the NK provided tempsensor code and send me the .hex file? I will try to write that to the MCU. If it works, then it is simply an issue with the compilation which I can focus on. My email is gannonr -at- bgsu.edu Thanks |
July 10, 2011 by mongo |
I didn't see the 1K resistor for the LCD control. Is it there but hiding behind the regulator? Without that, there won't be much to see on the screen. |
July 10, 2011 by BlueFusion |
Yes, the 1000 Ohm resistor is there and the LCD works, just not with the tempsensor program. |
July 10, 2011 by hevans (NerdKits Staff) |
Just a thought. Are you sure that is an LM34, and not a 2n7000. It still should not fail in the way you are describing, but worth double checking. Does anything happen on the LCD if you remove the LM34? Humberto |
July 10, 2011 by BlueFusion |
It is the LM34 (I checked several times as I thought that would be a stupid mistake to make before posting). But a member did email me the compiled hex code which I uploaded. It works!!! I have the output as expected to LCD. Now what I need to figure out is the output to serial. What baud rate and settings do I need? I don't recall reading it in the PDF manual. This is what it looks like: "ba.....A¢.....A¢.....A¢.....A¢" and so on |
July 10, 2011 by BlueFusion |
I guess I should also ask what I should look for in the libraries and avr-gcc that would cause the code to not compile correctly? I have Gentoo Linux on all of my computers so Windows not possible to test. |
July 10, 2011 by Rick_S |
115200 bps N81 |
July 11, 2011 by BlueFusion |
Thanks. That's what I have set in minicom, but it still just shows me: A¢.....A¢.....A¢.....A¢..... over and over. No numbers or words. Also, anybody have any idea why it would compile on my laptop but the MCU not do anything with the code compiled on my laptop? |
July 11, 2011 by BlueFusion |
Ahah! I got the serialpart. The baud had to be increased to 230400 8N1. Now it works great. But I can not find any reason for the program to not compile and work correctly when compiled on my laptop. Anyone have any suggestions or ideas? |
July 11, 2011 by BlueFusion |
Made a little bit of progress on the tempsensor problem. I downgraded from GCC 4.4.5 to GCC 3.4.6 and changed the Mafefile in libnerdkits/ to use -O0 instead of -Os optimization options. The initialload program still works as expected. Once tempsensor is loaded, instead of getting a blank screen, my LCD flashes "2601" on line 1 and nothing is output via serial. It does not appear to be rebooting, as "ba" is only sent to serial when I pull the battery and reconnect it. I'm really in need of some ideas here.
|
July 12, 2011 by hevans (NerdKits Staff) |
Hi BlueFusion, This seems to me like an issue with avr-libc. Did install these packages from source, or did you use some special Gentoo thing. Im not too familiar with Gentoo's package managers but the internet seems to suggest you use something called crossdev http://wiki.hacdc.org/index.php/Installing_AVR_Toolchain. Humberto |
Please log in to post a reply.
Did you know that many systems in nature can be described by a first order response? Learn more...
|