| ATF22V10C Programming w/Arduino [message #1362] |
Sun, 27 November 2016 15:44  |
 |
Andrew B
Messages: 467 Registered: October 2015 Location: Near Redmond, WA
|
Senior Member Administrator |
|
|
In the past I had a $50 EEPROM programmer, an old TOP853. The software/drivers wouldn't work in 64-bit Windows, so I had to run an XP VM inside Linux and forward the USB devices to make it work (or use an old laptop with XP). It also would only program GAL22V10s, not ATF22V10's which have a different programming algorithm.
With the SBC6120 group buy in full swing, and wanting to use the low-current-draw and still in production ATF parts, I decided to buy a new programmer and settled on the Wellon VP598, since it had the most recent software updates of any of the Wellon programmers and the best price:device support ratio.
Imagine my annoyance when the VP598 failed to program the ATF22V10 either It does have a neato 'mass production mode' that will be helpful when programming all the EEPROMs & ATF16V8's, but a no-go on the 22V10s.
I found a handy webpage here where a person spent the time to reverse engineer the ATF22V10 algorithm. Using a logic analyzer I captured what the VP598 was doing when trying to erase and program the chip and found the following:
* Rather than using the simple erase-everything algorithm described (enter programming mode, setup some pins, lower strobe, and the whole chip erases) the VP598 tries to erase the chip by writing all '0s' to it. So right off the bat, Wellon's software is not doing things correctly.
* When programming the chip, the clock signal stops in the middle of the 132 bits of data. So the data is not being clocked in properly by the programmer.
* Reading the chip seemed to be done properly! A nice constant clock and follows what is on the website as far as the algorithm.
Not waiting to be defeated, I pulled out an Arduino and wrote some code to follow the algorithm outlined for programming. 2 days of coding, testing, and bread-boarding and a trip to Frys for some DIP-package relays later and I can program both the IOT1 and IOT2 chips perfectly fine with my homemade programmer and have them read & verify OK on the VP598 and work in the Rev 1.0 SBC6120-RBC board.
The biggest drawback right now is that to save time, I baked the fusemap data into the Arduino sketch as a series of unsigned longs (32-bit integers) which correspond to the 32-bit lines of binary data in the .JED files. So a different sketch has to be uploaded to the Arduino for each chip, and I had to pre-process the .JED files with a Python script to turn them into a list of integers to paste into the Arduino code.
Still I thought this was worth sharing - both as a warning that the latest Wellon software on the VP598 won't program ATF22V10's and to point out a workaround. This was a relatively complicated thing to work out so it got the "yay it works" dance at the end!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: ATF22V10C Programming w/Arduino [message #1389 is a reply to message #1362] |
Thu, 08 December 2016 19:31   |
hideehoo
Messages: 2 Registered: November 2016 Location: Prior Lake, MN
|
Junior Member |
|
|
I love my TL866 but it has trouble programming both GAL22V10's and ATF16V8's even though both are on the supported list. Doesn't even pretend to handle ATF22V10's. Bought a VSpeed VS4000 from AliExpress (~$45) based on the fact that some claimed success with GAL22V10's using the older Genius G540 programmer from the same company. Software is a little funky, but I can report it works fine for both GAL22V10B's and ATF22V10B's under Windows 7 64bit. Also handled ATF16V8's just fine. Confirmed the programming by checking the contents on the TL866 (which reads just fine, just can't program).
Not as cool as building your own, but a low cost option for folks looking for an alternative.
[Updated on: Thu, 08 December 2016 19:32] Report message to a moderator
|
|
|
|
|
|
| Re: ATF22V10C Programming w/Arduino [message #3273 is a reply to message #1362] |
Tue, 25 July 2017 18:24   |
 |
Andrew B
Messages: 467 Registered: October 2015 Location: Near Redmond, WA
|
Senior Member Administrator |
|
|
I wish I had taken screenshots of my logic analyzer while it was trying to program. It's clearly capable of twiddling all the required pins, just the algorithm is wrong. The read-back algorithm works fine! Super annoying.
The Atmel parts use a serial interface for programming where bits get shifted in and out, while the Lattice parts use a row/column style interface where bits are loaded in parallel groups, so I'm not surprised that one would work and the other would fail.
The same unit programs 16V8s and EEPROMs just fine.
I can post my Arduino code, but it's pretty janky (the fuse map is baked into the Arduino code, I wrote a Python script to read the JDEC file and convert it into C constants that get pasted into the sketch).
I did end up programming 120+ ATF22V10s with it, so it's been tested at least.
[Updated on: Tue, 25 July 2017 18:28] Report message to a moderator
|
|
|
|
| Re: ATF22V10C Programming w/Arduino [message #3274 is a reply to message #3272] |
Tue, 25 July 2017 18:54  |
robertbaruch
Messages: 2 Registered: July 2017
|
Junior Member |
|
|
Actually, I had a thought which seems not to have worked out. The adapter I received with the VP598 was for the EU, but I'm in the US, so the plug was totally different. The specs are 9V, 1A, center positive, so I dug around to find a DC adapter that was also center positive, 9V and at least 1A. I found one, and used that. I measured the unloaded output as 13.4V, and I figured that since that was unloaded, it would probably end up at 9V under load. To be fair, my adapter is not a switching adapater, but the big beefy transformer-based kind. The Wellon software did display a warning during initialization:
Warning! Adapter power:DC11.1 V
VCC : 3 V
VPP : 12.1 V
I also checked the self-test to make sure it was outputting the correct voltages, and that was correct.
However, just to eliminate everything, I pulled out my 120/240 converter, plugged the original adapter into that, measured the unloaded output to be 9.3V. This time, during initialization, I got no warning:
Adapter power:DC9.2 V
VCC : 3 V
VPP : 12.2 V
Interesting. So I popped a previously failing Atmel 22V10 chip in, and it was able to program it, no problem. Then I tried a second one. Nope, wouldn't program.
What an awful experience :/
[Updated on: Tue, 25 July 2017 18:54] Report message to a moderator
|
|
|
|