
PSD813FH - 80C31 Design Example …Application Note
052
WSi Inc. Fremont CA 800-832-6974 www.wsipsd.com
31
"During FLASH reads, a14f is forced to zero by clearing
"pass_a14.
"a15f on the FLASH die is permanently grounded. This allows a16f,a17f,
"and a18f to page through eight segments of FLASH, each segment is 16Kbytes.
"***** Create the three most significant FLASH die addresses to page
"***** through eight segments of FLASH.
"***** Implement the following truth-table and use the PSD page
"***** register to match the memory map.
"***** | FLASH segment | 8031 address | PSD | Swap
"***** a18f a17f a16f | chip select | range | Page | bit
"***** ------------------------------------------------------------------------------------
"***** 0 0 0 | fs0 | C000 <=> FFFF | 3 | 0
"***** OR
"***** 0 0 0 | fs0 | 0000 <=> 3FFF | X | 1
"***** 0 0 1 | fs1 | 4000 <=> 7FFF | X | X
"***** 0 1 0 | fs2 | 8000 <=> BFFF | 0 | X
"***** 0 1 1 | fs3 | C000 <=> FFFF | 0 | X
"***** 1 0 0 | fs4 | 8000 <=> BFFF | 1 | X
"***** 1 0 1 | fs5 | C000 <=> FFFF | 1 | X
"***** 1 1 0 | fs6 | 8000 <=> BFFF | 2 | X
"***** 1 1 1 | fs7 | C000 <=> CFFF | 2 | X
a16f = (address >= ^h4000) & (address <= ^h7FFF) & (page == X) "fs1
# (address >= ^hC000) & (address <= ^hFFFF) & (page == 0) "fs3
# (address >= ^hC000) & (address <= ^hFFFF) & (page == 1) "fs5
# (address >= ^hC000) & (address <= ^hFFFF) & (page == 2); "fs7
a17f = (address >= ^h8000) & (address <= ^hBFFF) & (page == 0) "fs2
# (address >= ^hC000) & (address <= ^hFFFF) & (page == 0) "fs3
# (address >= ^h8000) & (address <= ^hBFFF) & (page == 2) "fs6
# (address >= ^hC000) & (address <= ^hFFFF) & (page == 2); "fs7
a18f = (address >= ^h8000) & (address <= ^hBFFF) & (page == 1) "fs4
# (address >= ^hC000) & (address <= ^hFFFF) & (page == 1) "fs5
# (address >= ^h8000) & (address <= ^hBFFF) & (page == 2) "fs6
# (address >= ^hC000) & (address <= ^hFFFF) & (page == 2); "fs7
"***** Generate active low FLASH memory die chip select.
"***** csf is active when any of the fs0-7 segment selects is true.
"***** csf is defined as:
"***** !csf = fs0 # fs1 # fs2 # fs3 # fs4 # fs5 # fs6 # fs7
!csf = (address >= ^h8000) & (address <= ^hBFFF) & (page == 3) & !swap "fs0
# (address >= ^h0000) & (address <= ^h3FFF) & (page == X) & swap "fs0
# (address >= ^h4000) & (address <= ^h7FFF) & (page == X) "fs1
# (address >= ^h8000) & (address <= ^hBFFF) & (page == 0) "fs2
# (address >= ^hC000) & (address <= ^hFFFF) & (page == 0) "fs3