CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

#device statement and internal eeprom write timings

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
roman



Joined: 23 Dec 2003
Posts: 3

View user's profile Send private message

#device statement and internal eeprom write timings
PostPosted: Fri Aug 13, 2004 6:10 am     Reply with quote

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

View user's profile Send private message

the typical writing procession for one byte to eeprom
PostPosted: Fri Aug 13, 2004 8:42 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group