Problem with  WinCupl, ATF750C, t-flip-flop .. someone help please ... - Page 1
Forum section: electronics / general

author: pernils
author_rank: Newbie
timestamp: February 22, 2013, 11:47:54 am
content: 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: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-flopCode: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-keeperCode: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 thisCode: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 advancedPer Nils

author: TerminalJack505
author_rank: Super Contributor
timestamp: February 22, 2013, 01:24:07 pm
content: 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 theWinCUPL User's Manualand page 4 of theATF750C datasheet(section 7, Clock Mux.)

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: February 22, 2013, 02:02:57 pm
content: 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

author: pernils
author_rank: Newbie
timestamp: February 22, 2013, 08:34:05 pm
content: TerminalJack505 :I have seen that fuss about .ckmux but this simple codeCode: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..