Author Topic: Clock divider /2, Gal22v10B and wincupl  (Read 2577 times)

0 Members and 1 Guest are viewing this topic.

Offline lkTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: dk
Clock divider /2, Gal22v10B and wincupl
« on: December 13, 2017, 07:57:07 pm »
Greetings,
Im tinkering with a 6502 computer, that i have working but i wanted to see if i could replace the logic ICS with a PLD, which for the most part was not problem(NAND and inverters), however i have 74HC74, that halves the clock of the system, and i simply cannot figure out how to implement some sort of divider or counter, that i can use to reduce the clock, the only tool i have available is wincupl.
I have looked at the examples, but as the features of different parts affect what you can do, i have a hard time figuring out how to crack this nut.

Below is the nonworking code,  i basically dont know what im doing:) as soon i move past very basic logic.

Is it possible to implement a counter/divider that could halve my clock input?


Code: [Select]
Name     test ;
PartNo   00 ;
Date     12/13/2017 ;
Revision 01 ;
Designer Newbie ;
Company  Lasse ;
Assembly None ;
Location  ;
Device    g22v10 ;

/* *************** INPUT PINS *********************/
PIN   1  =  phi2 ;
PIN   2  =  RW ;
PIN   3  =  A14 ;
PIN   4  =  A15 ;
PIN   5  =  RWINVinput;
PIN   15 =  R;
PIN   11 =  S;
                       

/* *************** OUTPUT PINS *********************/

PIN   19  = topaddressactivelow; 
PIN   18  = outputenable;
PIN   17  = writeenable;
PIN   16  = rwinvoutput;
PIN   14  = Q;

rwinvoutput = !RW;
topaddressactivelow = !( A14 & A15);
outputenable = !( phi2 & RW );
writeenable = !( phi2 & RWINVinput);
Q.D = Q.AR;



Here is a picture of the device i want to use, mainly because i have it and it was cheap :)
https://photos.app.goo.gl/951yMkD2UiyEEvC03

-lasse
 

Online joeqsmith

  • Super Contributor
  • ***
  • Posts: 11712
  • Country: us
Re: Clock divider /2, Gal22v10B and wincupl
« Reply #1 on: December 13, 2017, 09:18:57 pm »
Nice!  I used the 22V10 on the 6801 computer that runs the transient generator, just because.  :-DD

PALASM is free and will run under DOSBOX as well.  I tried using CUPL when PALASM would no longer run with Windows NT.  I remember finding several bugs in it and eventually pitched it.   I switched to the Lattice tools which work very well but I am not sure if they offer a free version.     

Online edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Clock divider /2, Gal22v10B and wincupl
« Reply #2 on: December 13, 2017, 09:39:30 pm »
I don't have WinCUPL installed, but I don't know why you are trying to use AR.  Shouldn't it be something like Q.D = !Q ?
 

Online joeqsmith

  • Super Contributor
  • ***
  • Posts: 11712
  • Country: us
Re: Clock divider /2, Gal22v10B and wincupl
« Reply #3 on: December 13, 2017, 10:15:36 pm »
I don't have WinCUPL installed, but I don't know why you are trying to use AR.  Shouldn't it be something like Q.D = !Q ?

Looking at my old CUPL projects, I believe you are correct.

CUPL(WM): Universal Compiler for Programmable Logic
Version 4.8a
Copyright (c) 1983, 1996 Logical Devices, Inc.

4MHZ.d  = !4MHZ                               ;

Offline lkTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: dk
Re: Clock divider /2, Gal22v10B and wincupl
« Reply #4 on: December 14, 2017, 03:58:23 pm »
Hi joeqsmith and edavid,

I changed
Q.D = !CLK;
However i have no idea how to get that signal to show up on a pin, when i simulate in proteus, i can see that the Q pin starts high, but the slowly drains to gnd.

I have zero idea what im doing :)

https://photos.app.goo.gl/951yMkD2UiyEEvC03

Code: [Select]
Name     test ;
PartNo   00 ;
Date     12/13/2017 ;
Revision 01 ;
Designer Newbie ;
Company  Lasse ;
Assembly None ;
Location  ;
Device    g22v10 ;

/* *************** INPUT PINS *********************/
PIN   1  =  CLK ;
PIN   2  =  RW ;
PIN   3  =  A14 ;
PIN   4  =  A15 ;
PIN   5  =  RWINVinput;

PIN   11 =  S;
                       

/* *************** OUTPUT PINS *********************/

PIN   19  = topaddressactivelow; 
PIN   18  = outputenable;
PIN   17  = writeenable;
PIN   16  = rwinvoutput;
PIN   14  = Q;
PIN   15 =  CLKOUT;

rwinvoutput = !RW;
topaddressactivelow = !( A14 & A15);
outputenable = !( CLK & RW );
writeenable = !( CLK & RWINVinput);
Q.D = !CLK;
 

Online edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Clock divider /2, Gal22v10B and wincupl
« Reply #5 on: December 14, 2017, 04:37:39 pm »
Hi joeqsmith and edavid,

I changed
Q.D = !CLK;

Try:

Q.D = !Q;
 

Offline lkTopic starter

  • Regular Contributor
  • *
  • Posts: 152
  • Country: dk
Re: Clock divider /2, Gal22v10B and wincupl
« Reply #6 on: December 14, 2017, 05:21:27 pm »
Thank you , edavid

that worked :)

-lasse
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf