Of course. Simply use the Microchip application notes on driving the 24LCxx devices and create a PIC which programs them - and have it accept commands via RS232 so then you have an ultra-low-cost EEPROM programmer. I don't understand why you need so much memory for a state machine. Normally you need only a byte or two to store the state number (a state machine with over 256 finite states would have so much code I don't see how you'd implement it in a 16F84). Plus a byte or two to store state-associated flags. You start at state 0 and then as events occur you move to state x, state y etc. You certainly don't need an n-input X m-state array under normal circumstances. In two bytes I have implemented state and status for quite a complex dual-triac zero-crossing temperature controller which also had a control keypad, dual LED displays and a Dallas DS1820 temperature sensor. If your project is much more complex, are you sure your code will fit into 1K?. > ---------- > From: Humberto Bonasso[SMTP:hbonasso@FLASHNET.IT] > Reply To: pic microcontroller discussion list > Sent: Saturday, November 29, 1997 1:30 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: State machine and EEPROM 24LC... > > Hi all, > Ê > I'm developing a project in wich a PIC 16F84 acquires pressure and > flow parameters of a water pipe and then has to control, through a > TRIAC, the power delivered to a water pump based on some calculations > on the parameters acquired. The data acquired and the pump power level > need to be transmitted via RF link and showed to a LCD display module > based on another PIC that manages also a keyboard to allow some manual > control over the whole stuff. > Ê > Well, here is the problem: I'm thinking to implement the logic with a > "state machine" technique instead of making tons of SW logic; this > solution allows to implement a sort of multitasking in which the > several tasks like "data acquisition from sensors", "driving of the > TRIAC", "trasmitting data to the display" and "receiving comands from > the keyboard" could be managed all in parallel execution (not truly > but enough close). The disadvantage of this approach is the EPROM > memory area needed to store the state matrix: the total size is > "number of inputs" x "number of states". So i decided to go with > external 24LC... EEPROM to store the matrix but the problem is HOW TO > PROGRAM IT ? > Ê > I know 24LC... is a I2C device, thus my PIC programmer nothing can do > with it. Is there any brilliant solution for filling the data into the > memory different from spending money for an expensive EEPROM > programmer ? > Ê > Thanks in advance for your help. >