Electronics > FPGA

Replacing a Color Prom on a Donkey Kong Jr Arcade with a GAL22v10

(1/2) > >>

RiddledTV:
Goal: replace an 82s129 Bipolar PROM from a Donkey Kong Jr with a GAL G22v10. 
Footprint and pin outs of the GAL does NOT need to match the order of the PROM, as it already has more pins so I will be building an adapter PCB. 
I was able to complete the equations and compile everything in WinCupl and get the correct outputs. 
Now I would like to mimic the Chip Enable (active low) feature of the PROM.  The prom actually has 2 CE pins, but in my application they are tied together, so I only need one CE.

I see in the documentation that the G22v10 has a tristate output feature, but I can't seem to find an example or documentation that shows how to implement the High-Z state. 

My Question:  How can I create the appropriate code so that when the CE is HIGH, the output pins are all "HIGH-Z" state. 

Attached is my sample code

mikeselectricstuff:

--- Quote from: RiddledTV on November 21, 2023, 03:47:13 pm ---Goal: replace an 82s129 Bipolar PROM from a Donkey Kong Jr with a GAL G22v10. 
Footprint and pin outs of the GAL does NOT need to match the order of the PROM, as it already has more pins so I will be building an adapter PCB. 
I was able to complete the equations and compile everything in WinCupl and get the correct outputs. 
Now I would like to mimic the Chip Enable (active low) feature of the PROM.  The prom actually has 2 CE pins, but in my application they are tied together, so I only need one CE.

I see in the documentation that the G22v10 has a tristate output feature, but I can't seem to find an example or documentation that shows how to implement the High-Z state. 

My Question:  How can I create the appropriate code so that when the CE is HIGH, the output pins are all "HIGH-Z" state. 

Attached is my sample code

--- End quote ---

outputname.oe=!ce

woofy:
I can't test it, but from page 2-10 of the WinCUPL User’s Manual:
Outputx.OE = !InputCE

RiddledTV:
Thanks for your quick responses...  I'm doing my best to understand.  Do I just add another statement after the output equation like this? 

--- Code: ---/* *************** INPUT PINS *********************/
PIN  1   = CE
/* *************** OUTPUT PINS *********************/
PIN  23 = OUT1                  ; /* supports 8  OR terms */
PIN  22 = OUT2                  ; /* supports 10 OR terms */


OUT1 = !B & !A                 
# F & D & !A         
# !E & !D & C & !A     
# F & E & !C & !A     
# !G & F & C & !A     
# !G & !E & D & C & B & A
# !G & !F & E & !C & B & A; 

OUT1.OE = !CE;

--- End code ---

RiddledTV:
It seems to compile like that.  Thanks for your help.  I'll follow up if that does not work as hoped.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod