Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Michael Cartwright
Published © MIT

Address decoding for 6502 using a PLD

Reducing the chip count and also wasting no address space by using an ATF22V10C programmable logic device (PLD) .

IntermediateFull instructions provided6 hours738
Address decoding for 6502 using a PLD

Things used in this project

Hardware components

Microchip ATF22V10C CMOS programmable logic device
×1

Software apps and online services

Microchip WinCUPL
Free programming tool for the CMOS programmable logic device that comes with an emulator (WinSim). As per the download page, you need the serial number "60008009" during the installation process of the free version.

Hand tools and fabrication machines

EEPROM Programmer

Story

Read more

Code

PLD code for WinCUPL

VHDL
Logic for my 6502 address decoder
Name     Decoder ;
PartNo   00 ;
Date     4/07/2023 ;
Revision 01 ;
Designer Michael Cartwright ;
Company  None ;
Assembly None ;
Location  ;
Device   g22V10 ;

/* Inputs:  All are signals from the 6502 */

Pin 1  =  CLK;
Pin 2  =  A15;
Pin 3  =  A14;
Pin 4  =  A13;
Pin 5  =  A12;
Pin 6  =  A11;
Pin 7  =  A10;
Pin 8  =  A9;
Pin 9  =  A8;
Pin 10 =  A7;
Pin 11 =  A6;
/* Pin 12 is GND */
Pin 13 =  A5;
Pin 14 =  A4;
Pin 15 =  A3;
Pin 16 =  A2;


/* Outputs:  define outputs - all are simple combinatorial */

Pin 23 = CSRAM;
Pin 22 = CSROM;
Pin 21 = CSVIA;
Pin 20 = CSACIA;
Pin 19 = OERAM;


 ZEROPAGE = !A15 & !A14 & !A13 & !A12 & !A11 & !A10 & !A9 & !A8;

 CSACIA = !(ZEROPAGE  & A7 & A6 & A5 & !A4 & A3 & A2);
 CSVIA  = !(ZEROPAGE  & A7 & A6 & A5 &  A4);
 CSRAM  = !((!A15 & CSVIA & CSACIA) & CLK);
 OERAM  = !(!A15 & CSVIA & CSACIA);
 CSROM  = !A15;

Test suite for WinSim

VHDL
Test cases to see the simulation of my logic in the WinSim output.
Name     Decoder;
PartNo   00;
Date     4/07/2023;
Revision 01;
Designer Michael Cartwright;
Company  None;
Assembly None;
Location ;
Device   g22V10;


ORDER: CLK, A15, A14, A13, A12, A11, A10, A9, A8, A7, A6, A5, A4, A3, A2, CSRAM, OERAM, CSROM, CSVIA, CSACIA; 


VECTORS:
010000000000000*****
110000000000000*****
001000000000000*****
101000000000000*****
000000001000000*****
100000001000000*****
000000000000010*****
100000000000010*****
000000000010000*****
100000000010000*****
000000001000000*****
100000001000000*****
000000000011000*****
100000000011000*****
000000000011110*****
100000000011110*****
000000000111000*****
100000000111000*****
000000000111000*****
100000000111000*****
000000000111001*****
100000000111001*****
000000000111010*****
100000000111010*****
000000000111011*****
100000000111011*****
000000000111100*****
100000000111100*****
000000000111100*****
100000000111100*****
000000000111101*****
100000000111101*****
000000000111101*****
100000000111101*****

Credits

Michael Cartwright
21 projects • 16 followers
Contact
Thanks to Ben Eater.

Comments

Please log in or sign up to comment.