Help with 22v10 and WinCupl :(

Hi.

I'm trying to do two basic things with a 22v10 but seem to be getting nowhere with them and would appreciate some help.

I need the 22v10 to do the following:

1) Divide a 2mhz clock signal by 2 and output a 1mhz signal. 2) Output a high pulse for a duration of X clock cycles, triggered by an input going high.

Can someone give me a clue as to how I get the chip to do these things?

Stephen

Reply to
Stephen Lannard
Loading thread data ...

Assuming the clock is coming into the global clock line

pin 20 = clkout; clkout.d=!clkout;

There are various ways to do this. one way would be to have a synchronous up-counter of the required number of bits, preloaded with -X when the input goes high and clearing the output when the counter rolls to zero after the required number of cycles.

I'm sure there are some exaples of counters in the demo files.

Reply to
Mike Harrison

Hi,

Thanks for that.

From what I can see with counters, they seem to eat-up output pins?

Indeed there are examples, but i don't find them too helpful. They kind of assume you have an idea of what you're doing and at the moment i don't. :(

I'm new to this and maybe i'm expecting too much of the 22v10.

Stephen

Reply to
Stephen Lannard

Yes - one macrocell per bit.

Depends on your likely range of X.....

Reply to
Mike Harrison

12ms will need 12 bits @ 1mhz i think. I'll stick with a one shot, seems easier.

Stephen

Reply to
Stephen Lannard

The 22V10 is at the bottom end of the scale, only the 16V8 is below it ....

Easier, but not as precise. You could also look at the ATF750, which is pin-pin with the 22V10, but has 20 Macrocells, and if physical details are not nailed down, the 32 Macrocell devices like ATF1502ASL et al...

-jg

Reply to
Jim Granville

I chose the 22v10 because it was a basic unit, I hoped to learn on this before embarking upon anything of note. I'm basically trying to replace a timing pulse and a bunch of ttl logic as my first step into PLD.

If I manage to work out this CUPL those chips will be added to my list of things to play with :-) It's proving a little difficult at the moment to grasp the language.

Stephen

Reply to
Stephen Lannard

Before trying to grasp the language, be sure you understand the chip as the two are intimately linked.

The basic approach is to decide how each macrocell is to be used, and write an equation describing the functionality you need for each one. Remember it is a hardware description language, NOT a programming language. Start with one of the example files, breadboard a device and get it working as-is, then start tweaking it slightly to get a feel for how it all works. CUPL is not a difficult system to use once you understand the underlying hardware and what you are trying to do with it.

Reply to
Mike Harrison

kind of

don't.

I'm pretty sure you need 14 bits to get to 12 milliseconds. This means

14 macrocells in addition to the one dividing the input clock. If you want an exercise in partitioning logic, you can do it in two 22V10's.
Reply to
Gabor

14 bits will count up to 16.384 ms, but you need to add one MCell for the output pulse JK, to get counter -> monostable action. => 15 MCells Would suit 2 x 22V10, or 1 x ATF750 (same package)

-jg

Reply to
Jim Granville

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.