|
From: | Paulo Marques |
Subject: | Re: [avr-gcc-list] Problem to control S1D13305 (SED1335-Epson Controller) with using ATmega32 |
Date: | Fri, 04 Jul 2008 12:39:26 +0100 |
User-agent: | Thunderbird 1.5.0.14 (X11/20071210) |
Sach wrote:
hi, I am trying to control S1D13305 (SED1335-Epson Controller) based Graphic LCD with using AVR ATmega32 microcontroller. [...] void Delay(unsigned int counter) { while(counter) { counter = counter - 1; } }
I didn't check the whole code, but at least this part is bad as the compiler is free to optimize this function away completely.
Place a: #define F_CPU 8000000UL on the top of your code and use the delay macros in "util/delay.h". I hope this helps, -- Paulo Marques Software Development Department - Grupo PIE, S.A. Phone: +351 252 290600, Fax: +351 252 290601 Web: www.grupopie.com
[Prev in Thread] | Current Thread | [Next in Thread] |