Preliminary versiom from 2001
Bus Timing in Expanded Mode
In the first part of this lab, you will write a simple program to use expanded memory and expanded ports A and B. In the second part of the lab you will look at timing in expanded mode. To do this, you will connect address, data and control lines from your expansion board to the logic analyzer. There is one problem with this - the address and control lines coming out of the Altera chip to the memory chip are not easy to connect to the logic analyzer. In order to be able to look at these lines, you will get rid of expanded ports A and B, and put duplicates of address and control lines onto the headers which were used for these ports.
hc12_exp.gdf
and memexp.gdf
files. Edit the hc12_exp.gdf
file so only the memory expansion block remains.
CODE: section .text org $1000 ldd #$aa55 loop: staa $1020 stab $1021 ldd $1020 bra loop
Running this program the HC12 will do an 8-bit write to an even address ($1020), an 8-bit write to an odd address ($1021), and a 16-bit read from an even address ($1020). In addition, the HC12 will do reads from external memory to fetch the instructions it needs to execute.
Group things together so you get a timing diagram showing A7-A0 and AD15-AD0 as Hex numbers. Measure the following times, and compare them (where appropriate) to the times in Section 19 of the Motorola M68HC12B Family Manual:
E
clock is high.
E
clock is low.
E
going low
to R/W
going low on a write cycle.
E
going low to
a new address on AD15-0
.
E
going high until a new address appears on A7-0
.
OEn
, WEn
, and CEn
are low.
E
going high to CEn
going low.
E
going low to CEn
going
high.
E
going high to
AD15-0 changing from address mode to data mode.
E
going low to
AD15-0
changing from data to address mode during a write cycle.
CEn
going low the the RAM
chip putting data on the data bus on a read cycle.
CEn
going high to the
RAM chip releasing the data bus.
Note that, because of the clock speed of the logic analyzer, you will not be able to measure very short times.