You are on page 1of 4

Hack-a-day contest entry

This PIC/EEPROM programmer is so simple and small it fits on a business card with enough room left for assembly instructions... Project: imple !"M# style PIC IC P programmer $on a business card%. * all through hole * * less than 2USD worth of parts (in 1s and 2s!) * * easy single sided construction at home (with 3 jumpers) * * enough room left for assem ly instructions * * e!tra space on the ac" for e#en more usiness$cardy goodness * * also programs%reads serial &&'()*S * Description: +nyone can uild this simple programmer and learn a out ',- microcontrollers. /he 0D*2 programmer is super simple (a out 11 parts)2 ut programs a huge #ariety of ',-S and serial &&'()*s. ,3#e programmed e#erything from an 4 pin 125627 to a new 1458991 US: ',- with the 0D*2. /his programmer has an ,-S' interface2 meaning it can program ',-s and read &&'()*s while they are attached to a circuit oard. Start your hac"ing! /he '-: can e made single sided (with three jumper wires)2 ut a two layer design ma"es assem ly e#en easier. +ll the traces are nice and fat for easy toner$transfer or photo$process at home. /he 0D*2 design is ;uite old2 the original 0D*2 circuit can e found here< http<%%www.jdm.homepage.d"%newpic.htm /his design stays true to the old schematic2 ut the diode num ering now starts at 12 rather than 2. Skill level: &asy% eginner. Assembly time: + out an hour. BOM: 'art =alue Description

-1 111u5 electrolytic capacitor -2 22u5 tantalum capacitor D1 4.2= >ener diode D2 9.1= >ener diode D3282926 1?8184 diode @122 :-98A: transistor$npn (1 11B resistor (2 1.9B resistor S=1 9 pin header pin header (or female pin header2 you choose) C1 D:7 female serial connector

Assembly: Start from the ottom and wor" up< Don3t forget to egin with the jumper wires if you are using a single sided '-:. 1)Solder the diodes and resistors. :e sure the lac" and on the diodes is oriented in the same direction shown on the oard%in the schematic. 2)?e!t2 add the transistors. 3)5inish the oard y soldering the tallest components< the capacitors2 pin header2 and D:7 soc"et. Software: /he programmer will wor" with any programming software that supports the 0D*2. , li"e Din'ic411 EF,?B<http<%%perso.wanadoo.es%sisco f%winpic411.htm G ecause it can auto$detect many ',-s. Din',- also deser#es credit for the great technical support info EF,?B<http<%%www.;sl.net%dl8yhf%winpic% G. :oth support the newest US: ',-s (1452%8899). ,-'rog does many ',-s2 as well as &&'()*s2 ut has not een updated in awhile Ehttp<%%www.ic$prog.com% G. se: Efrom my ,-S' instructa le here< http<%%www.instructa les.com%id%&24HI181?A&S1A9D6,%J +FFS/&'SK G &nderstanding IC P for PIC Microcontrollers 'rogramming microcontrollers isn3t hard. :uilding a programmer ma"es a great first electronics project. /he goal of this section is to e!plain the simple 3,n -ircuit Serial 'rogramming3 method used with *icrochip ',-s. 'hy IC P( 'rogramming a ig D,' (through hole) chip is easy. 'op it into a soc"eted programmer2 urn2 and return to the application circuit. /est and repeat. /hings get more difficult with smaller (surface mount) chips. /here are no standard soc"ets for @5?2 SS)'2 @5'2 or e#en the large S),- .311 pac"ages. /here are really e!pensi#e (L111s) clips that can attach to2 and program2 these chips. + different clip is needed for each chip type and pin count you use. /here is an alternati#e. ,ts called ,-S'. ,-S' means 3in circuit serial programmer(ingJ)3. ,t is a way of programming a ',- while it is still attached to the application circuit. /hats right2 no more chip swapping. So2 why is ,-S' a good thingJ 1. /here are no programming soc"ets for small pac"age chips. -lips are e!pensi#e. 2. ,ts a pain to mo#e chips in M out of the programmer during de#elopment. ,mpossi le for surface mount parts. 'hat is IC P( 5i#e connections are needed to program a ',- while attached to an application circuit. , add a 9 pin header to my circuit oards to ma"e this connection ;uic" and easy. /he asics of ',- programming. 5i#e connections are re;uired to program a ',-. 'ower2 ground2 a programming #oltage2 cloc"2 and data.

N (=dd)%$(=ss) /hese are the power M ground connections (=dd2 =ss). 'retty standard. ,f you are using a programmer with 3real3 #oltage le#els (?)/ a 0D*2!)2 your application can run from its own power supply when programmed2 eliminating these connections. =pp /his is the programming #oltage. ',-s enter programming mode when O13 #olts are placed on the *-F(%=pp pin (usually pin 1 on modern ',-s2 more on that elow). -loc"%Data or 'P-%'PD /he cloc" and data lines are used to write and read the ',- firmware. /hese are sometimes the same pins as ')(/:6 M ')(/:A. ,f the ',- fits2 wear it. , get a lot of ;uestions a out my 0D*2 design on instructa les. /he most fre;uent is QDill it program ',- CJ3Q3 $ here is how you can tell< 1) Foo" at the data sheet. 5ind the 3'in Diagram3. 2) ,dentify the location of the pins that must e connected for programming (=pp2 =dd2 =ss2 Data2 M -loc"). 3) Foo" at the soc"et connection on the programmer. -an you match the re;uired pins with a soc"et on the programmerJ )ow do I* um* IC P( Depending on your design2 you can now ma"e all the re;uired connections and program your ',-. /here are a few catches that you should "now a out. Design for ,-S' is important. *icrochip pro#ides a nice 'D5 application note a out designing for ,-S'. http<%%www.microchip.com%stellent%idcplgJ ,dcSer#iceRSSSP&/S'+P&Mnode,dR1428MappnoteRen111A88 Iere are some tips and e!amples of ,-S' designs from my pre#ious instructa les. /ip K12 /hreat le#el< ,mportant Don3t connect anything else to the -F)-B and D+/+ pins (usually (:6 M (:A2 'P- M 'PD). 0ust don3t do it. /here are situations where #ery cle#er engineering types get away with it2 ut don3t do it. /he components attached to the pins will s"ew the cloc" and data signals2 resulting in unpredicta le programming. +dditionally2 if you e#er want to use an in$circuit serial de ugger2 you can3t. 0ust don3t do it. /ip K2 /hreat le#el< &!plosi#e +lways use a diode etween the programming #oltage and system #oltage. ,f using *-F( (master clear) on a ',- you must pro#ide some #oltage on the *-F( pin through a 11Bish resistor. /his is also the pin to which you will apply O13 #olts to enter programming mode. , put a 1n8184 (e;ui#alent) diode etween the resistor and *-F(%=pp pin. /his "eeps the programming #oltage on the =pp pin2 pre#enting destruction of other components on your oard. /ip K3 /hreat le#el< (re)tired Fow #oltage programming is holding you ac"2 man. , ha#e ne#er een successful with F='. , ha#e ne#er seen it wor" (consistently) with my own eyes. 0ust ite the ullet and spend L2 to uild a 0D*2 programmer.

/ip K8 /hreat le#el< ugh! 0D*2 style programmers need a 3real3 rs$232 le#el signal from your serial port. Some laptops ha#e cheap *+C212 (or similar) rs$232 trancei#ers that only reach 11 #olts2 these will usually not wor". Some US:$TSerial con#erters also contain cheap rs$232 trancei#ers. ,f you3re using any of the a o#e2 and can3t program2 this is the li"ely cause. IC P programmers ,-S' does not re;uire a different programming protocol. + soc"et$ ased programmer already produces the re;uired signaling2 ut sends it to the soc"et rather than through wires. *ost soc"et programmers can e used as an ,-S' y rigging wires from the soc"et to the application circuit. 5or e!ample2 the original 0D*2 programmer (here< http<%%www.jdm.homepage.d"%newpic.htm ) can e used to do ,-S' programming y ringing the 9 re;uired signals to a header. /his can e seen in the programmer here< http<%%www. el>a.c>%digital%jdm.htm . Similarly2 my updated 0D*2 programmer (here< http<%%www.instructa les.com%id%&?24BHDDU=&'246P(,% ) can e used for ,-S' y stic"ing wires into the D,' soc"ets and connecting them to the target ',-. *****0D*2s use fun"y #oltages...connect it to the circuit D,/I)U/ e!ternal power (even !ro"nd#) connected to the application circuit. (emo#e the ,-S' connections efore applying power. 5ailure to do this is not destructi#e2 ut will result in failed programming******* +nother option is a (semi$)proper ,-D programmer. ,-D allows you to control firmware e!ecution on your ',- y setting rea" points in the code or reading out memory and port #alues. +n ,-D can also animate the e!ecution of code2 power the application circuit2 and program the ',-. ,t does all this through the same 9 pin ,-S' connection we ha#e discussed. Se#eral ,-S' clones that you can ma"e yourself can e seen here< http<%%www.icd2clone.com%wi"i%*ainS'age .

You might also like