[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: |
Mon, 19 Sep 2005 17:46:52 +0200 |
On Mon, 2005-09-19 at 07:33 -0500, David Kelly wrote:
> Your putchar() (or whatever) writes to an LCD? So how long does it
> take to latch a character into the LCD?
Yep I print to standard text LCD module (4x20), it takes about 45us for
the module to digest a character. 4 characters to send, that 0.2ms
maaaaximum. So they the LCD really can't be held responsible for the
6ms ;-)
I guess most of the time is used doing divisions to convert the byte in
digits. But still, that would be 5,000++ cycles just to divide a single
byte by 100 then 10, sound a bit dear... there must be space for further
improvement ! :-)
> Another way I thought to write the code without utoa()
in your first two functions you used utoi, which wasn't recognized by
the gcc, so I had to look in the avr-libc PDF to search for an
equivalent and picked up itoa instead. But maybe that wasn't the
best(fastest) choice ?
> was something like this (no I haven't tried this one either):
>
> char buffer[4];
> uint8_t i;
> strncpy_P( buffer, PGM_P("000"), 3 );
Ah, it contains the same line that makes the compiler fail on your
another_dot_two() :
strncpy_P( buffer, PGM_P("000"), 3 );
It says :
ui.c:65: error: parse error before "const"
make: *** [ui.o] Error 1
--
Vince
- Re: [avr-gcc-list] OT Generic C question, (continued)
- Re: [avr-gcc-list] OT Generic C question, Christopher X. Candreva, 2005/09/20
- Re: [avr-gcc-list] OT Generic C question, Brian Sidebotham, 2005/09/20
- RE: [avr-gcc-list] OT Generic C question, Ron, 2005/09/20
- 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 <=
- 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, 2005/09/19
- 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