Command parsers, easy as pie... Wrote one for the FED BASIC 16C74 chip. Used to control two stepper motors over a serial interface. Basically all I did was to read the command string into a buffer till the appropriate line terminator was seen. Then the string in the buffer was parsed for the appropriate command string block, fixed format for ease of programming... The string block was then sent to an If/Then/Else table to select the operation required with respect to the the two byte string... Nice and easy. If anyone would like a copy of the code a request via private email will be only be accepted... Tjaart van der Walt wrote: > > Graham Daniel wrote: > > > > Tjaart van der Walt wrote: > > > > > > I am looking at writing a command parser for an SX28. > > > Flying at 50 or 100 MIPS, the program will execute from > > > external SPI memory (like a Stamp, just faster). There > > > are plenty of SPI EEPROMs out there, but I haven't noticed > > > an SPI RAM chip I can use for scratch memory/variables. > > > Has anyone seen anything like this? > > > > The new Atmel "Dataflash" has twin buffers for read/write of flash data. > > These buffers could also be used for scratch memory. Clock frequencies > > vary from 1 to 15 MHz, size is mega + > > Buffers are mostly just over 256 bytes each. > > 256 bytes of scratch will do nicely... > > > Realtime clock chipz usually have general purpose ram also. > > ...and the RTC will be a bonus. > Do you have any idea what the smallest Dataflashes > sell for? (in USD). > > I haven't written a parser/interpreter before, but > methinks it will be quite a nice challenge. > > What sort of real nasties should be avoided? > Nino. -- ****************************************************** * Antonio (Nino) Benci * * Electronic Services Manager * * Monash University - Dept of Physics * * Wellington Rd, Clayton. 3168 * * Victoria, Australia. * * TEL - 61 3 9905 3649, FAX - 61 3 9905 3637 * * Mobile - 0414 764 763 (private and ah only) * * EMAIL - nino.benci@sci.monash.edu.au (work) * * - fleatech@excite.com (private) * * WWW - www.physics.monash.edu.au/ * ******************************************************