Jump to content
Sign in to follow this  
atiato

Welcome me I'm the 1st member in this lovely Forum

Recommended Posts

I'm working on C2C compiler .....serial communication by the way I want to send a block or text file of limited size to the PIC so char getchar(); used to receive  one byte How should I make a buffer using this function ....or Is there any other method to work within it ??????? ::D:

Share this post


Link to post
Share on other sites
Guest JoeB

Welcome! Im member no.2! he he!

 

As for your problem...

 

Use a device that has EEPROM built into it, then when you send data, tell the pic how much data you are going to send with the 1st packet, then for each of the packets, just save then byte by byte into the EEPROM.

 

When you have finished receiving data, just read back the EEPROM.

 

Any good?

 

I dont know weither you can access the EEPROM at runtime. I always use an external serial RAM device to store RX comms bytes.

 

Hope that helped, if it didnt... SHOUT ! :D

 

Joe

#

Share this post


Link to post
Share on other sites

web site any thing how ....functions ......serial communicartion

help anything .......listen I want to send block of 128 bytes from PC RS232 PORT to PIC16F84A okay that sounds good .........and save them into the PIC then proccsing them internally by the PIC????

Share this post


Link to post
Share on other sites
Guest JoeB

when u receive the byte using getchar(), save the byte to IIC:

(you need to write the IIC function)

for(x=0; x<128; x++)

{

theChar = GetChar();

SendIIC(theChar /*the RX char*/ , x /*position in array*/);

}

 

or, in memory:

 

char myArray[128];

for(x=0; x<128; x++)

{

myArray[x] = GetChar();

}

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...