Issue with ATF22V10C
Posted: Mon Mar 30, 2020 11:01 pm
Hi!
I wonder if anyone here has experience with the Atmel ATF22V10C chips and using/programming them?
Since the Lattice versions has been discontinued I bought some of the Atmel chips but programming them I've seen some issues.
I use one of these for memory bank selection, basically replacing A13-A15 address lines from the 65C02 CPU to the SRAM as well as sending A16-A18.
During boot-up I'm using another input on the chip as OE so an Atmega4809 can directly talk to the SRAM and I set the OE flag in wincupl for each output to not output during this boot-up time to avoid contention.
All this works fine using the GAL22V10 chip from Lattice but seems to not set to tri-state using the Atmel version. I'm using the Xgpro software / TL866II+ to program both chips.
Here is the wincupl code, sorry for probably formatting badly:
/* *************** INPUT PINS *********************/
PIN 1 = PHI2; /* */
PIN 2 = RW; /* */
PIN 3 = CPU_A15; /* */
PIN 4 = CPU_A14; /* */
PIN 5 = CPU_A13; /* */
PIN 6 = BANKA_0; /* */
PIN 7 = BANKA_1; /* */
PIN 8 = BANKA_2; /* */
PIN 9 = BANKA_3; /* */
PIN 10 = BANKA_4; /* */
PIN 11 = BANKA_5; /* */
PIN 13 = !BOOTUP_OE; /* */
PIN 14 = BANKB_0; /* */
PIN 15 = BANKB_1; /* */
/* *************** OUTPUT PINS *********************/
PIN 23 = WE; /* */
PIN 22 = OE; /* */
PIN 21 = SRAM_A18; /* */
PIN 20 = SRAM_A17; /* */
PIN 19 = SRAM_A16; /* */
PIN 18 = SRAM_A15; /* */
PIN 17 = SRAM_A14; /* */
PIN 16 = SRAM_A13; /* */
/*
* Logic:
*/
SRAM_A18 = ((CPU_A15 & !CPU_A14 & CPU_A13) & BANKA_5) # // Bank A bit 5 selection
(CPU_A15 & CPU_A14) // Set if we are in ROM bank since all ROM is located at top of memory
;
SRAM_A17 = ((CPU_A15 & !CPU_A14 & CPU_A13) & BANKA_4) # // Bank A bit 4 selection
(CPU_A15 & CPU_A14) // Set if we are in ROM bank since all ROM is located at top of memory
;
SRAM_A16 = ((CPU_A15 & !CPU_A14 & CPU_A13) & BANKA_3) # // Bank A bit 3 selection
(CPU_A15 & CPU_A14) // Set if we are in ROM bank since all ROM is located at top of memory
;
SRAM_A15 = (CPU_A15 & !CPU_A14 & BANKA_2) # // Bank A bit 2 selection
(CPU_A15 & CPU_A14 & BANKB_1) # // Bank B bit 1 selection
(CPU_A15 & !CPU_A14 & !CPU_A13) // A15 can be used directly if we are in LOW RAM or I/O map
;
SRAM_A14 = (CPU_A15 & !CPU_A14 & CPU_A13 & BANKA_1) # // Bank A bit 1 selection
(!CPU_A15 & CPU_A14) # // A14 can be used directly if we are in LOW RAM
(CPU_A14 & BANKB_0) // Bank B bit 0 selection
;
SRAM_A13 = ((CPU_A15 & !CPU_A14 & CPU_A13) & BANKA_0) # // Bank A bit 0 selection
(!(CPU_A15 & !CPU_A14 & CPU_A13) & CPU_A13) // Use directly if we are not in RAM bank A
;
WE = !(PHI2 & !RW);
OE = !(PHI2 & RW);
SRAM_A13.oe = BOOTUP_OE;
SRAM_A14.oe = BOOTUP_OE;
SRAM_A15.oe = BOOTUP_OE;
SRAM_A16.oe = BOOTUP_OE;
SRAM_A17.oe = BOOTUP_OE;
SRAM_A18.oe = BOOTUP_OE;
WE.oe = BOOTUP_OE;
OE.oe = BOOTUP_OE;
Thanks for any ideas!
/Daniel
I wonder if anyone here has experience with the Atmel ATF22V10C chips and using/programming them?
Since the Lattice versions has been discontinued I bought some of the Atmel chips but programming them I've seen some issues.
I use one of these for memory bank selection, basically replacing A13-A15 address lines from the 65C02 CPU to the SRAM as well as sending A16-A18.
During boot-up I'm using another input on the chip as OE so an Atmega4809 can directly talk to the SRAM and I set the OE flag in wincupl for each output to not output during this boot-up time to avoid contention.
All this works fine using the GAL22V10 chip from Lattice but seems to not set to tri-state using the Atmel version. I'm using the Xgpro software / TL866II+ to program both chips.
Here is the wincupl code, sorry for probably formatting badly:
/* *************** INPUT PINS *********************/
PIN 1 = PHI2; /* */
PIN 2 = RW; /* */
PIN 3 = CPU_A15; /* */
PIN 4 = CPU_A14; /* */
PIN 5 = CPU_A13; /* */
PIN 6 = BANKA_0; /* */
PIN 7 = BANKA_1; /* */
PIN 8 = BANKA_2; /* */
PIN 9 = BANKA_3; /* */
PIN 10 = BANKA_4; /* */
PIN 11 = BANKA_5; /* */
PIN 13 = !BOOTUP_OE; /* */
PIN 14 = BANKB_0; /* */
PIN 15 = BANKB_1; /* */
/* *************** OUTPUT PINS *********************/
PIN 23 = WE; /* */
PIN 22 = OE; /* */
PIN 21 = SRAM_A18; /* */
PIN 20 = SRAM_A17; /* */
PIN 19 = SRAM_A16; /* */
PIN 18 = SRAM_A15; /* */
PIN 17 = SRAM_A14; /* */
PIN 16 = SRAM_A13; /* */
/*
* Logic:
*/
SRAM_A18 = ((CPU_A15 & !CPU_A14 & CPU_A13) & BANKA_5) # // Bank A bit 5 selection
(CPU_A15 & CPU_A14) // Set if we are in ROM bank since all ROM is located at top of memory
;
SRAM_A17 = ((CPU_A15 & !CPU_A14 & CPU_A13) & BANKA_4) # // Bank A bit 4 selection
(CPU_A15 & CPU_A14) // Set if we are in ROM bank since all ROM is located at top of memory
;
SRAM_A16 = ((CPU_A15 & !CPU_A14 & CPU_A13) & BANKA_3) # // Bank A bit 3 selection
(CPU_A15 & CPU_A14) // Set if we are in ROM bank since all ROM is located at top of memory
;
SRAM_A15 = (CPU_A15 & !CPU_A14 & BANKA_2) # // Bank A bit 2 selection
(CPU_A15 & CPU_A14 & BANKB_1) # // Bank B bit 1 selection
(CPU_A15 & !CPU_A14 & !CPU_A13) // A15 can be used directly if we are in LOW RAM or I/O map
;
SRAM_A14 = (CPU_A15 & !CPU_A14 & CPU_A13 & BANKA_1) # // Bank A bit 1 selection
(!CPU_A15 & CPU_A14) # // A14 can be used directly if we are in LOW RAM
(CPU_A14 & BANKB_0) // Bank B bit 0 selection
;
SRAM_A13 = ((CPU_A15 & !CPU_A14 & CPU_A13) & BANKA_0) # // Bank A bit 0 selection
(!(CPU_A15 & !CPU_A14 & CPU_A13) & CPU_A13) // Use directly if we are not in RAM bank A
;
WE = !(PHI2 & !RW);
OE = !(PHI2 & RW);
SRAM_A13.oe = BOOTUP_OE;
SRAM_A14.oe = BOOTUP_OE;
SRAM_A15.oe = BOOTUP_OE;
SRAM_A16.oe = BOOTUP_OE;
SRAM_A17.oe = BOOTUP_OE;
SRAM_A18.oe = BOOTUP_OE;
WE.oe = BOOTUP_OE;
OE.oe = BOOTUP_OE;
Thanks for any ideas!
/Daniel