Re: PIC power supply basics
Do a search on PIC programmers - there are plenty of designs documented here. But honestly you'd be far better off to buy a proven programmer before trying to write code and test it with an unknown quantity.
Re: PIC power supply basics
Thank you Charlie
I agree, there are far too many pitfalls for comfort and an entry level, off the shelf unit is cheap, tested and probably comes with instructions and notes on different chips.
Thing is, I am kind of inquisitive and DIY helps me understand things better. It is also about the satisfaction in getting a self-built thing to work. As said, I will eventually buy a programmer -
probably December (bonus month), but not until I at least understand the power supply requirements.
It would help me (and probably some other newbies also) if we can get a discussion going here on the 2 power supplies only. Things like: "Vpp is raised to 12V to put the chip into programming/verification mode.
The chip itself generates the required HV pulse during programming." would be helpful. [comments in quote not necessary factual]
I did some more reading. With the "Vdd first" method, Vdd can have 5V all the time. This leaves only Vpp that requires switching. Brings me back to my first question. Is it possible that these home-brew programmers rely on
a capacitor to smooth out the switched 5V to a continuous voltage, or are they using the Vpp first method?
On my contaption so far (Vpp and Vdd from same comms pin), I can see the LED on Vdd switching during transfer. This does not seem right to me. (Unless it's Vpp first).
So my next step is to hard wire Vdd from an external, regulated 5V. Next, I want to see if I can also use external 12V, switched by the comms port via a transistor to Vpp.
Will have to do some reading to get the transistor circuit right. NPN? PNP? and will BJT rise time be fast enough? Another option I am thinking of is a 4066 or similar bilateral switch. Going to look for datasheets on that now.
Re: PIC power supply basics
Re: PIC power supply basics
Nice toys, Archangel.
I was also inspired by the JDM post. Problem is, I tried to get smart and substituted the zener for a 7805 (have a bunch of those).
Maybe it's better to try the wheel round first before testing if square works!
On that JDM post again. How in the world does he get such a nice PCB using the iron-on process. I was doing that years ago and even started using magazine paper way back as my own idea(now suggested all over).
The color fliers dished out at traffic intersections also work well.
Re: PIC power supply basics
Most so called RS232 serial ports don't put out the presumed 12 Volt supply nowadays.
A programmer that requires it, won't work with a 5 Volt serial port.
A 12 Volt supply can be produced with a buck converter the way that
a max 232 provides a real RS232 serial port for a pic with a 5 Volt supply.
Re: PIC power supply basics
when the PIC microcontroller can operate from a power supply voltage in the range 2 to 6V. The supply voltage in digital in digital electronic circuits is +5v and this is the voltage with which the PIC microcontrollers are mostly operated. and it is not possible to obtain 5v using standard batteries only. which gives 4.5v and this is not enough to power logic circuits. Thanks!!!!!!!
Re: PIC power supply basics
I got my programmer to work. It is the David Tait classic printer port programmer. I am using an ATX computer power supply which is common ground for 5V & 12V.
Both voltages are switched by the programmer using small PNP switching transistors. These are then inverted in the software setup to supply VDD & VPP.
Probably because of the common ground, I found by trial & error that I had to move the 2X series diodes from PS ground to PS 12V. I am not sure that these are needed in my setup, but it works so no changes for now.
I have done about 8 program runs and had no failures.
Last program was a "LED walk" from PORTC-0 to PORTC-6 which I adapted from a PORTC-0 flash asm program.
It programmed first time fine. Only worked from second time due to code bug. For some reason the BTFSC & BTFSS commands works inversely to my logic!