avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] sprintf - formated output as XXX.XXX.XXX


From: Douglas Dotson
Subject: Re: [avr-gcc-list] sprintf - formated output as XXX.XXX.XXX
Date: Thu, 6 Jan 2005 09:28:27 -0800 (PST)

I don't know of any way to do that using sprintf
of a single variable. Probably have to take the
resulting string and extract the substrings using
strstr().

Doug

--- honschu <address@hidden> wrote:

> Hi,
> 
> I have finally built up a simple and stable program
> which prints out
> some values to a LCD.
> 
> More general info:
> A FPGA measures the H-Sync and V-Sync of a
> VGA-Signal. 
> My ATmega16 is reading these values and prints them
> out.
> 
> This is the current simplified code:
> 
> unsigned char lcd_str1[20];
> sprintf( lcd_str1, "HSync %lu", value );
> lcd_puts( lcd_str1 );
> 
> the LCD prints out something like: "HSync 80000000"
> but because of the big values, I would love to get a
> more readable format 
> output as "HSync 80.000.000".
> 
> Can anyone please help me?
> 
> 
> In the normal Linux-PC libc docu "man 3 printf"
> there they talk about a
> "'f" modifier which is based on the locale
> LC_NUMERIC.
> 
> But for avrlibc I cannot find any info in "how to
> group the thousands".
> I looked for in:
>
http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#ga1
> 
> 
> regards
>  Rieker Flaik
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://www.avr1.org/mailman/listinfo/avr-gcc-list
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]