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.

Am i fry my pic

Status
Not open for further replies.

HATHA

New Member
hi all
yesterday i program my first pic, 16f628a using JDM programmer with winpic
(DL4YHF's), at first time it work well. burn another program on it and it also work well. for all programs MCLR was enabled and use 32k crystal oscillator and other functions disabled (config word = 0x2128)
when i try to reprogram my early program it was burnt in to the pic but didn't nothing happen. i erased the pic and reprogrammed, the winpic showed it burnt into pic but did not work:(. my pic can still program but does not work
am i fry my pic:confused: or am i locked it up

i burn these to pic
 

Attachments

  • my first.asm
    416 bytes · Views: 135
  • blinkled.asm
    739 bytes · Views: 136
  • dl4yhf programmer.gif
    dl4yhf programmer.gif
    9.7 KB · Views: 159
Check the config bits, you might have uploaded something wrong.

Think, if you can program the PIC, it is not fryed !!! LOL You must have done something wrong, check it, its the only way to learn, oh, you might check the cable and the pcb, this programmer is very basic and unstable, try an ICD2 clone ou the Junebug from Blueroom's.

This is my point of view, i could be wrong...

:)
 
thank u for reply
my configuration word is
__config=0x2128
2128h=10000100101000
bit 13 = 1 ==> CP!=1 ==> code protection off
bit 12 - 9 =0 ==> as per the data sheet
bit 8 = 1 ==> CPD!=1 ==> data memory code protection off
bit 7 = 0 ==> LVP =0 ==> disable low voltage programming
bit 6 = 0 ==> BOREN=0 ==> brownout reset disable
bit 5 = 1 ==> MCLR =1 ==> MCLR use for programing
bit 3 = 1 ==> PWRTE! =1 ==> power on reset off
bit 2 = 0 ==> WDTE=0 ==> watch dog timer off
bit 4,1,0= 0,0,0 ==> FOSC=000 ==> LP crystal oscillator on
what is the wrong with my configuration word
yes this programmer is very basic but i thought it is good to start with it

btw what is meaning of unstable programmer :confused:
 
Last edited:
i burnt the my first program on new 16f628a it work as i expect don't know what happen to my old pic it still can erase and program but not work and another thing when i power up my pic and remove ground connection from pin 5 then all pins go high :confused:
 
don't do that if you have anything connected in those pins...

read the datasheet, page 14 says everything you need about the Vss pins, they are the ground reference for logic and i/o pins, as in digital ground, it means that all logic and i/o pins need all the Vss pins conected to ground so they can output "ground" or Low levels... one advice, if you have some Vss pins conected and the uC ON, it will not do much good hot disconecting the Vss... all internal logical gates need the Vss tied to the ground, so untieing the Vss pin 5 will cause an malfunction ! If you do this kinds of things it is possible that you may have allready burnt some internal gate or something like that...

If the uC internal gate design only needed 1 pin for Vss they would have done that to simplify costumers designs, they might be there because they can't connect them inside too...

Remember that PICs may be cheaper than the other uCs but they still cost money LOL ;)

One thing i've learned all this years is to read the manual or datasheet first (Try to give a look in all config words and pin specs first, then go reading slowlly) !

:)

Get another = PIC and try the same program,
oh, i allmost forgot, your config work seems ok.

Also to start, the best thing to do is getting an Pickit 2 Debug Express kit, it comes with examples, PIC and programmer debugger, this is the best option to start. Cheap and easy !

Have fun !
 
Last edited:
thank you for u advice Mr.TiagoSilva
i will keep it mined
your are extremely right about data sheet of PIC
they are more than manuals they are sort of tutorials
by the way is it possible to damage output circuitry of the pic while working internal (because the pic i mention still able to program and erase but nothing send to out put pins)
and i have a crazy thought that is i'm going to connect pin 10 to ground like in LVP programming mode :rolleyes:


once again thanks for your advice

does any one build lothar's ICD2 clone? does it work on MPLAB v7.61?

it's looking cheaper to me
 
Situations like this is I completely satisfy with my "code" & hardware I'll more concentrate on the config word.I'll try to change the OSC type ex:change to XT, or EXT RC & see how it goes.

Because I have met many PICs that they don't support some type of OSC.

Recently I found that INT RC is working but XT mode is not working.
Another PIC XT is working & INT RC is not working.

Its also an PIC 16F628A.
 
Lothars ICD2 is a classic design, it's been copied (yes even by me) countless times. Not even sure if it's the original.
Now I'd build a PICkit2 over an ICD2, you can simplify the PICkit2 design (see my Junebug schematic) with even less parts than the Inchworm and it's a better programmer to boot. USB support, fast, simple, reliable, lots of extras like the Logic Analyzer & USB tool.
 
A PICkit2 clone is the way to go. Pity no one provides a programmed 18F2550 chip. With the chip and about $5.00 in parts you can build a good inexpensive programmer.
 
many thanx for your replies :)
as Mr. gayan said i try with different osc types XT, ceramic resonators ,RC intenal osc
but non of them succeed
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top