I'm writting a driver for the Z85C30 and did read the user manual but still unclear of when to set high or low on the D/C pin. Any advice?
The manual wrote "In the SCC, the data registers are directly addressed by selecting a High on the D/C pin." but I can not find register is the data registers or control registers.
Thanks, Trang Mai
--------------------------------------- Posted through
formatting link
Didn't find your answer? Ask the community — no account required.
D
David Empson
The D/C pin is written "D//C" in the datasheet I have here, i.e. "D if
1, C if 0".
Treat this as an address input, along with the "A//B" input (which selects channel A if 1, or B if 0).
D//C needs to be a logic 1 to access the data registers, or a logic 0 to access the control registers.
In effect, the SCC occupies four bytes of address space. Assuming D//C is mapped to address bit 0 and A//B to address bit 1, the four locations are (relative to the base address):
0 B control
1 B data
2 A control
3 A data
When you access one of the control register locations, you are initially addressing WR0 (write) or RR0 (read). The other read/write control registers are addressed by first writing the register number to WR0, then reading or writing the same location to access the desired control register.
The data register can also be accessed through the control register location by addressing WR8/RD8, but this is less efficient as it requires writing the register number (8) to WR0, then reading or writing the same location, i.e. twice as many accesses compared to using the separate address for the data register.
David Empson
dempson@actrix.gen.nz
T
T.Mai
still
by
data
Thanks David. This helps a lot. Trang Mai
--------------------------------------- Posted through
formatting link
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.