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.

Support Forum » Ubuntu LCD problems

January 21, 2012
by cb12
cb12's Avatar

I have been working with my NerdKit for the first time today. I am running Ubuntu 11.10 and have installed avrdude, gcc-avr, and avr-libc from Synaptic Package Manager.

Everything went well until I tried to compile and load the initialload program (the LCD displayed properly when running the preloaded program, voltages read +4.92 at the rail, battery read +8.something-close-to-nine). First, I had to edit the make file to sleep, etc. as others have done in order for it to write the code to the MCU (it was reading the MCU, erasing, and everything else up to attempting to write to the MCU w/o problem). I thought I was out of the woods when I finally got avrdude to compile properly.

Now, however, I have another problem. The only output I am getting on the LCD is "is alive!," and it is being printed on the first line of the LCD rather than the fourth. I tried removing the -jtext command and changing the optimization from "-Os" to "-O0" which has worked from some others. Unfortunately, it did not work for me. Does anyone have any other suggestions for getting the code to write and run properly? Thanks.

January 22, 2012
by hevans
(NerdKits Staff)

hevans's Avatar

Well that is quite odd. Was the LCD working fine with the original preloaded message?

Another thing to try is to go in and delete all the .o and .hex files from the libnerdkits directory, as well as from your project directory. Then run make again with the -O0 option. This will make sure the LCD code is also recompiled.

Humberto

January 22, 2012
by cb12
cb12's Avatar

Thanks, that worked! When I changed the optimization before, I had removed the .o files from the libnerdkits directory, but I did not remove the .hex and .o file from initialload. This seems to have done the trick. To answer your question, yes the LCD was working fine with the original preloaded message. I only had problems when I started trying to compile and load initialload onto the MCU. It seems to be working great now though. Thanks alot! BTW, does this mean I should change the optimization from here on out? Also, should the .o and .hex files be okay now?

January 23, 2012
by hevans
(NerdKits Staff)

hevans's Avatar

Hi cb12,

Unless you change the source for lcd.c make should not try to recompile the library, so it should be good for you from here on out. I think the version of the compiler you got was just being overly zealous with its optimizations. You can certainly try -O1, or -02 and see if those still work.

Humberto

April 06, 2012
by jaschon
jaschon's Avatar

I'm having the same problem (but I'm Xubuntu). The LCD is only displaying "is alive" on the first line. I deleted all the .o and .hex files in the project and libnerdkits and it is still giving me the same result.

April 06, 2012
by jaschon
jaschon's Avatar

it looks like this -->

is alive

April 06, 2012
by jaschon
jaschon's Avatar

Nevermind. Just fixed it. I ended up: 1. removing all .hex and .o files in the project's and libnerdkit's folders 2. changing "-Os" to "-O0" on the first line of the project's and libnerdkits' makefile 3. removed "-j .text" in the project's makefile.

December 05, 2012
by JohnDennis
JohnDennis's Avatar

Just wanted to thank jaschon for the help. I am running Ubuntu 12.04LTS (fully updated to date) and had exactly the same problem. Following the steps he posted, it worked for me too -- on the first try! Further note: I ran 'make' in the terminal on the Unity desktop, and even though I was already logged in, I had to use the command 'sudo make' and log in again in the terminal to run 'make' without getting a 'permission denied' message. Hope this helps someone out. Thanks again jaschon!

December 22, 2012
by keith712
keith712's Avatar

thank you all... i ran into this problem starting about a week ago... i think this forum may have shown up in one of my searches but since i'm using a mac to write code and download i didn't even look here...

i needed to both change '-Os' to '-O0' and cut '-j .text' in my makefiles to fix my LCD display problems

thanks again... k

Post a Reply

Please log in to post a reply.

Did you know that microcontrollers have two different kinds of memory, program space (flash) and SRAM? Learn more...