Harry Tenopoulos wrote: > > Hello everybody > > I have designed a PCB for the company i work for which is used on an > automatic machine.. > The board has 3 PICs on it (2 16C54 and 1 16C55) > > This board interfaces with 3 external power relays.These relays are > signaled from 3 other reed relays on the board which are > opto-isolated from the signaling PIC. > > When the power relays operate alone (not connected to the machine's > motor) there is no problem. But when they are connected problems > start. These three relays control a two speed bi-directional 220V > motor. At the change of speed or direction the electronic circuit > seems to be reset (it happens about once in 10 changes). > > Can anyone tell me what is happening ? > > Harry I've had similar problems with DC motor control I have not had time to find the problem yet but I was very sloppy with earth returns and decoupling I did find a mention in the pic16c84 data sheet ds30081A "6.3.3 Operating in a noisy environment" page 32 says that "register contents can get corrupted due to noise spikes.The on-chip watchdog timer will take care of all situations involving program sequence "lock-ups." however,if an I/O control register gets corrupted, "............... you get the idea My lock-up problem is on a 16c56 but I must assume that the registers on all the pic's are similar and therefore all are prone to this problem -- Peter Cousens email: peter@cousens.her.forthnet.gr snailmail: Peter Cousens, karteros, Heraklion, Crete, 75100, Greece, phone: + 3081 380534, +3081 324450 voice/fax