UART With 24C08 Storing String

Status
Not open for further replies.

Suraj143

Active Member
I'm getting a string of characters from PC @ 9600 baud rate.I need to store them in 24C08.I'm going to write them in block write mode.

My problem is when I receive & while writing them to 24C I'll miss many characters coming from PC side.How to avoid this?

I'm getting a string like 100 characters, so no any free GP RAM also.
 
You need to store 16 bytes so you can do a block write. A block write takes 2mS and to receive 16 bytes takes 16ms. If you have the ram then fine, if not then you need to store 2 bytes while the write completes.

Mike.
 
You are correct.But I'm going to write my VB application also to send the string.

So is it ok if I use a delay after sending 16 bytes?
 
Last edited:
Suraj,

Do you still need to do this? If so, I suggest using an interrupt driven fifo to eliminate any possibility of missing data. I can post suitable code if needed.

Mike.
 
As your incoming string is only 100 characters why not move to a more modern PIC like the 16F1827?, this allows you to allocate a continuous area of indexed GPR's which will easily hold your 100 character string.

Another obvious solution is to add handshaking, as RS232 is designed to do - as you're writing routines for both ends of the process then it makes it pretty easy.

Again, as you're in full control of both ends, you could set the VB end to send 16 bytes of data and then wait for acknowledgement from the PIC before sending the next set of bytes.

As you're in full control of both ends there are many options.
 
Hi Pommie & Nigel.Thanks for your response.

I use PIC16F886.I'm doing a signboard.Display multiplexing in ISR.While the sign text moving if I send new data it must save new data in 24C08.

Some points
*Note that it doesn't need to be show text while I'm receiving characters from PC.I can leave the display blank at that time.
*I can also use interrupt driven fifo.

I like to add handshaking that way the data will be totally secured.But in PIC side I need help.I'll write my code & show both of you after that you can correct it.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…