[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?
From: |
Vincent Trouilliez |
Subject: |
Re: [avr-gcc-list] Initilizing complex const arrays : syntax ? |
Date: |
Tue, 20 Sep 2005 05:15:42 +0200 |
> Wow, superb. But, I must first find the bug in lcd_putc() :-/
> when I use _delay_ms(xxx) it is accurate, but in lcd_putc() I use
> _delay_us() of course, let's see what it's doing exactly.. :-/
void lcd_send_byte(unsigned char data, unsigned char type)
{
LCD_PORT = type; //select register or data
//send high nibble
lcd_send_nibble(data);
//send low nibble
lcd_send_nibble(data << 4);
PORTD = 0xFF; //toggle all port pins for scope to see
_delay_us(45); //give LCD time to execute the command...
PORTD = 0x00;
}
Amazing how easily you can debug programs with just toggling a port pin,
and your trusty old scope... The _delay_us(45) indeed lasts 1,300us not
45 !!!
_delay_ms(x) works perfectly, though. I run on the on-chip 1MHz
oscillator and set my define accordingly in my lcd module :
lcd.h
-----
#define F_CPU 1000000UL
#include <avr/io.h>
#include <avr/delay.h>
No idea what's wrong... but sure would kill my mom to find out, as that
would make printing on the LCD literally 20 times faster !!!
Any idea anyone ??
--
Vince
- RE: [avr-gcc-list] OT Generic C question, (continued)
- RE: [avr-gcc-list] OT Generic C question, Mike Murphree, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, Alexandru Csete, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, Mike Murphree, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, Wolfgang Wegner, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, Anton Erasmus, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, Nils Springob, 2005/09/20
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Kelly, 2005/09/19
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/19
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Kelly, 2005/09/19
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/19
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?,
Vincent Trouilliez <=
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/20
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Kelly, 2005/09/20
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/20
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Richard Urwin, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Christopher G. Morlier, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, David Kelly, 2005/09/18
- Re: [avr-gcc-list] Initilizing complex const arrays : syntax ?, Vincent Trouilliez, 2005/09/18