Finally had the parts/time to put together the LCD board today.
I have a 20x4, so I know I'll have to work the code over pretty good, as I'd like to display everything on the same screen refresh, not two toggled screens...
anyhow... so far, using the code meant for the 16X2, everything looks good except for when the screen is supposed to switch from "Name" to "Title" - it happens in a flash, so I never actually see the "Title" screen (except for a noticable blip)
Also, the side-to-side scroll is very fast.
I've fiddled with the DELAY values in main.c , even set them to ridiculously high numbers and it doesn't seem to make a difference. Maybe something is wrong with my clock (crystal) or that particular circuit?
LCD screen updates are way too fast [FIXED]
LCD screen updates are way too fast [FIXED]
Last edited by akula169 on Sun Feb 21, 2010 11:38 am, edited 1 time in total.
Re: LCD screen updates are way too fast
Ok - so I got a 16x2 today and tried it. Same issues.
I also decided to disconnect the soldered crystal circuit on my proto board and try with another set of crystal and caps on breadboard - still the same problem.
The long Title scrolling happens so fast I can barely see it, and I can see the station Name flash under it every second or so. Then after about 7-10 seconds the station Name will display for a while. Then back to the same loop.
I'm having a hard time figuring out where the issue is... hardware or software?
I also decided to disconnect the soldered crystal circuit on my proto board and try with another set of crystal and caps on breadboard - still the same problem.
The long Title scrolling happens so fast I can barely see it, and I can see the station Name flash under it every second or so. Then after about 7-10 seconds the station Name will display for a while. Then back to the same loop.
I'm having a hard time figuring out where the issue is... hardware or software?
Re: LCD screen updates are way too fast
OK, so I'm closer...
I flashed your pre-compiled hex file and it works as expected.
Anything that I compile makes for f-ed up code who's timing is all off...
So maybe some avr-gcc switches need to be custom set for my environment?
I flashed your pre-compiled hex file and it works as expected.
Anything that I compile makes for f-ed up code who's timing is all off...
So maybe some avr-gcc switches need to be custom set for my environment?
Re: LCD screen updates are way too fast [FIXED]
OK - so instead of a linux host, I used a Mac to compile the code...
NOW WORKING!
Sorry for my thinking out loud here, but maybe it'll help someone with similar problems.
NOW WORKING!
Sorry for my thinking out loud here, but maybe it'll help someone with similar problems.
Re: LCD screen updates are way too fast [FIXED]
Oh, that is very interesting!
I wonder what is going on... I'll have to look into this. What version of gcc-avr are you using on both platforms?
I wonder what is going on... I'll have to look into this. What version of gcc-avr are you using on both platforms?
Jeff Keyzer
http://mightyohm.com
http://mightyohm.com
Re: LCD screen updates are way too fast [FIXED]
on the MacPro (works):
On the Fedora box (version 8 - may be the issue):
Code: Select all
macpro:static bryan$ avr-gcc -v
Using built-in specs.
Target: avr
Configured with: ../configure --prefix=/usr/local/CrossPack-AVR-20100115 --disable-dependency-tracking --disable-nls --disable-werror --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2
Thread model: single
gcc version 4.3.3 (GCC)
Code: Select all
[akula@leia ~]$ avr-gcc -v
Using built-in specs.
Target: avr
Configured with: ../gcc-4.1.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --target=avr --enable-languages=c,c++ --disable-nls --disable-libssp --with-system-zlib --enable-version-specific-runtime-libs
Thread model: single
gcc version 4.1.2 (Fedora 4.1.2-5.fc8)
Re: LCD screen updates are way too fast [FIXED]
Grumble... I will have to play with this more. Thanks for the info.
I am involved with a project to write a book about AVR and I know this is going to come up at some point since we want to support all 3 major platforms, Win, OSX, Ubuntu/Linux...
I am involved with a project to write a book about AVR and I know this is going to come up at some point since we want to support all 3 major platforms, Win, OSX, Ubuntu/Linux...
Jeff Keyzer
http://mightyohm.com
http://mightyohm.com