[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [N8VEM-S100:6345] Need help with a simple GAL programming problem.



Well that did it Bob.  I have improved things as well.  Because I  want this Toggle bit to reset to a defined state upon reset, I managed to allow the TOGOUT to always be high upon reset and to then toggle high/low with each port input. 

 

Great, this saves me using one 74LS74 chip on this S100 80486 board I’m building where every extra chip takes up precious real estate.

 

Here is the PALASM code in case anybody need this later:-

 

;---------------------------------- PIN Declarations ---------------

PIN 1   PULSE_IN                ;CLK pin, input from pin 23 (PULSE_OUT)

PIN 2   A0                      ;Note these are actual S100 bus address lines (outside the 80386)

PIN 3   A1

PIN 4   A2

PIN 5   A3

PIN 6   A4

PIN 7   A5

PIN 8   A6

PIN 9   A7

PIN 10  A8

PIN 11  A9

Pin 12  GND

 

Pin 13  A10

Pin 14  A11

Pin 15  A12

Pin 16  A13

Pin 17  A14

Pin 18  A15               

Pin 19  sINP              ;S100 bus status Port IN line

Pin 20  pDBIN             ;S100 bus port write

Pin 21  /RESET            ;Active pulse LOW   

Pin 22  TOGOUT                

Pin 23  PULSE_OUT         ;Pulse to clock pin 1 input    

 

;----------------------------------- Boolean Equation Segment ------

 

EQUATIONS

 

/PULSE_OUT   =       A0 * /A1 * A2 * A3 * /A4 * A5 * A6 * A7             ;Port EDH = 1110 1101

                  * /A8 * /A9 * /A10 * /A11 * /A12 * /A13 * /A14 * /A15

                  *  sINP * pDBIN

                  +  RESET  * TOGOUT                                     ;Clock LOW if HIGH with reset        

 

TOGOUT       :=     /TOGOUT  * /RESET                                   ;Toggle

                 +   RESET          

 

Thanks Bob for the help

John

 

 

From: n8vem...@googlegroups.com [mailto:n8vem...@googlegroups.com] On Behalf Of Bob Bell
Sent: Wednesday, February 18, 2015 6:49 PM
To: n8vem...@googlegroups.com
Subject: RE: [N8VEM-S100:6345] Need help with a simple GAL programming problem.

 

We’re half-way…

 

The output from GAL pin 22 needs to connect to the GAL pin 1.  Then every time you output to port 00EDh, you will get a pulse on pin 22.  You already  have this and the equation to do it.  This is now the clock to another cell in the GAL via pin 1.  Let’s say you use the cell on pin 21 for this.  The PALASM for this cell is simply to clock the inverted cell output to the output, just like the D F-F does.  Assuming you name pin 21 TOGOUT, I think the equation for this is simply:

 

TOGOUT = /TOGOUT

 

You have to tell the GAL that the pin 21 cell is registered so it connects the F-F and pulls the clock from pin 1.  I’m not altogether sure how that’s done or if there is some dependency on the programmer you’re using.

 

Bob Bell

 

 

From: n8vem...@googlegroups.com [mailto:n8vem...@googlegroups.com] On Behalf Of John Monahan
Sent: Wednesday, February 18, 2015 9:41 PM
To: n8vem...@googlegroups.com
Subject: RE: [N8VEM-S100:6344] Need help with a simple GAL programming problem.

 

If I understand you correctly then Bob you would have to input from the port twice ?  First to setup the output (low to high on pin 21), then AGAIN on another output pin (say pin 22)  which would be connected to the CLK pin1.  This would clock the register from the first output. That output would fee into pin 23 so it can be inverted next time. 

 

If I have this correct, it’s not really what I want. I need one input from the port to toggle.  Otherwise I have  to backtrack on old software.

 

If I have it wrong could you supply PALASM code and/or a diagram.   I’m attaching the current schematic. I would like to eliminate the need for the 74LS74.

 

 

Thanks

John

 

 

From: n8vem...@googlegroups.com [mailto:n8vem...@googlegroups.com] On Behalf Of Bob Bell
Sent: Wednesday, February 18, 2015 6:17 PM
To: n8vem...@googlegroups.com
Subject: RE: [N8VEM-S100:6343] Need help with a simple GAL programming problem.

 

John,

 

I’m just beginning to get into programming GALs for an S-100 memory board I’m designing (or I should say re-designing), and I have been doing a lot of research.  In the 80’s, I used PALASM to program PALs on a regular basis, so my need to learn GAL programming is awakening many old memories.

 

If I understand you correctly, you want a GAL output to start low (upon some reset or power-up I presume), then on an input from port 00EDh, you want it to go high and stay high.  Then on a subsequent port input, you want it to go back low and stay low.  As I see it, this is a simple divide by two circuit.  If I was implementing it with a D flip-flop, I would simply tie the /Q output pin back to D input and then clock the flip flop with the output of the port detection logic.  Assuming you want a known state on power-up or reset, I would connect the D flip-flop’s /Reset input to /POR.

 

So, for your GAL, you’ll need a registered output.  Since a 22V10 has a single, common clock input, and cannot come from the matrix or a GAL output internally, you’ll need to tie that to another output that has implemented your port detection logic as you have written.  Then each time you write to that port, the GAL combinatorial logic will pulse its output and be fed back to the clock input, clocking the register cell that you will setup.  Your port detection logic looks correct to me.  This would be the combinatorial output that you will wire to the GAL CLK input.  Then you need to add an equation for the registered cell that uses the output of the register, internally, to set the register output either low or high depending on the state of the register output feedback.  This will implement the toggle function you are looking for.  That would look something like this I think:

 

TogOut = /TogOut

 

So, I think you have enough pins.  The output of the port detection logic can be pin 23.  This is hard-wired externally to the GAL to pin 1.  Since the register output can feedback internally, it does not use a pin.  That leaves pin 22 for your reset if you want to implement that.

 

I know this is not thought out 100%, but I hope it’s enough to help you get going.

 

Bob Bell

 

 

From: n8vem...@googlegroups.com [mailto:n8vem...@googlegroups.com] On Behalf Of monahanz
Sent: Wednesday, February 18, 2015 7:59 PM
To: n8vem...@googlegroups.com
Subject: [N8VEM-S100:6342] Need help with a simple GAL programming problem.

 

Could anybody out there that remembers programming GAL's (specifically the 24 pin 22V10 variety), help me on what I'm sure is a simple problem.

 

I want the GAL to topple low  to high on a port input. and stay high., The next time on a port input toggle back high to low and stay low. In other words inputting from a port toggles the output. I'm a bit limited with pins available, only 3:-

 

PIN 1   NC
PIN 2   A0                         ;Note these are actual S100 bus address lines (outside the 80386)
PIN 3   A1
PIN 4   A2
PIN 5   A3
PIN 6   A4
PIN 7   A5
PIN 8   A6
PIN 9   A7
PIN 10  A8
PIN 11  A9
Pin 12  GND

Pin 13  A10
Pin 14  A11
Pin 15  A12
Pin 16  A13
Pin 17  A14
Pin 18  A15        
Pin 19  sINP                            ;S100 bus status Port IN line
Pin 20  pDBIN                         ;S100 bus port read
Pin 21  TOGGLE_OUTPUT             
Pin 22  NC              

Pin 23  NC

;----------------------------------- Boolean Equation Segment ------

 

EQUATIONS

 

TOGGLE_OUTPUT    =      A0 * /A1 * A2 * A3 * /A4 * A5 * A6 * A7                        ;EDH = 1110 1101
                                        * /A8 * /A9 * /A10 * /A11 * /A12 * /A13 * /A14 * /A15
                                        *  sINP * pDBIN                                                                ;Activate board with Z80 monitor QIED command

 

I'm assuming I need a register output, not sure what the clock should be.  Any suggestions as to a layout.

 

John

 

 

--
You received this message because you are subscribed to the Google Groups "N8VEM-S100" group.
To unsubscribe from this group and stop receiving emails from it, send an email to n8vem-s100+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "N8VEM-S100" group.
To unsubscribe from this group and stop receiving emails from it, send an email to n8vem-s100+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "N8VEM-S100" group.
To unsubscribe from this group and stop receiving emails from it, send an email to n8vem-s100+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "N8VEM-S100" group.
To unsubscribe from this group and stop receiving emails from it, send an email to n8vem-s100+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.