Maker Pro
Maker Pro

wierd problem with PIC18F, advice needed

  • Thread starter Alexandre Bezroutchko
  • Start date

Alexandre Bezroutchko

Jan 1, 1970

I am facing a wierd problem and already spend two days
trying to solve it. Please help.

My curcuit is based on PIC18F458 MCU. Something went
wrong when I started experimenting with driving a DC motor
with PWM and since then the schematics works only if I
physically touch some conductor, i.e. ground. When I touch it,
the MCU resets and starts working, when I remove my finger
it stops working immediately.

Currently the schematics consists of following:

Quartz 20MHz and two capacitors
RS232 tranceiver AD202EAN (with appropriate capacitors)
Reset (pin 1) tied directly to Vdd
4.5V from battery are feed to Vdd and Vss on both sides of the MCU

Firmware: Tiny Bootloader 1.63, ex_admm.c (from CCS suite).

In attempt to localize the problem I have changed virtually
everything: MCU (tried 18F452), quartz (20, 8, 4.43MHz), a
breadboard, battery instead of proper bench power suppy,
disconnect a RS232 tranceiver... Same difference.

Some observations:

With a scope I can see all DC voltages reach the MCU at correctly.
At MCU TX pin I see 50 Hz square wave (the MCU starts, but gets
reset from 50 Hz noise???). If I ground the MCLR pin, TX pin goes down.
If I touch any pin of the MCU, TX pin goes up and I can see proper
RS232 activity.

Any advice is highly appreciated. Please help.


Bob Weiss

Jan 1, 1970
Do you have any capacitors between ground and Vdd near the MCU?
Possible noise on the power line? Is the Brown Out circuit enabled?
Try disabling it..

Alexandre Bezroutchko

Jan 1, 1970
Hello Bob,

Yes I tried to put a decoupling capacitor... Not sure about brown-out..

Anyway the problem is solved. I have soldered everything on a PCB
instead of using a breadboard and it works well now.