Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 12th January 2008, 06:58 PM   (permalink)
Default problems with programming a pic 16f628a

The last one week i try to program a pic 16f628a, i'made a home built jdm programmer, and used icprog to program it, the first times it seemed to work, the burning was succesful, but after a few days nothing worked, i had the usual problem "Verify failed at address 0000h" (the address depends to the first nonzero address). I thought that maybe there was a problem with my programmer and i have rebuilt it 3 times... but there's still the same problem. So i concluded that the problem is with the software.. So i testes with both winpic800 an icprog and there's the same problem. Today i found that when i read the chip in the configuration byte it has the cp bit checked and i wonder what can i do now to remove it, I have tested 3 pics but all of them are code protected..
Any idea???
tanilas is offline  
Old 12th January 2008, 07:08 PM   (permalink)
Default

Try to Erase the pic first, it also erase the code protections
OY2L is offline  
Old 12th January 2008, 07:18 PM   (permalink)
Default

Are you using the internal oscillator with /MCLR disabled? If that is the case, re-programming the 628A could be impossible because the JDM programmer can't control Vdd (it's always applied). I think that there is a modified version that overcomes that issue.

Last edited by eng1; 12th January 2008 at 07:28 PM.
eng1 is offline  
Old 12th January 2008, 07:24 PM   (permalink)
Default

Quote:
Originally Posted by OY2L
Try to Erase the pic first, it also erase the code protections
i read in the datasheet that erasing it sets the code protect. and when the code protect bit is set then when you read the chip it shows everywhere zeros and you can't program it... what can i do???
tanilas is offline  
Old 12th January 2008, 07:50 PM   (permalink)
Default

Quote:
Originally Posted by eng1
Are you using the internal oscillator with /MCLR disabled? If that is the case, re-programming the 628A could be impossible because the JDM programmer can't control Vdd (it's always applied). I think that there is a modified version that overcomes that issue.
I think i tested what you say, i test with differrent oscillators, and with different configuration (and the mclr disabled). Can you recommend any other programmer that could help me?

But why it worked the first times i tested it?

The programmer i built was found in this site:
http://www.janson-soft.de/pic/pic.htm
tanilas is offline  
Old 13th January 2008, 01:37 AM   (permalink)
Default

I use this Paralelleport programmer and i like it very well http://www.lpilsley.co.uk/pdf/p16pro40.pdf
OY2L is offline  
Old 13th January 2008, 02:03 PM   (permalink)
Default

Quote:
Originally Posted by OY2L
I use this Paralelleport programmer and i like it very well http://www.lpilsley.co.uk/pdf/p16pro40.pdf
thank you but it's not what i need, I want a programmer for 16f628a and the jdm programmer is supposed to work. The point is that it doesn't work and we try to find out why
tanilas is offline  
Old 13th January 2008, 02:16 PM   (permalink)
Default

Quote:
Originally Posted by tanilas
thank you but it's not what i need, I want a programmer for 16f628a and the jdm programmer is supposed to work. The point is that it doesn't work and we try to find out why
It doesn't work because it's a very poor design, it relies on the serial port handshake lines exceeding the RS232 specification. It's the most unreliable and temperamental PIC programmer there is - if you check the net you will find huge numbers of people who have problems with it.

As these 'serial' port programmers don't even use the serial port, it's trival to add support for them in parallel port programmer software (as IC-Prog does). I made a deliberate decision NOT to support such progammers in WinPicProg because I didn't (and still don't) consider then a viable option.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 13th January 2008, 02:51 PM   (permalink)
Default

Quote:
Originally Posted by tanilas
I think i tested what you say, i test with differrent oscillators, and with different configuration (and the mclr disabled). Can you recommend any other programmer that could help me?

But why it worked the first times i tested it?

The programmer i built was found in this site:
http://www.janson-soft.de/pic/pic.htm
If you are not using the LVP( you can know by studying the configuration settings) mode see that pin 10 is disconnected by a print cut close to pin10 of the IC base.
Try to enable the Verify during programming mode in the settings of the programming software.

then have a multimeter check of the Vpp on Capacitor C2 . if it is any thing less than 12V DC, perhaps you get the error "Verify failed at address 0000h". If possible try to increase the R1 (4K7) to 6K8. By this the Vpp LED will be Dim .
Also try to , If possible increase R3 to 680hm: this will make grren LED little DIM but the 5V will not be overloaded, perhaps.
__________________
Regards,
Sarma.

Last edited by mvs sarma; 13th January 2008 at 02:56 PM.
mvs sarma is offline  
Old 13th January 2008, 04:59 PM   (permalink)
Default

Quote:
Originally Posted by mvs sarma
If you are not using the LVP( you can know by studying the configuration settings) mode see that pin 10 is disconnected by a print cut close to pin10 of the IC base.
Try to enable the Verify during programming mode in the settings of the programming software.

then have a multimeter check of the Vpp on Capacitor C2 . if it is any thing less than 12V DC, perhaps you get the error "Verify failed at address 0000h". If possible try to increase the R1 (4K7) to 6K8. By this the Vpp LED will be Dim .
Also try to , If possible increase R3 to 680hm: this will make grren LED little DIM but the 5V will not be overloaded, perhaps.
I tested what you recommended but nothing happened. Can't program... the voltage is around 8 volt on the capacitor C2. I don't know what to do, the problem seems to be with the code protect bit right now. I'll try to make another Jdm programmer with another schematic i found though i don't believe it'll work.. Also i will test it with a microchip burner which i'll borrow from a friend...
I'll inform if i have further news
tanilas is offline  
Old 13th January 2008, 05:14 PM   (permalink)
Default

You are vasting your time building another not working JDM programmer, build instead the P16PRO40 programmer and you have a good programmer and it can program almost every pic
OY2L is offline  
Old 13th January 2008, 05:27 PM   (permalink)
Default

Quote:
Originally Posted by OY2L
You are vasting your time building another not working JDM programmer, build instead the P16PRO40 programmer and you have a good programmer and it can program almost every pic
If it is serial programmer and the cost is less than the proposed cost of PICKIT2 , it is ok, and if it turns out a parallel pic, the money is going to be again wasted, as time passes, parallel ports will not be there.

Perhaps what i suggested is few Pennys worth the cost of 2 resistors and few cut & straps mods.
he need not spend at all, hoping that these 2 resistors can be traces in his scrap box.
__________________
Regards,
Sarma.
mvs sarma is offline  
Old 14th January 2008, 06:51 PM   (permalink)
Default

no solution found till now, it seems that the power provided by the serial port is not enough, and i have to build another programmer or a JDM programmer with external power supply.
Does anyone have any suggestion or any schematic
tanilas is offline  
Old 14th January 2008, 06:59 PM   (permalink)
Default

Like has been suggested multiple times in this thread, the P16PRO40 is a far more reliable programmer.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 15th January 2008, 01:42 AM   (permalink)
Default

Have a look at this page. You will find this diagram there,


As you can see this is a JDM with external power supply. The 4 diodes in the middle (D3-D6) aren't required.

Mike.
Pommie is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Quik PIC Programming kit Krumlink General Electronics Chat 5 28th January 2008 12:27 AM
PIC Programming. Joe McGivern Electronic Projects Design/Ideas/Reviews 4 1st December 2007 07:38 AM
Problems switchin relay with PIC Andy1845c General Electronics Chat 5 17th November 2007 07:14 PM
Question about Inchworm+ Quan Micro Controllers 54 28th October 2007 01:21 AM
Programming PIC to generate square wave elec123 Micro Controllers 11 13th October 2007 02:15 PM



All times are GMT. The time now is 12:58 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker