EEPROM + RS232

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
nipbor
Posts: 4
Joined: Tue Mar 06, 2007 1:41 pm
Contact:

EEPROM + RS232

Post by nipbor »

Hi everybody,

I am using flowcode (PRO version) to construct this program that mainly receives a sequence of 256 bytes from the RS232 RX pin. The baud rate is 19.2k and the PIC i am using is PIC16F88. This data is supposed to be written in the PIC's internal EEPROM. In other words as soon as I receive a byte, I immediately write it in the EEPROM, increment the address counter, and wait for the UART to supply me with the next data byte.

Two LEDs should light up when the sequence ends. In simultion this occurs but in real-life NO!!

I have tried a slower baud rate 1200 and it worked.

My question is: Is there a time constraint to write on the EEPROM???? If so, does it also apply to reading?

BTW i am clocking the PIC using a 19.0668 MHz crystal and the TARGET i chose in FLOWCODE is PIC16F88 (xtal).

Thanks in advance

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EEPROM + RS232

Post by Benj »

Hello

The EEPROM requires a small delay to allow for the data to be written correctly. Read commands should not take as long as write commands.

Also depending on how efficient your program is will determine the maximum baud rate it can handle.

I would move the baud rate up in increments to get the fastest possible speed for your application.

Or alternatively you could read all of the bytes into an array and then once you have received them all correctly you can move them out into the EEPROM.

Post Reply