RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » ATF22V10C Programming w/Arduino
ATF22V10C Programming w/Arduino [message #1362] Sun, 27 November 2016 15:44 Go to next message
Andrew B is currently offline  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 Mad 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 #1363 is a reply to message #1362] Sun, 27 November 2016 16:12 Go to previous messageGo to next message
jcoffman is currently offline  jcoffman
Messages: 332
Registered: October 2015
Senior Member
Andrew,

The ATF22v10 parts have been a source of frustration to me for some time. None of the less expensive programmers seem to support programming them, although many support the ATF16V8 parts.

So far, I've had no trouble programming any Lattice GAL parts.

--John
Re: ATF22V10C Programming w/Arduino [message #1364 is a reply to message #1362] Mon, 28 November 2016 09:57 Go to previous messageGo to next message
gkaufman is currently offline  gkaufman
Messages: 186
Registered: October 2015
Senior Member
Andrew -

Would you like me to program up a batch of the 22V10's for the group?

I have several of the vintage Needham Electronics programmers (EMP-11, EMP-31) that handle any 22V10 I've tried nicely (and quickly).

- Gary
Re: ATF22V10C Programming w/Arduino [message #1365 is a reply to message #1362] Mon, 28 November 2016 10:05 Go to previous messageGo to next message
Andrew B is currently offline  Andrew B
Messages: 467
Registered: October 2015
Location: Near Redmond, WA
Senior Member
Administrator
I think I've got it sorted now, with 75 parts kits spread over 3 groups of people on different forums it didn't feel quite right to ask someone else to program 150 chips.

Also......there might have been a little bit of my stubborn engineer "I will not let this thing defeat me!" going on. Just a little.
Re: ATF22V10C Programming w/Arduino [message #1366 is a reply to message #1365] Mon, 28 November 2016 12:01 Go to previous messageGo to next message
gkaufman is currently offline  gkaufman
Messages: 186
Registered: October 2015
Senior Member
Once you load the file, programming is only a few seconds each, so if you get tired of programming let me know!

I do understand stubborn Smile

=- Gary
Re: ATF22V10C Programming w/Arduino [message #1367 is a reply to message #1362] Mon, 28 November 2016 17:07 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
This surprises me. I have been using the Wellon VP-390 on ATF22v10 (and ATF16V8) with zero problems for quite some time. From what I can see, the software for the VP-390 and the VP-598 is the same.

I am currently using version 4.7 of the software. What version are you using?

-Wayne
Re: ATF22V10C Programming w/Arduino [message #1385 is a reply to message #1367] Tue, 06 December 2016 22:58 Go to previous messageGo to next message
Andrew B is currently offline  Andrew B
Messages: 467
Registered: October 2015
Location: Near Redmond, WA
Senior Member
Administrator
I am also using v4.70. Maybe I have a bad Wellon programmer? It programs the Lattice GAL 16V8 and 22V10 parts fine, as well as ATF16V8's, and the 28C256 EEPROMs. And it properly READS the ATF22V10s, with the correct clock signals, it just drops the clock during WRITING for some reason....

Anyway I took my breadboard circuit and soldered it onto an Arduino protoshield with a nice ZIF socket, and bought a 12V barrel plug adapter to power the Arduino & provide Vpp. It will erase/write/verify the ATF22V10 with no issues:
index.php?t=getfile&id=221&private=0






Re: ATF22V10C Programming w/Arduino [message #1386 is a reply to message #1385] Wed, 07 December 2016 08:54 Go to previous messageGo to next message
Wayne W is currently offline  Wayne W
Messages: 385
Registered: October 2015
Location: Fallbrook, California, US...
Senior Member
Nice!
Re: ATF22V10C Programming w/Arduino [message #1389 is a reply to message #1362] Thu, 08 December 2016 19:31 Go to previous messageGo to next message
hideehoo is currently offline  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 #3272 is a reply to message #1362] Tue, 25 July 2017 17:59 Go to previous messageGo to next message
robertbaruch is currently offline  robertbaruch
Messages: 2
Registered: July 2017
Junior Member
Sorry for reviving this thread -- I got a Wellon VP598 and experienced the same thing, almost. It seemed to program two Atmel 22V10's properly, but then wouldn't program a single one after that. Symptom is the same, it keeps trying but fails to complete programming. Works fine on Lattice 22V10s.
Re: ATF22V10C Programming w/Arduino [message #3273 is a reply to message #1362] Tue, 25 July 2017 18:24 Go to previous messageGo to next message
Andrew B is currently offline  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 Go to previous message
robertbaruch is currently offline  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

Previous Topic: CVDU - Acer V193HD
Next Topic: FS: Northstar Advantage


Current Time: Thu Nov 06 21:33:38 PST 2025

Total time taken to generate the page: 0.02754 seconds