|
|
View previous topic :: View next topic |
Author |
Message |
Tommy Liu Guest
|
printf(), lcd_putc() and ROM space |
Posted: Mon Jun 23, 2003 1:18 am |
|
|
Hi,
The following:
printf(lcd_putc ,"\fMessage\n");
can be replaced by the following:
lcd_putc("\fMessage\n");
to save ROM space.
Can the following statements be represented by lcd_putc() or another format to save ROM space?
printf(lcd_putc,"\%4.3fV(ADC=\%4lu)", volt, ADC_value);
printf(lcd_putc,"\fFAILED at pos=\%u\n", pos);
Thanks in advance.
RF
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515462 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: printf(), lcd_putc() and ROM space |
Posted: Mon Jun 23, 2003 5:39 pm |
|
|
:=Can the following statements be represented by lcd_putc() or another format to save ROM space?
:=
:= printf(lcd_putc,"\%4.3fV(ADC=\%4lu)", volt, ADC_value);
:=
:= printf(lcd_putc,"\fFAILED at pos=\%u\n", pos);
--------------------------------------------------------
In the code above, the printf is doing a conversion from
the float and "unsigned long" data types to ASCII.
The lcd_putc() function can not do this conversion.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515495 |
|
|
Tommy Liu Guest
|
Re: printf(), lcd_putc() and ROM space |
Posted: Tue Jun 24, 2003 1:20 am |
|
|
:=:=Can the following statements be represented by lcd_putc() or another format to save ROM space?
:=:=
:=:= printf(lcd_putc,"\%4.3fV(ADC=\%4lu)", volt, ADC_value);
:=:=
:=:= printf(lcd_putc,"\fFAILED at pos=\%u\n", pos);
:=--------------------------------------------------------
:=
:=In the code above, the printf is doing a conversion from
:=the float and "unsigned long" data types to ASCII.
:=
:=The lcd_putc() function can not do this conversion.
Thanks for your explanation. It is what I thought as well.
Tommy
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515506 |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|