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.

ICSP Programming 16F877A w/ Velleman Programmer

Status
Not open for further replies.
BTW, would you care to explain why are all those components necessary

Only three parts, 2 C's one R!:)
The design of the K8048 is not so sofisticated.
However to my opinion it is a good design for reasonable costs and most important it works.
Even read some comments where some guys programmed the 18fxxx pics with it.

Most people are connecting the ICSP with some flatcable.
If you notice the layout of the K8048 ICSP you see that the PGD and PGC lines are situated side by side.
This means there could be some cross-over talk between these lines during programming or verify mode.
The other reason is if you monitor the lines on an oscilloscope you see there is some disturbance and HF radiation on those pins at the moment you connect them to the chip. The longer the lines the more disturbance and noise appears.
A simple RC low pass filter on the PGC line and some HF reducing with the C at pin 40 PGD reduces the noise and HF spikes on the lines to almost zero.
In first instance I tried it with condensators of 33 pF , no result.
Then 100 pF it gave better results but not 100% success.
So now I'm trying with 150 pF and till now no problems anymore.
Even some longer ICSP wires are maybe possible now. (I haven't tried that)

:D My experience with this kind of chips is that you hardly can't distroy them.
One certain way of destroying them is to change the power supply Vdd/Vss.
100% certain they are destroyed after that.:eek:
Prevent this with a diode over the supply lines of the pic chip.
I alway put a diode over the powerlines on my breadboard and feed the chips out of a 7805 regulator.
Also a reverse diode over the in and output of the 7805 is advisable to prevent the 7805 for a higher output voltage then input voltage. This may occur in some situation where the Vpp 13 V program voltage comes over the 5V supply lines by accident.
The 7805 regulator is not happy with that and blows.

Success!

grtz
Arnoud
 
Since you have already got an 16F628A, you should really try to do an ICSP on a 16F628A to see if the problem is the 877A PIC or the ICSP cabling.
 
eblc1388 said:
Since you have already got an 16F628A, you should really try to do an ICSP on a 16F628A to see if the problem is the 877A PIC or the ICSP cabling.

Well...
I'm unable to even read a 16F628A using the ICSP... Pluging the PIC in the board socket works fine. So this leads me to conclude that the problem is with ICSP.

I don't have the components here (150pf) to test the filter, but I'll acquire them tomorrow and then test it...

Cheers!

Hugo Ferreira
 
i guess ya just need someone to word it just the right way before it sinks in
 
Last edited:
Actually i said in post nº 2:

"I can program a 16F627 and 16F628A using the provided sockets. I will experiment programming a 16F628A using the ICSP..."

But only now I'm at home, and have the 628A available :p

Anyway, thx for the help...

Hugo
 
bytter said:
Well...
I'm unable to even read a 16F628A using the ICSP... Pluging the PIC in the board socket works fine.

If the PIC works in the sockets but not ICSP, troubleshoot as follows:

1. No power to the programmer or PIC is required for the following checks.

2. Plug the ICSP cable into the ICSP socket on programmer

3. Set the programmer board switch as you are going to perform ICSP

4. Measure resistance between end of ICSP cable and programmer board 18-pin socket, all resistance values should be virtually zero.

a. MCLR/VPP wire and socket pin 4
b. Vdd wire and socket pin 14
c. Vss wire and socket pin 5
d. PGD wire and socket pin 13
e. PGC wire and socket pin 12

5. Is your ICSP cable longer than 30cm, if so, you needs to shorten it.
 
eblc1388 said:
5. Is your ICSP cable longer than 30cm, if so, you needs to shorten it.
another advantage of my SPI interface board/ pic programmer is i can program a pic from ten feet away, thats how long the cable is
 
ive build an icsp for the borrowed wilem programmer i have ( signals from 18 dip >icsp ) on their forum i asked about it and came on the faq page of
winpic .


https://www.qsl.net/dl4yhf/winpic/index.htm#adapt_18F2x5x

i used the 18>28 numbers and the 877A data sheet

add a 22 pf from your programing lines to ground
(pin 40 and 39 )
connect all gnd
same for vcc


ive sucsesfully used it with willem programmer
stil have to try it with my velleman programmer but in theorie the 18dip
should have the same signals as the vellemans

ill try it later today and let it know if im able to get 877a programed ( reading was never a problem before )

update
used 18 pin dip + osc jumpers
winpic with vellemanxx.ini
reading verifing an existing program no problem
bulk earase reprogram no problemo :)
 
Last edited:
thinking about it, have you checked the solder joints of the ICSP header?

by the way willi, does your SPI interface board have an ICSP header on it? I don't see how you mangage to get away with a 10ft ICSP cable.
 
philba said:
by the way willi, does your SPI interface board have an ICSP header on it? I don't see how you mangage to get away with a 10ft ICSP cable.

You have to understand the reason for the lead length problems, it's because of the open-collector drivers used - so it relies on the pull-up resistor to pull the line high. The capacitance of the longer cable slows this down, but by using an active driver (rather than the passive pull-up) you can greatly extend the length of the cable.
 
philba said:
thinking about it, have you checked the solder joints of the ICSP header?

by the way willi, does your SPI interface board have an ICSP header on it? I don't see how you mangage to get away with a 10ft ICSP cable.
Of course , actually i have a DB 25 at the end of the cable , this plugs into my breadboard.
i was just looking at the signals last night comming from the SPI/ programmer board , i set it to run full blast by taking out the delays at the beginning of the program
and turned RB7 and RB6 individually they both ran at 3.4uS / one period , with a really nice square wave
although one had a little ringing on the negetive going edge at the bottom (just a tad) but nothing to worry about
 
Last edited:
My solution was to shorten the ICSP wires to the 16f877A to aprox. 20 cm.
AND apply a 150 pF condensator from the RB7/PGD wire to ground
AND apply a 100 ohm resistor in the RB6/PGC wire with a 150 pF condensator at the chip side of the resistor to ground (low pass filtering PGC)

I changed the capacitor in the RB6/PGC line to the Velleman ICSP side of the resistor.
I'm able to read the 16F877A now.:D

I tested the Velleman software version 2.6.0 in linux/wine (I'm using Fedora Core 4 on a Asus dual core centrino T2300 laptop with a sitecom USB/RS232 convertor).
This software is working great with the 16F877A ICSP and filtering.:D

It appears that the earlier mentioned Linux software
**broken link removed**
has timing problems with the read/verify function and generates verify errors reading/verifying the 16F877A.:(
Programming and verifying the 16F627 was ok with this software, so the problem are the new 16F877A routines in this software I suppose.
(On the website they say the 16F877A is newly added and under test. Last update 2005:( )

grtz
Arnoud
 
Hey!

I was out of town for a couple of days, so was only able to try the solution today.

Anyway, I applied a capacitor of 150pf between PGC and GND, and *bang*, it worked :D I can now read, write and verify... All works like a charm...

So, thx :D

I also received my ATMega32 (since I was becoming frustrated with PICs). I've been looking at their IDE and at GCC compiler, and it looks very promising. I'll have to play with it so I can decide which one I'll be sticking with ;)

Cheers and thx!

Hugo Ferreira
 
bytter said:
I also received my ATMega32 (since I was becoming frustrated with PICs).

Wait till you find out more.

Isn't you who posted a similar thread regarding problems connecting a programmer to AVR?
 
bytter said:
Do you mean that I'll become increasingly frustrated with PICs? :D

No, it refers to programming the AVR using a programmer. Or should I say, the finer points of AVR configuration fuses settings.

But rest assure that the datasheet covers all aspects of that, if one has the time to do a throughout study.
 
I have had the same problem with the Vellaman programmer, I have just noticed that there are '2' pins on the 877A that control the LVP as noted in one of the earlier posts, I am going to try this myself later.

JMKnox

Eagledream said:
Furthermore in case of a brand new 16f877A (LVP is enabled by default) connect pins 36 RB3/16PGM and 38 RB5/18PGM to ground with two 10k resistors.
This is necessary only at first time HV programming. Put LVP_off in the config word and disable code protection in the config word.
 
Status
Not open for further replies.

Latest threads

Back
Top