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 should I get word bunch inside the array.

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



Joined: 15 Jan 2009
Posts: 8

View user's profile Send private message MSN Messenger

How should I get word bunch inside the array.
PostPosted: Fri Jan 16, 2009 9:55 pm     Reply with quote

How should I get word bunch inside the array.
I am sorry, I am a beginner.
I declare a array to preserve the materials that UART read in.
There are words which I want inside the array.
How should I write this procedure?
Some procedures are as follows.
I can already accept the materials of UART and put into array.
Suppose that there is 1234567890 inside the materials that I accept now.
I only want to get 456 inside, how should I do.
Code:

char Msg_buff[512];

#int_RDA
void  RDA_isr(void)
{
   Msg_buff[Array_number] = getc();
   if(Array_number < 512)
   {
       Array_number = Array_number + 1;
   }
   else
   {
       Array_number = 0;
   }
}

void rs232_buff_cls()
{
   for(Array_number=0 ; Array_number<512 ; Array_number++)
       Msg_buff[Array_number]=' ';
         Array_number=0;            //RS232 Buff Point set to 0
}

void main()
{
enable_interrupts(INT_RDA);
   enable_interrupts(INT_SSP);
   enable_interrupts(GLOBAL);
set_uart_speed(4800);

}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jan 16, 2009 10:07 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=27121&highlight=mid+string
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