At 08:31 PM 6/21/04 +0000, you 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?
First enable the FIFOs. If you set the threshold about midway that will
give you extra time to respond and reduce the interrupt overhead.
But if you are really concerned about this you will need some sort of
handshaking protocol. Kermit and x-modem are both relatively small.
What are you trying to do? For a simple terminal like interface I wouldn't
bother doing more than maybe enabling the FIFO and echoing the typed in
characters. If you are loading data or code I'd consider a real download
program (and ditch the ASCII representation). If it's something like a
remote instrument interface I'd enable the FIFO and maybe add a checksum of
some sort to the end of the command so you can verify it and send back an
error code.
I wouldn't be surprised if noise was at least as big an issue as response
latency but that really depends on your application.
Robert
" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "
Kelvin Throop, IIIMessage
Re: [lpc2000] loading hex-es
2004-06-21 by Robert Adsett
Attachments
- No local attachments were found for this message.