Hi all,
Has anybody had problems with the 18F4550 resetting when it is not supposed to??
After developing my software and hardware with MikroC Pro and using the EasyPIC development board, I produced the PCB. All work perfectly on the development board.
I have 2 buttons connected to Port D0,D1 then pulse the inputs high. Each time I pressed them the PIC would reset. I removed the debounce capacitors that were close to the oscillator 22pF's capacitor and found the problem went away. I thought I woould deal with that issue later.
I had ports A0...A2 configured as A/D inputs. Port C1 then switches a relay via a BC548 when inputs are at a predetermined level. Each time the relay switched the PIC would again reset. During the switching I noticed a 500mV transient on the 0V line. I temporarily fixed this by placed a 100uF capacitor across the contacts. This fixed the problem but then I noticed the A/D results were not quite right on the LCD. I then realised that the impedance of the voltage divider was to high so change the values and all good. After changing the resistor network I was then able to remove the temporary fitted 100uF capacitor and found that the resetting problem had gone away.
Are these PIC's known to be twitchy or is there a config bit that I am missing???? I cannot understand as to why the impedance of the A/D being too high would cause the PIC to reset. I cannot test any further as the PIC then died, new one with me tomorrow.
The MCLR pin is connected to a 10k/100nF. All IC's are decoupled. +5V provided using an LM2940 as they are excellent at providing the 5V (typ 4.99V) which is good for the A/D reference.
I have many numerous PCB's for the 16F877A's and never had any problem like this before. This is the first time I have used the 18F series PIC. I thought this would be a straight forward from development to PCB exercise as before.
Any tips would be appreciated.
Many thanks,
Andrew