Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Suppose we have an application that requires 12K bytes of program (more than will fit on
one 2864) but also requires 4K bytes of non-volatile writeable data. The non-volatile
data bytes will hold user-changeable data such as passwords and preferences. A pair of
2864 memory circuits would provide enough memory for both the 12K bytes of program
and 4K bytes of non-volatile writeable data space.
a. The two memories are to occupy the first 16K bytes of address space. The program
part should occupy bytes 0-(12K-1) of program space, and the non-volatile data area
should occupy bytes 12K-(16K-1). Write out the beginning and ending addresses for
each of these areas in both HEX and BINARY format.
HEX BINARY
first program byte address 0000H 0000 0000 0000 0000
last program byte address 2FFFH 0010 1111 1111 1111
b. Suppose we want to be very conservative and make sure that each 2864 is enabled
only when it is being accessed, i.e., when the 16-bit address falls within the
corresponding range. What 8051 pins you would use, and how to meet this requirement?
Write equations for the two chip enables in terms of 8051 signals:
The A14 and A15 are needed to remove aliasing and to deactivate the memory
when not in use.
c. Memory 0 (the first 8K bytes) contains only program. Write equations for /OE
and /WR for this 2864 circuit in terms of 8051 signals?
/OE = /PSEN
/WR = +Vcc
d. Memory 1 (bytes 8K to (16K-1)) contains program bytes in the first 4K and read/write
data in the last 4K. We want to be very safe and guarantee that the processor can't
accidentally write to one of the program bytes (thereby changing the program. Write
equations for /OE and /WR for this 2864 circuit in terms of 8051 signals?
Yes. It is possible we have to map 12k-16k-1 to 0-4k-1 when we want to access the data
memory.
/OE of 0=/PSEN
/OE of 1=/RD
/WR of 0= +Vcc
/WR of 1= /WR
This concept should be used to map the virtual data address to real physical address.