William Killian wrote: > BUT some times the game is happily chugging along and the reel > controller apparently loses its mind. So the "reel controller" is the thing controlled by the PIC, not the PC, right? > It decides there was a failure > and the reels get sent to home positions (the going home action is a > slower spin so we know it is a sent home problem not a bad decision > about where to send them) but for some reason the reels all go to step 0 > with is 4 steps off of the stop for top prize. > Okay amusing story done, does anyone know under what conditions a PIC > might have trouble reading the internal EEPROM? Design decisions in > making the board were some I would not have made and the programming > style is not one I would have used but I see no failure mode in the code > that would lead to this. There are various reasons the PIC might send the wheels to zero with EEPROM failure being only one unlikely one. I think the two most likely problems are noise spikes at the PIC or communication errors. Try an experiment. Let a machine run normally, then glitch the MCLR line low while the PIC is doing something without letting the PC know anything happened. All you need is a wire that you hold one end to ground and the other end momentarily touch to the MCLR pin on the PIC. You probably want to try this while the system is in various states. What happens? Does the PIC have proper bypassing, and was proper attention paid to the PIC ground and ground loop currents and inductive pickup paths? You said the circuit was designed by a software guy that knew a little digital hardware, so chances are the answer is "no". This is the most likely single cause of the problems. The next likely cause, which may well be related to the previous, is noise on the communication channel. After reasonable electrical steps have been taken, this should still be dealt with by a proper protocol that wraps everything in packets with checksums and performs ACK/NACK to eventually guarantee reliable delivery of the data. However to do anything more than speculate as above, I'd need to see the schematic and board layout. We specialize in PICs and their surrounding circuitry and are all electrical engineers that understand analog. We've done somewhere between 50 and 100 PIC designs, and have been gold level Microchip PIC consultants for something like 6 years now. Contact me off list if you'd like professional help to look into this further. ****************************************************************** Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC consultant in 2004 program year. http://www.embedinc.com/products -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist