Author Topic: Problem with WinCupl, ATF750C, t-flip-flop .. someone help please ...  (Read 4544 times)

0 Members and 1 Guest are viewing this topic.

Offline pernilsTopic starter

  • Newbie
  • Posts: 2
Hi ....

Background :

Have a controller unit that basic take inputs (buttons) to activate outputs (coils on hydraulic valves). The unit have now to be modified with a toggled input. After searching the Atmel ATF750C have this and have the same config as the PEEL pld that exists at the moment.

Data sheet on ATF750C ]http://www.atmel.com/Images/doc0776.pdf]


Criteria :

The PCB have to stay intact eg. I will take units from shelf and replace the PEEL with the ATF750C.



Problem :

The pld program is made in wincupl as preferred compiler stated by Atmel.
wincupl =>  ]http://www.atmel.com/tools/WINCUPL.aspx]

I have no clock so to speek  on pin 1 just the suppled power.

But in data sheet for ATF750C you are not looked to use clk from "world clock" (pin1) to the t/d flip-flop. From what I understand you can use a input pin or a product.

So in Wincupl I have compiled and simulated in Winsim with success but I will not work on the hardware.

Code: [Select]
Device   v750c ;

PIN    3 = In1b ;

PIN    18 = OutT   ; /*Toggle funktion */

OutT.sp = 'b'0 ;

OutT.t = In1b ;

OutT.ck = In1b ;


Even tried with product on the clock for t-flip-flop

Code: [Select]
Device   v750c ;

PIN    3 = In1b ;

PIN    18 = OutT   ; /*Toggle funktion */

OutT.sp = 'b'0 ;

OutT.t = In1b ;

OutT.ck = In1b # 'b'0;


Have tried so many times now and also with changing to pin-keeper
Code: [Select]
Device   v750cppk ;

Last night i found this document ]http://www.atmel.com/Images/DOC0790.PDF]  (Atmels PLD designer guide )

I haven't the programmer available at the moment .. but must I make a product from the "world clock" (pin 1) ?

Like this

Code: [Select]
Device   v750c ;

PIN    1 = clk;

PIN    3 = In1b ;

PIN    18 = OutT   ; /*Toggle funktion */

OutT.sp = 'b'0 ;

OutT.d = In1b ;

OutT.ck = In1b & clk ;


After banging my head for over 1 week now and being aprox. the user of half of googles bandwith I ended up here.

So could some one point me in the right direction or just clarify that the impression of being able to use clk from almost what ever sources you have is bogus in the datasheet for the ATF750C.

My native language isn't english but I hope I made my problem so clear that you understand.

I have only small experience of electronics so keep it a bit easy if you have thought or better a code example that uses a t-flip-flop with the .ck not connected to pin1.

Anyway I love the David's shows and watch them as soon they are published.
Mostly of the time in the teardowns episodes I don't have a clue of what's all the parts are doing but you get some small fragment of knowledge every time. 

What I can contribute to this community is app for you PLD beginners. Try LogiSim ]http://ozark.hendrix.edu/~burch/logisim/] .

You don't have to installed it. That's huge plus ... (every time you installs something in windows you get one step nearer the time you have to reinstall the os).

Thanks in advanced

Per Nils




« Last Edit: February 22, 2013, 11:51:22 am by pernils »
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Problem with WinCupl, ATF750C, t-flip-flop .. someone help please ...
« Reply #1 on: February 22, 2013, 01:24:07 pm »
I've never used those devices myself but it looks like the ATF750Cs use the CKMUX extension rather than the CK extension to specify this functionality.  See page 2-7 of the WinCUPL User's Manual and page 4 of the ATF750C datasheet (section 7, Clock Mux.)
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13677
  • Country: gb
    • Mike's Electric Stuff
Re: Problem with WinCupl, ATF750C, t-flip-flop .. someone help please ...
« Reply #2 on: February 22, 2013, 02:02:57 pm »
it's maybe 10 years since I used CUPL but I vaguely recall that the way you specify a register to be a t type is to use the .tfb output.  I may be cpmpletely mis-remembering this though... I think I may have some ATV750 designs at home - will look if I remember
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline pernilsTopic starter

  • Newbie
  • Posts: 2
Re: Problem with WinCupl, ATF750C, t-flip-flop .. someone help please ...
« Reply #3 on: February 22, 2013, 08:34:05 pm »
TerminalJack505 :

I have seen that fuss about .ckmux but this simple code

Code: [Select]

Device   v750c ;

PIN    3 = In1b     ; /* */

PIN    18 = OutT   ; /*Toggle funktion */

OutT.sp = 'b'0 ;

OutT.t = In1b ;

OutT.ckmux = In1b ;

Will not behave as aspected in winsim (is bundled with wincupl). The output OutT will no change state.
If you read page 2-6 about the .ck extension I get the feeling that it is ATV750 that uses the .ckmux extension.

.

« Last Edit: February 22, 2013, 08:37:42 pm by pernils »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf