Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problems getting PIC 18F252 to work!

Status
Not open for further replies.

rsmatias

Junior Member level 3
Joined
Mar 31, 2002
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
164
Hi! I've been trying to put a 18F252 to work without success.
Using a crystal of 4MHz the PIC oscillator (OSC2) only starts if I use oscillator mode HS. Is doesn't start with XT mode.
Even using HS mode the PIC only works if I touch with my fingers in the Positive connection (Vdd) near Vdd connection of the PIC. Even so, this "solution" :)-)) doesn't work perfectly, because it is very unstable.
In the breadboard I have two capacitors, between Vdd and Vss, to filter any possible noise from the power supply.
Anyone else has this problem? It is already my second PIC18F252.
Test program was a flashing LED.

Conditions:
PORT A - All in output mode with A/D disabled.
Brown-out RESET disabled.
Power-up timer disabled
V = 5.06V
Compiled with MPLab v6.10
Programmed with IC-Prog 1.05A

Best Regards,
Rodrigo Matias
 

I had almost the exact same problem when the board would work only when ground was touched.

I eventually figured out that the problem was with the FUSE settings. The soltution to my specific problem was to make sure to disable the low voltage programming fuse, and that did the trick for me. Before I had never done anything programatically to that fuse and can only guess that by default it was on.

PS. As a reminder, to only have one crystal fuse set you cannot set XT and HS at the same time as this will not work.

- Jayson
 

PIC18F Problem Solved

Thanks for your answer Jayson.
A few minutes after after I have posted the message reporting the problem I found what was causing it.
Well, as you said we have to pay attention to the config of Low Voltage Programming because by default it is set and as I didn't have the RB3/PGM pin connected to the ground the uC was picking noise and switching between Running Mode and Programming Mode randomly.
For those who will have this problem too, checkout CONFIG4 LOW Byte in the "Configuration Bits" Section.

Best Regards,
Rodrigo Matias
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top