[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Problem to control S1D13305 (SED1335-Epson Controller
Re: [avr-gcc-list] Problem to control S1D13305 (SED1335-Epson Controller) with using ATmega32
Fri, 4 Jul 2008 06:05:17 -0600
I don't know much about the SED1335, but I can give some advice. See my
On Friday 04 July 2008, Sach wrote:
> I am trying to control S1D13305 (SED1335-Epson Controller) based Graphic
> LCD with using AVR ATmega32 microcontroller.
> I have written the demo code in c language for it in AVRStudio4. The
> problem is i am not getting any output on LCD. I have read the datasheet of
> SED1335 many times but i can not understand in details how to initialize
> LCD, about delay of LCD, contrast port values etc.
> Please help me with this.
> Sachin Rathod,
> void LcdInit(void)
> CtrlPort |= (RD|WR);
> CtrlPort &= (~CS)|(~RST)|(~FS1);
This won't work. It should be
CtrlPort &= ~(CS|RST|FS1);
> CtrlPort |= RST;
This Delay() funtion will be entirely optimized out, and won't even get
called. You can fix it by using a volatile counter as shown below, or use
the avr-libc's delay() function, which is better.
> void Delay(unsigned int counter)
volatile cnt = counter;
// change counter to cnt below:
> counter = counter - 1;