Page 3 of 3

Re: Starting with ATMEL CPLDs: ATF1504AS

Posted: Mon Sep 07, 2015 6:36 pm
by banedon
BigDumbDinosaur wrote:
banedon wrote:
Which software and do you normally use with ATF1504AS?
I've never used JTAG apart form to rescue an AVR using my AVR Dragon.
Looking at this link, it seems that yoiu have to purchase an ISP JTAG USB cable and use WinCUPL?
I don't think my AVR Dragon will work with JTAG with this chip as the Dragon is almost certainly for AVRs only (unless someone has tried this already and found it works?).
Atmel has a stand-alone program called AtmelISP, which I obtained from their website (ZIP file attached). My connection is through a Centronics port, using the adapter assembly that they sell as part of their ATF15xx-DK3 kit. I'm going to take a shot at reverse-engineering the adapter and will post any results.
Fantastic - thanks BDD. I'd really like to get into us CPLDs, but am struggling with knowing even the basics at the moment.
Found the kit on Mouser. It's affordable, although I'd prefer not to spend £110 + VAT if I can help it :).

Re: Starting with ATMEL CPLDs: ATF1504AS

Posted: Mon Sep 07, 2015 6:57 pm
by BigDumbDinosaur
banedon wrote:
Fantastic - thanks BDD. I'd really like to get into us CPLDs, but am struggling with knowing even the basics at the moment.

Found the kit on Mouser. It's affordable, although I'd prefer not to spend £110 + VAT if I can help it :).
The handy thing about the kit is that you can test your code before you even put the CPLD into the target device. There are blinkenlights, plus a 7-seg LED readout, jumpers for different I/O voltages, a built-in clock generator, pushbuttons, etc.

The kit ships with some TQFP CPLDs, as well as the matching adapter socket. Other adapter sockets can be separately purchased (I have the PLCC84 one and the PLCC44 one is on order). As the ATF1504AS is PLCC44 and I currently don't have an adapter for it I included a JTAG port on POC V2. The delivery date for the adapter keeps getting pushed back and who knows when I'll receive it. :evil:

P.S. I managed to open the case of the Centronics port JTAG adapter that came with the kit so I could examine the PCB. Lo and behold, it's all dinky surface-mount stuff and all but impossible for me to read anything. :cry:

However...I also learned that the Altera Byte-Blaster MV and Byte-Blaster 2 adapter cables are compatible with Atmel ISP. I seem to recall that schematics for the Byte-Blaster cables are around somewhere. So maybe you might not have to spend that £110 + VAT, especially the VAT. :D

Re: Starting with ATMEL CPLDs: ATF1504AS

Posted: Mon Sep 07, 2015 7:38 pm
by cbscpe
Ok BDD said most things already. Just some additional remarks.

I only bought the USB JTAG Cable ATDH1150USB cable from Kanda(http://www.kanda.com/products/Kanda/ATDH1150USB-K.html). It's only 60USD (or 53 Euros) plus shipping and VAT. I bought it from Kanda because at the moment I bought one it was the only place that showed it in stock. You don't need more. I highly recommend the USB cable as parallel interfaces are rare and in Windows versions more recent than XP you need special DLLs to allow AtmelISP to write directly to the printer port. Not really future proof. I did not regret to have bought the original USB download cable and it was real fun to learn about CPLDs.

If the Dragon supports CPLDs or not I can't tell you, I have no Dragon and I did not find any hint in the Manual either. My guess is it does not, although electrically and technically it should work, but the firmware probably is not aware of the CPLDs.

The kit is more a toy than really useful. I started directly using the CPLDs on a breadboard using some ATF1504AS in PLCC44 and the following adapter http://www.futurlec.com/PLCC_Adapters.shtml. These adapters are rather clumsy but functional. The adapters mentioned by TomC in this thread use much less real-estate, e.g. the PLCC84 adapter http://www.technologicalarts.ca/shop/st ... 4-pin.html fits a breadboard much better. But soon afterwards I started to use ATF1504AS in TQFP-44 together with the adapters shown in this thread as well. And that's what I mainly use now.

As for the software. I create all designs in WinCUPL. A good introduction to CUPL is this document http://ee-classes.usc.edu/ee459/library ... erence.pdf. But also the design examples that come together with WinCUPL. I you want I can send you some design files I made to get an idea what you can do or not, one design file implements almost all the glue of a Apple IIe, and is used in a project I'm currently working on. Almost in this case is because the TQFP-44 has not enough pins. I searched a lot for more accurate documentation for WinCUPL but without any success. Everything I know now is from this reference manual and from many other places that explain how to use WinCUPL and the samples that come along with the software.

Once you have created your design and have specified the correct device (type and case) you can compile it and you should get a .jed (JEDEC) file and a .fit (Fitter) report. Then you use AtmelISP to download the JEDEC file via the JTAG interface. In AtmelISP you first need to create a .chn (chain) file and then execute it. A chain file just is a description what devices you have in your JTAG chain (normally only 1 :wink: ) and what type (ATF1504AS) it is and what you want to do with it (Program/Verify) and what JEDEC file you want to download. The rest I always use the defaults.

Anything you don't know, just ask, perhaps I know the answer.

cheers

Peter

Re: Starting with ATMEL CPLDs: ATF1504AS

Posted: Tue Sep 08, 2015 12:02 pm
by banedon
Thanks for the awesome advice, guys. I'll have a look for the byte blaster/2 schematics, but failing that will take a look at the cable recommended by Peter.

Peter: would you mind sending me those example files so that I can take a look?