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
EEPROM + RS232
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel