Main page...           Popular tags: Linux (8), Hack (7), DIY (4), Debian (4), Electronics (4), Other (4), Retrocomputing (3), Curiosities (1)


Programming PICs with Willem Programmer

2016-08-31 22:52:31,  In: DIY, Electronics

After replacing laser I needed a Modchip for my 20-year-old PS1 console. Following the "DIY" principle I downloaded an archive from Eurasia.nu with dumps of MultiMode 3 mod chip for PIC12F629. It contains even source code! I obtained a blank PIC chip and tried to program it in Willem programmer PCB v. 3. Of course Willem has no support for them. But it is still possible to write to the chip.
The first rule when programming PICs in Willem is to avoid Willem software. It is not well prepared for programming PICs. First of all, PICs have not only configuration bits (like AVR's Fusebits), but also factory-configured last 16-bit word called OSCCAL word. This word is used to calibrate internal RC oscillator and is set separately for each chip in factory, where RC characteristics are verified against real timing. So to program a PIC, you have to read it first, get OSCCAL value and program a new dump with old value good for the particular chip you have in programmer. It's really easy to erase OSCCAL with Willem software, especially 0.97 versions line.
The alternative software is called IC-Prog and can be downloaded in IC-Prog Website. In Windows 9x it will run out of the box. In Windows XP, you may need the driver called UserPort made by Thomas Franzon to make parallel port easily accessible from software which use direct hardware access. Launch the IC-Prog. First, click the plug icon and select "WILLEPRO" programmer, give it a nice delay (4-8) to coexist with programs running in background like Antivirus or drive emulators. WILLEPRO is a Willem programmer compatible up to PCB 3.0. Select parallel port you have connected programmer in and don't select any inversion checkboxes. Now you are ready to configure Willem board to use ICSP:

->All DIP Switches turned OFF.
-> Three jumpers (two near socket, one near switches block) as for reading ordinary EPROM (e.g. 27256)
-> Vpp to 12.5V... at first...

Now insert the chip. Ignore hints potentially given by IC-Prog and insert it in 18-pin DIP socket for PIC programming, with pin 1 corresponding to pin 1 of socket (notches match). Exactly opposite to method EPROMs are usually inserted to the main socket (where ends opposite to notch must match). Alternatively you may use ICSP header, connecting its pins to the proper pins in PIC. The pinout is following:
1 - Vpp
2 - Vcc
3 - GND
4 - Data (ICSPDAT)
5 - Clock (ICSPCLK)

In a typical Willem PCB3 board pin 1 of ICSP header is located closer to Vcc selection jumpers.
Select the proper chip from the combo box on the right. Now the first thing is to read chip and check last 16-bit word in Program Code dump hex view. If it is 3FFF, it means that chip haven't been read properly and it's needed to correct something. In my case I found that this small PIC chip starts to terribly drain Vpp when turned on, so it was needed to increase Vpp to 15V and Vcc to 5.5V or it was not reading at all, giving entire read of 3FFF.
Now load the HEX dump, look for change of configuration bits on the right panel of IC-Prog window. Verify it with documentation if you have any and click the lightning icon to write the file into chip.
Program will read the chip to get OSCCAL, then ask should it use calibration word from file. Answer NO to preserve factory-set calibration and it will write program area, then Flash memory area and configuration. After writing, it will verify. Now remove the chip, wait a minute, insert and verify again. I found that if Vpp is unstable contents may just disappear in few seconds after programming!
My chip has programmed well and is working.

After installation I was thinking about all this retro market. Many old console games come back, but none of them in original form, which usually was some kind of media (doesn't matter MO disc, CD, cartridge or downloadable file) containing a full game. This is a typical marketing extension for "monetizing" not only content and items, but every aspect of a game. So if you think that using modchips with retro hardware is not morally OK, think that no company would replace Your damaged CD with shooter game without making you pay for each shot in a new, "better" version.


Older post...       Main page       Newer post...