CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

woh format carateres to see in lcd

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gaviao



Joined: 03 Apr 2007
Posts: 2

View user's profile Send private message

woh format carateres to see in lcd
PostPosted: Tue Apr 03, 2007 2:06 pm     Reply with quote

i am using this code to read the adc value and print in the lcd and serial port, on the serial port the formatation is ok, but on the lcd i can't see the right numbers.



int32 temp;

temp = (int32) read_adc();
printf("Valor A/D S0 = %lu --> Temp0= %lu.%lu C \n\r ",temp, temp/10, temp%10); // its ok
printf(lcd_putc,"Temp0: %ld.%ld C",temp/10, temp%10); // wrong formatation??

i use the generic ccs driver for lcd

Smile thank you
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 03, 2007 2:16 pm     Reply with quote

1. Post the good output and the bad output (on the LCD), so we can see it.

2. Does your LCD display any output ?
Try a simple test program for your LCD:
http://www.ccsinfo.com/forum/viewtopic.php?t=25994&start=3

3. Also post your compiler version.
gaviao



Joined: 03 Apr 2007
Posts: 2

View user's profile Send private message

PostPosted: Wed Apr 04, 2007 8:06 am     Reply with quote

I find the problem, is in the lcd lib, in the method void lcd_putc( char c),
i have 2 lines comment :p
Embarassed


thank you, PCM programmer Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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