Leighton Rowe wrote: > I'm looking for routines that enables my lpc2129 to safely read > a .hex data file through the serial port into temporary RAM. Any > ideas or code examples? > > Although the LPCs operate at high frequencies, I'm a bit concerened > about just sending hex data just like an ordinary ASCII string > because of possible problems which can cause data loss...for > example, reading 1 ASCII value into memory too slowly between uart > (RDA) interrupts. What's the best way of avoiding this possible > situation? Are you serious? I can dump .hex files down into an 8-pin PIC (no Uart) running at 1Mhz effective rate and load (burn) this information into another micro after every line. On any other 8-bit micro with a Uart and some Ram I have absolutely no problems keeping up. Why would you think that an LPC2129 can't keep up? Is it running at 32KHz? Does it disable the interrupts for long periods? Are you pumping the hex file in at 10Mbaud? Hex files always include a primitive checksum so you can always check for integrity. Coms drivers should include some form of handshaking and in most instances I prefer to use Xon/Xoff. If there was no way you could handshake then I suggest that you just send the hex file a few times, your s/w could just reject bad lines and so hopefully and statiscally you should finally receive all hex data lines intact. Tracking software could even signal whether it is happy or not at the end of each file. Really, the LPC2129 is more than capable of handling such simple tasks, with or without a Uart FIFO. There should be no reason that the 2129 should miss any characters at all and no real reason that your s/w should either. If you are in doubt then please inform us of the basis for your concerns. -- Peter Jakacki
Message
Re: [lpc2000] loading hex-es
2004-06-21 by Peter Jakacki
Attachments
- No local attachments were found for this message.