Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Programming PIC18F452

Status
Not open for further replies.
Hi,

When i run the PIC18F452 in MPLAB with debug mode it runs fine however when i try to download the program to the PIC18F452 and remove the ICD my program doesn't work :eek::eek::eek: ... What could be causing this :confused::confused: I changed the mode from debug to release...I set the configuration bits: changed the oscillator to XT, Disabled low power programming and disabled the watdog timer. When i clicked on programmer > MPLAB ICD2 > build all > program > programming succeeded > removed MPLAB ICD2 from PIC18F452 header and nothing works :eek::eek::eek: ... Please please please help...i have to demonstrate my project Friday @ 10am.

Regards,
Darrell.
 
Don't panic

OK like the hitch hiker's guide to the galaxy says.
DON'T PANIC!!!
Make a what I like to call a "Pin" test have one pin an input when it is High turn on all the other pins high. Low turn all the pins low. check with logic probe really quickly.
Reaction A
Pins work and react normally.
Meaning.
You can program it works your setup for the tested worked. Breath. Go through your real code slowly and add a Indicator light(a free pin that drives an led). That way you can see where every thing goes wrong.
Recation B
Nothing happens.
Meaning
PIC is dead. Code is really wrong. Wrong header. Power problems. Sleep is turned on with out a way to wake up.*<-that one KILLED me for 3 days:(*

Check the code by READING the program with MPLAB (I think the icon to the left of erase) and make sure it lines up with your code.

If you post your code it would help debug and figure out what is wrong. Otherwise just shooting blind folded in a dark cave...

Thought of something else. Does it work in the powered ICD??? If so then you have problems (of course) in what ever you put it in afterwards.

Again without more info I am guessing.
Anyway good luck.
If that does not help Post as much as you can and remember the details.
 
MPLAB still installs the debug executive if you have the PK2 selected as a debugger. Select PK2 as a programmer and all will work as it should. That is of course as long as you have the required pullup on MCLR.

Mike.
 
Programming PIC

Will have to try your suggesstions and let you guys know in a little while...thanks for the suggestions and yeah panic mode did kick in...I guess all those monster energy drinks having an effect now...:D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top