> >To do this I need to store the conditions in eeprom in some format, and >make the code to evaluate them (the parser). You might try an interpreted language. I've done this in an F84, and in the AVRs, as well as Z-80 systems. You define some number of commands, with optional trailing parameters. ex (hex): 00 ;nop 01 ;Set output pin high 02 ;set output pin low 03,'HI';Send string to display 04,01,80;Set servo #1 to half scale FF,11 ;skip -4 Hard to be more specific without details. The interpreter starts with the extraction pointer looking at the first byte, and executes it as a command. Each interpreter has two modes, execute, and scan. In execute, it acts on it's parms. In scan, it simply moves the extraction pointer past it's parms. Next time, we want the second command, so we scan the first one, and execute the second. Each command interpreter knows what it's parameters look like, so you don't need anything extra in memory. You keep a variable that tells you what command you're executing In the F84 code, I was controlling a transmitter with commands like Tune, and Wait, CW'text' etc, 16 commands in all. The code can be self modifying, and I have been thinking for some time about doing some sort of robotic project where the bot would start off with an approximately correct program, and modify it's program over time, looking for better results. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.