View previous topic :: View next topic |
Author |
Message |
roman
Joined: 23 Dec 2003 Posts: 3
|
#device statement and internal eeprom write timings |
Posted: Fri Aug 13, 2004 6:10 am |
|
|
Help please
I am using the 16F688 and 16F648A. I have noticed a problem when writing a number of bytes to the internal eeprom of the 16F688, the write fails on occasional bytes.
I believe the compiler has changed with reference to write delay generation and that this is connected to the #device statement. If I want to have write delays automatically generated for the internal eeproms of the above devices, what settings do I need to use for#device, and what are the defaults?
Thanks |
|
|
garyzheng
Joined: 22 Jul 2004 Posts: 25
|
the typical writing procession for one byte to eeprom |
Posted: Fri Aug 13, 2004 8:42 am |
|
|
The typical writing procession for one byte to eeprom is about 4ms, so you can write the peogram like that.
Code: | disable_interrupts(global);
write_program_eeprom(address, value);
delay_ms(4);
enable_interrupts(global); |
I will post the detail program later.
If you wanna transmit the data from rs232, and store it in to program memory, you should choose the baudrate less than 300, because over speed of RS232 transmision will cause writeing procession error. |
|
|
|