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

How can display some character in string on lcd

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



Joined: 30 Mar 2004
Posts: 8

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

How can display some character in string on lcd
PostPosted: Wed Jul 21, 2004 2:19 am     Reply with quote

My program like this :


char string[20];


// my string = #02+'ABCD'+#13 (from RS232 PC)

gets(string); // get string from RS232
:
:

how can I display char only 'BCD' on LCD
(I don't want to display #02 and 'A')

I use LCD_PUTC();

Thanks
carlosma



Joined: 24 Mar 2004
Posts: 53
Location: Portugal

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Wed Jul 21, 2004 2:57 am     Reply with quote

Hello

Do you need something like this:
Code:

#int_rda
void rda_isr()   
{
char c;
        c=getc();
       if ((c>=' ')&&(c<='~'))
          {
           buffer1[len] = c;
           len++;
          }
       if((c==0x0A) ||(c==0x0D)) // I gues End Of String
        {
          bit_com_b=1;  // All OK
          len=0;
        }
       if(len >=  BUFFER_SIZE)
          len=0;
}

You only record in string the intended characters

Carlos
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