6502.org
http://forum.6502.org/

Hello World of ATF1508 and WinCUPL not working
http://forum.6502.org/viewtopic.php?f=10&t=7491
Page 1 of 1

Author:  cbmeeks [ Mon Feb 06, 2023 4:52 am ]
Post subject:  Hello World of ATF1508 and WinCUPL not working

Good evening everyone.

So I am dusting off my old ATF1508 and the first thing I wanted to do is simply take a clock input and divide it way down to blink an LED.

It's been a while since I did this but I am 90% sure I got it to work previously. But tonight, I am getting errors.
Here is the code I am using (keep in mind I've just about forgotten everything I know about CPLD...lol):

Code:
Name     1508Blink ;
PartNo   ATF1508AS ;
Date     8/27/2021 ;
Revision 01 ;
Designer Engineer ;
Company  Cecil Meeks ;
Assembly None ;
Location Soddy-Daisy, TN USA;
Device   f1508ispplcc84;   /** ATF1508AS with In-System programming **/

/***************** INPUT PINS *********************/
PIN 83   = GCLK;

/**************** OUTPUT PINS *********************/
PIN 27 = BLINK;

/**************** BURRIED STATES ******************/
Pinnode [51..48] = [S3..0];      /** 4-bit counter to divide global clock **/


/**************** Clock Divider ******************/
S3.t = [S2..0];
S2.t = [S1..0];
S1.t = S0;
S0.t = 'b'1;
[S3..0].ck = GCLK;
[S3..0].ce = 'b'1;

BLINK = ![S3..0];



Attached are the errors I am getting (sorry, I can't seem to copy the text from WinCUPL's output).

Any help would be appreciated.

Thanks

Attachments:
Error.png
Error.png [ 9.41 KiB | Viewed 6072 times ]

Author:  BigDumbDinosaur [ Mon Feb 06, 2023 5:40 am ]
Post subject:  Re: Hello World of ATF1508 and WinCUPL not working

cbmeeks wrote:
Code:
Name     1508Blink ;
PartNo   ATF1508AS ;
Date     8/27/2021 ;
Revision 01 ;
Designer Engineer ;
Company  Cecil Meeks ;
Assembly None ;
Location Soddy-Daisy, TN USA;
Device   f1508ispplcc84;   /** ATF1508AS with In-System programming **

/...blah, blah, blah...

BLINK = ![S3..0];  <——— won’t work as expected

Try BLINK = [S3..0]:'h'0 and see what happens. :)

Author:  gfoot [ Mon Feb 06, 2023 12:40 pm ]
Post subject:  Re: Hello World of ATF1508 and WinCUPL not working

cbmeeks wrote:
Code:
/**************** Clock Divider ******************/
S3.t = [S2..0];
S2.t = [S1..0];



I think you need to tell it what operator to use when combining the bits, like this:

Code:
/**************** Clock Divider ******************/
S3.t = [S2..0]:&;
S2.t = [S1..0]:&;


Or test equality with a specific value as BDD said.

Author:  cbmeeks [ Mon Feb 06, 2023 3:24 pm ]
Post subject:  Re: Hello World of ATF1508 and WinCUPL not working

Thanks! Those suggestions worked and now I can compile.

But I have run into another issue. The ATMISP7 app (that I run under Wine/Linux) cannot find the programmer over the USB cable.

Running the "Scan USB Cable" says nothing is detected.

Have any of you got ATMISP7 to work with Linux? Or, is there another way I an upload the data to the CPLD?

Thanks.

Author:  Proxy [ Mon Feb 06, 2023 5:37 pm ]
Post subject:  Re: Hello World of ATF1508 and WinCUPL not working

hmm, I wonder if it would be easier to set up a full virtual machine running some windows version (like NT/2000/XP) and pass the USB Programmer to the VM than trying to get wine to work with it.

Author:  cbmeeks [ Mon Feb 06, 2023 8:51 pm ]
Post subject:  Re: Hello World of ATF1508 and WinCUPL not working

Yeah, that's what I used to do. I just didn't want to do that on this new machine.
I actually have a junky old P4 laptop in the garage that runs Windows XP. I might just run the WinCUPL stuff on that machine.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/