The ICSP might be it.
I use a PICSTART PLUS for ICSP. Just tried a 16F877A.
All works well when the programmer is powered. If I leave the programmer connected with the programmer power off the PIC will not start.
HTH
The ICSP might be it.
I use a PICSTART PLUS for ICSP. Just tried a 16F877A.
All works well when the programmer is powered. If I leave the programmer connected with the programmer power off the PIC will not start.
HTH
Dave
Always wear safety glasses while programming.
Thanks all, I am assimilating your comments and will respondwith code details etc. asap. However we are shortly seeting off for a pre Christmas long weekend in Brussels and senior management is going to get difficult if I am caught at the keyboard much more. Thanks again will be back on line asap
Regards
David
David,
I went through almost the exact same scenario almost two years ago, and after losing a little too much hair I discovered that the problem lay in my epic programmer, the one that uses the printer port. Windows XP was playing havoc with the printer port on occasion. I upgraded to the newer USB programmer from MELABS, and have not had a hardware problems since. I still get the occassional software glitch, but as those are all self inflicted............. Anyway, perhaps someone a little closer to you might offer to program a 16f877 for you, and see if that works. I would be awfully suprised to learn that you have 6 defective chips and three defective development boards, my lab-x boards run continuously, and have never been a problem. The programmer seems to be the only thing that is common to all your problems, as you said you should be able to blink an led without any difficulty.
Jerry.
If your oscilloscope costs more than your car...
Few quick words before heading for the channel tunnel. Built a quick breadboard just the four power supply connection, resonator 1Y pullup on pin 1 and and led on RB7. With the software recommended earlier in this thread ... nothing... except, as once before when using the crystal if I touch pin 13 then the led flashes, trouble is its flash rate doesnt seem to have much to do with the program !! Jerry you could be right about the epic, I seem to recall having problems with it in the past I will look into it when I get back from the Brussels trip.
Cheers everyone
David M
<table><tr><td valign="top">Probably just another stupid question on my part.
But, are you sure the Power Rails are connected across the entire breadboard?</td><td>
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2204&stc=1&d=119758760 2" /></td></tr></table>
DT
i remind some bread board brands have some break in the middle of their +/- line too
Unless you hit the wall or you do a simple continuity test when you buy it, you don't know...
Crystal or Resonator? Some resonator may don't have the built-in cap. 15pF-22pF
Seems weird.. it's more a matter of crystal and capacitance to me.. unless the crystal is defect or totally out of spec... Some 4MHz could be lazy so far.. what happen if you set HS osc mode?
Some may require an external resistor in parrallel.. never meet one of those 'till now.
One thing is sure... when you touch it, you modify capacitance to the OSC line... it speak loud to me.
Last edited by mister_e; - 14th December 2007 at 00:12.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Back in harness after the Brussels trip. The light show in the city square was absolutely fantastic.. bet they weren't using 877's. I have spent another fruitless day finally junking the 877 circuit and deciding to use a 16F 628A which is what successfully controls my smaller Xmas star (which is flashing even as we speak). You kow what the &*(*^)(& 628A didn't work either. I then programmed it with the program which is operating the other star and that doesn't work either. So ..... Jerry it looks as if you may have hit the nail on the head and this wretched EPIC programmer is the cause of the problem. It seems to be programming OK there is certainly hex code there which I can read back and verify OK. Is the Epic programmer really that bad that it can apparently program and verify but still screw up the code in some way. Being retired I am not keen on going out to buy another programmer (they seem to be a hell of a lot dearer now). The only other thing I can think of is that the transformer I am using to power it is inadeque. It is nominal 15 vdc but the multimetwr tells me it is 21.9 volts on no load and drops to 20 when connected to the EPIC
There's a fix for printer port issues and epic.
from melabs download section:
http://www.melabs.com/support/patches.htmStop Windows XP from polling printer port
Windows XP may periodically access printer ports and interrupt the EPIC™ programming process. This can be stopped with a registry entry.
Download the registry entry file below and merge it into your XP registry.
Download XP_stop_polling.reg (1K)
it programmed and verified ok, there's something wrong with the code or hardware, be it config fuses or tris or icsp left connected.
As far as programming and verifying ok, lol, I just had a hell of a time with my led project. thought I fried the pic, programmed and verified perfectly. spent 3 hours only to find I goofed and set the trisa and trisb to 255 (all inputs) oops! inputs aren't going to make anything blink. lol don't they default to inputs if tris isn't set?
my programmer, if left connected puts -7volts on all the pins.. definately not a good idea.
Thought the osc had to be set to intrc to use the internal oscillator, now realise it should be set to XT. Have now written simple program to switch on all port b pins, pause and swithch them off again in an endless loop. The program containsthe line cmcon = 7 can't remember why but I recall having to do this about a year ago when I wrotethe original star program. The osc isset to XT it compiles and produces the attached hex file but fails to flash the ports
David,
If you're using a 20 MHz crystal the oscillator has to be set for HS (High Speed) XT is for a 4 Mhz crystal. I've never used the internal oscillator as all of my projects seem to need serial ports or something that requires better timing.
Dave,
Thanks, I never thought of that!
Jerry.
If your oscilloscope costs more than your car...
Bookmarks