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 CCS Technical Support

Help on T6963C LCD controller

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



Joined: 08 Aug 2006
Posts: 49

View user's profile Send private message

Help on T6963C LCD controller
PostPosted: Thu Mar 29, 2007 7:14 am     Reply with quote

Hello All,
I asked a dum question earlier on sending a string "ABC" to T6963C based LCD.
I am using the driver now. I simply wanted to send "ABC" using the glcd_putc("ABC");, seems that the
argument of the function is a character type. How can I then send a string.
Are there bits and peices of the code not posted or si the whole code posted.

My MCU is dsPIC30F6014a and LCD is 240x128 pixel. I have selected 8x8 font size and CE is always tied to low.

Here is the code snippet.
Code:



Code:

int main(void)
{

init_io();

glcd_init();

glcd_WriteByte(1, (LCDModeSet|LCDMode_XOR));
glcd_WriteByte(1, (LCDDispMode|LCDDisp_TXT|LCDDisp_GRH));

glcd_gotoxy(4,3,1); // 1 = text area of memory; note that there are only
// 16 rows of text possible
glcd_putc("ABC");




} //End of main()



help please
_________________
Thanks

mkr
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Thu Mar 29, 2007 8:26 am     Reply with quote

The compiler will((magically)) take a function that accepts a char, and make a loop for you that will call it multiple times for a string. so..
to print a string you

Code:
glcd_WriteCmd0(AutoModeReset);
glcd_WriteCmd0(LCDDispMode | LCDDisp_TXT| LCDDisp_GRH);
printf(glcd_putc,"Good Morning!");


This has the printf using the glcd_putc function.. and it would normally
take just a single char.. but the compiler puts in a loop that calls
glcd_putc once for EVERY char in "Good Morning!" string.

Also look at C:\Program Files\PICC\Examples\EX_LCDKB.C
and C:\Program Files\PICC\Drivers\LCD.C
see how lcd_putc just takes a single char but in the example it is
given a string and works on with it. This may not be the case for future compilers.
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