This sounds good, thanks for the advice I'll give it a go! bbarr@CALIFORNIA.COM on 25/02/2002 18:32:43 Please respond to PICLIST@MITVMA.MIT.EDU@INTERNET@wtgw To: PICLIST@MITVMA.MIT.EDU@INTERNET@wtgw cc: Paper Mail: Subject: Re: [PIC]:USART receiving data *** WARNING *** This mail has originated outside your organization, either from an external partner or the Global Internet. Keep this in mind if you answer this message. On Mon, 25 Feb 2002 17:42:54 +0000, Mike Blakey wrote: >I'm doing a little project using an f876 storing and retrieving data (a lookup >table) into the EEDATA memory. The routine works fine, except for receiving data >from the PC. I send the data using VB6 MSComm1 but I get an overrun error after >about 4 bytes. even if I change the speed from 19200 down to 9600, exactly the same >thing happens. I have not got any hardware handshaking, so I am assuming that I >will have to handshake by sending back an acknowledgement byte before sending the >next byte down to the PIC. Am I missing something or is this the right way? Thanks. > It sounds like you're trying to write the data to the EEPROM memory on a byte-by-byte basis, is this true? If so, the PIC isn't able to get back to the UART code in time to read the next byte before more bytes are sent by the PC. EEPROM writes are relatively slow. You will probably have more success if you can buffer up the data in RAM. You can then send the data in blocks from the PC to the PIC and write the data blocks to EEPROM between PC transmissions. Acknowledgement bytes and XON/XOFF handshaking are usually best done with blocks of data rather than with each individual byte. Regards, Bob -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads