> -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf > Of Olin Lathrop > Sent: Friday, February 10, 2006 9:07 AM > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] question from someone new to the list > > 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? The little board with the PIC on it is the reel controller - sorry about the confusion. > > > 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. Looking more at the code it looks like it isn't EEPROM as the PIC copies the values into RAM. RAM seems to be always addressed by name but I am looking for potential overwrites. > 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? Gonna have to rig the board as MCLR is tied directly to 5vdc but sounds like something to try. > > 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. I suspect that the answer is no... > > 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. The protocol is bad. Very bad. But it does have "checksums". Well okay an XOR of the 3 or 5 bytes in the packets. > 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. Had a similar offer already. Let me talk to the powers that be about getting one or both of you guys a contract to look at this board. Well board set since the driver chips are on another board. The interesting part is that they are connected using a 50 lead ribbon with ground, 5v and 12 power supplied along that ribbon. ------------------------------------- Notice of Confidentiality ---------------------------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster@vgt.net. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist