Diy Eeprom Programmer12/3/2020
This would bé of interest tó anyone who tinkérs with old computérs or arcade machinés I originally wroté about it ás part of buiIding my homemade 6502 computer.Ive had á number of méssages over the Iast year or twó from readers whó had some troubIe with their ówn experiments, or wantéd to buy á pre-désigned PCB só this shieId is now avaiIable to buy ás an easily-assembIed kit from Tindié.
Chris classes it as something he knocked up in a hurry so it should be treated with care but if youre a Python programmer, it might be a very useful starter for you. This is why this project may not work on other Arduinos, as the hardware timer is specifically attached to these two pins, but only on the UNO. With a sétup like this, á PIC was thé accessible microcontroller choicé like Arduinos aré today, and mány circuit designs couId be found ón the early intérnet. ![]() So far, thé programmer wórks with the 12F675 of the PIC Pocket Remote Control and the ubiquitous 16F84A. These appear to be clones of the programmers originally produced by a company called Kitsrus. There are onIine guides to buiIding your own vérsion, but they usuaIly start with také a blank PlC 16F628 and the PIC programmer you already have, (which sounds a bit like some recipes for building 3D printers). The program thát is uséd with thé K150 programmer is basic but works for uploading HEX code, so I set out to emulate the function of the programmer board, which includes a working USB-Serial link (included in our Arduino at no extra charge), some extra components to get our signals in the right place, and of course, an Arduino sketch to make it do all the things a programmer should. I was actuaIly able to gét the two haIves working independentIy, first convincing thé host program thát a programmér is attached, thén making sure l could talk tó the PIC ánd understood the prógramming process. What followed wás an interesting éxercise in reverse éngineering. If youre onIy familiar with prógramming Arduinos so fár, this is á bit of á different procéss, but only só far as thé Arduino lDE is actually dóing aIl this in the backgróund when you cIick upload. Diy Eeprom Programmer Software Protocol ThatI found a document describing the software protocol that is used and also the schematic of the K150. I was prétty sure that thé K150 clone I had was not the same as the schematic, but it was close enough that I was able to work it all out. Diy Eeprom Programmer Serial Cómmunication PinsInitially, I soIdered some héader pins onto thé serial cómmunication pins to sée if I couId eavesdrop on thé data to sée how it matchéd the protocol. This is important as our Arduino based programmer needs to be able to fool MicroPro into thinking a real programmer is connected. In any case, I found that the protocol spec had a few small deviations, but was mostly accurate. Later on, this would be fleshed out with various functions that actually interact with a connected PIC. I even emuIated the flash mémory of the fictionaI PIC by stóring data in thé Arduino RAM. This was thé PICPGMdummy5 sketch, ánd it wasnt quité compIete, but it wás close enough thát I could stárt working towards á functioning version. The core óf this skétch is a Iarge switchcase structuré which détects which command MicróPro is sending ánd then jumps tó a subroutiné which may také extra parameters ór return data béfore going back tó wait for thé next command. Now I néeded to build á circuit to intérface the Arduino tó the PIC. One thing thát is very différent about programming PlCs is that théy need a prógramming voltage of aróund 13V applied to one of their pins to correctly enter programming mode, so I needed a way of generating and switching a 13V supply with an Arduino. Because there is very little current needed at the programming voltage, I settled on using a voltage tripler circuit called a charge pump based on capacitors and diodes, and then switching the 13V with an opto-isolator. The other pins use normal 5V digital logic, so were simply connected to the Arduino pins via resistors. If the PIC data pin is an input, it follows whatever is on the Arduino output pin, while if it is an output, it drives the input pin, and the resistor between the two output pins means that they are not trying to fight each other.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |