Skip to main content

PIC PROGRAMMER

PIC Programmer Circuit diagram

Following uJDM PIC programmer  circuit is a circuit which is suitable to do simple pic16f84, pic16f84A, 16c84, 16f628 group programmer.
pic16f84-16f84a-16c84-16f628-programmer circuit
PARTS LIST
R1
10KΩ
R2
3.3KΩ
R3
15KΩ
C1
100µF 16V
D1
LED
Z1
5.1V Zener
Q1
BC547
PIC
PIC16F84,PIC16F84A, 16C84, 16F628
Rs232
RS232 Femail Connector
IC Base
18 pin ic base for PIC

BC547  Transistor Pin Configuration
·                 Using IC base for PIC
·                 Connect the PIC programmer to 1st or 2nd COM PORT of computer by using RS232 wire.
·                 USE MPLAB AND IC-PROG (or any ic programming software) to program PIC with this PIC Programmer.
PIC16F84A  Microcontroller
PIC16F84A Micro Controller

PIC PROGRAMMER

PIC 16F84A Programmer

Bootloading

There is one other way of programing a pic device and this is using a piece of software called a bootloader. This method is only usable on the newer devices that can re-program parts of their own FLASH memory.
It is a small program that typically monitors the USART receive data line (RX) and activates itself if there is any activity on this line within a set time period after reset e.g. one second from power up.
When activated it accepts data from the Rx line using it to program the rest of the FLASH memory i.e. it does not overwrite itself. When all data has been loaded and programmed it starts up the new program or boots (starts up) and loads hence Bootloader.
Interestingly it is called a bootloader referring to a legend about Baron Münchhausen who was able to pull himself up by his boot straps; an impossible task. The process of booting (bootstrapping or starting a system) also seems like an impossible task if you ask the question how can I load and start my program if there is no program in the device to load and start my program!
The answer is that you use a simple piece of software to load the more complex one. This simple program then transfers control to the new program. In a PC this is the BIOS bootstrap code. For the PIC micro you program the bootloader code using a standard pic programmer.

Why use a bootloader ?

Since you need a normal pic programmer (or High Volt programmer) to get the bootloader into the microcontroller in the first place why bother with it?...
Answer 1: It is faster than serial programming using ICSP.
Answer 2: You can load code into a fully built system.
The bootloader lets you use any interface (depending on how you program the microcontroller) to load code. Its main use is in finished equipment where software updates are needed (without opening the box up and plugging in a pic programmer). Equipment that normally uses an RS232 port could be bootloaded through that port. All you would need is a serial cable and hyperterminal (available in Windows).
Note: Bootloading is not limited to any specific interface - you could bootload over a network interface or an infrared IRDA interface.

Advantage of Bootloader

  • No programming hardware - simple programming.

Disadvantage of Bootloader

  • Uses up some resources - less Flash memory available for main program.
  • You have to use a microcontroller that can re-program its own flash memory

There are tons of pic programmer circuits.

This is a list of some of the programmers available as circuits that you can search for on the web.
  • JDM Programmer
  • Conquest programmer
  • TAFE Programmer
  • TAIT 'Classic' Programmer
  • Parallel TAIT programmer
  • Fun-card Programmer
  • SCHAER Programmer
  • ProPic II Programmer
  • STK200 Programmer
  • AN589 Programmer
  • WILLEPRO Programmer
  • Fluffy2 Programmer
  • DL2TM Programmer
  • ER1400 Programmer
The above list shows programmer types supported by
ICPROG
[opens new window]

There are many more circuits! but - they all do more or less the same thing!

What you really need in a programmer.

There are several elements to a programmer but the most important is the ICSP connection.
Possible programmer features...
  • ICSP connection.
  • Stand alone programmer - DIL socket.
  • Stand alone programmer - ZIF socket.
  • Serial port powered.
  • USB port powered.
  • Power brick powered.
NOTE
·         Don't buy a Serial port powered programmer if you use a laptop as its output power may not be good enough to operate the programmer (laptops like to make power savings to save their batteries!).
Some also use only +/-5V outputs as this level is still within the RS232 standard (although it will not work over large distances). The minimum high and low voltage for receiving RS232 is +/- 3V (normally the transmitter generates +/- 12V). The manufacturers get away with this as most uses of RS232 are short distances on the desk. For a programmer it means there may not be enough voltage to create the 13V for the Vpp signal!
Note: If you want to program chips by removing them from the target board you will want a stand alone programmer. To save money you could buy one with a DIL socket - just make sure to remove the chip using a chip extractor and not your fingers and thumb otherwise you may end up using your thumb as a rather nice pin cushion - believe me it hurts. Perhaps the ZIF (Zero Insertion Force) socket is a better choice!
If you have not got a chip extractor then use a screwdriver - alternately lever up each end of the chip - don't just lever one end up as you will bend all the pins at the other end.
The single most important feature you need in a pic programmer is the pic ICSP connection.

ICSP - In Circuit Serial Programmer.

This is a set of connections that let you program the pic microcontroller while it is in your circuit - there is no need to remove the chip just program it.
This is the most convenient way of developing a prototype (apart from bootloading - seen earlier) as all of the hardware once connected is just left as it is on the bench i.e. no removing of chips between programmer and prototype.
You can also connect the ICSP wires to a solderless plug block breadboard so this is also quite an easy way to develop circuitry but be careful where the Vpp wire is placed (13V) - not all the pins can withstand this voltage so make sure it is at the MCLR pin.
If you buy a programmer with just ICSP then you can program most PIC devices.
Usual connections for ICSP:
  • VPP - Programming voltage (usually 13V).
  • VDD - POWER (usually 5V).
  • VSS - GROUND.
  • PGD - DATA usual port and connection RB7.
  • PGC - CLOCK usual port and connection RB6.
  • PGM - LVP ENABLE usual port and connection RB3.
For more details on ICSP click here.

Build your own parallel port programmer.

To be honest I got fed up with the amount of circuits available as there are so many to look at and I also wanted something that was going to work. I decided to follow the one recommended by microchip themselves. It follows the AN589 application and gives you a programmer with an ICSP output connection.
Note: Not all the controls from the parallel port for this circuit are used by ICPROG - but this does not matter. It performs well if you add a transmission line terminator - a capacitor and resistor!.
See the following link for building your own parallel port programmer circuit including the transmission line terminator which allows it to work using a six foot parallel port cable.

Recommendations

If you want to build your own pic programmer and have a PC with a spare parallel port then use a parallel port programmer. This is the easiest route as it is the programmer that is most likely to work and it's easy to debug.
If you do not want to build your own then the preferred programmers are parallel port or USB port programmers. With Serial port programmers (based on JDM types) there is a chance they won't work fully depending on your PC hardware.
Always choose a pic programmer with an ICSP connection.

Comments

Popular posts from this blog

CCNA3 v4.0 Final Exam Answers Updated 2013 100%

1. Refer to the exhibit. A network administrator needs to add IP phones to the network. To which devices should the IP phones connect? AS1 and AS2 DS1 and DS2 DS1, DS2, and CS1 AS1, AS2, DS1, and DS2 2. Which CLI mode allows users to access all device commands, such as those used for configuration, management, and troubleshooting? user EXEC mode privileged EXEC mode global configuration mode interface configuration mode 3. Refer to the exhibit. Which Spanning Tree Protocol version is in effect? Per VLAN Spanning Tree (PVST) Per VLAN Spanning Tree + (PVST+) Common Spanning Tree (CST) Rapid Spanning Tree Protocol (RSTP) Multiple Spanning Tree Protocol (MSTP) 4. Refer to the exhibit. A network administrator has segmented the network into two VLANs and configured Router1 for inter-VLAN routing. A test of the network, however, shows that hosts on each VLAN can only access local resources and not resources on the other VLAN. What is the most likely cause of this pr

CCNA 2 EROUTING version 4 2013 FINAL EXAM ANSWERS 100%

CCNA 2 Final Exam 2013 v 4   1. Refer to the exhibit. A network engineer removes a new router from the shipping container and powers on the router to ensure it passes POST. Which port would the engineer use to perform the initial configuration? AUX console FE0/0 FE0/1 2. What is the purpose of the TTL field within an IP packet header? clears an unreachable route from the routing table after the invalid timer expires prevents regular update messages from inappropriately reinstating a route that may have gone bad removes an unreachable route from the routing table after the flush timer expires limits the period of time or number of hops a packet can traverse through the network before it should be discarded used to mark the route as unreachable in a routing update that is sent to other routers 3. When would the network administrator use the ip bandwidth-percent eigrp as-number percent command? when there is a low bandwidth connection when the connec

CCNA3 v3.0 Final Exam Answers Updated 2013 100%

1. Refer to the exhibit. The Layer 2 switching design that is shown has been implemented in a campus environment that is using Spanning Tree Protocol. All inter-switch links that are shown are trunks. Whenever an inter-switch link fails, the network takes nearly a minute to completely converge. How can the convergence time be reduced? Increase the capacity of the distribution and core trunk links to 10 Gb/s. Add a trunk link that directly connects D1 and D2. Use Layer 3 switching on the core switch. Implement Rapid Spanning Tree Protocol 2. Refer to the exhibit. R1 is configured for traditional inter-VLAN routing. R1 can ping computer 3 but cannot ping computer 1. What is a possible cause for this failure? S1 port Fa0/11 is in the wrong VLAN. R1 does not have an active routing protocol. The IP address of computer 1 is in the wrong logical network. Router interface Fa0/0 has the wrong trunk encapsulation type configured. 3. Refer to the exhibit. What will allow a h