6502, I/O buffered bus and DS1685 RTC.
Posted: Sun Dec 06, 2015 4:29 am
Hi guys,
I hope you can advise me on a problem I am having with my design.
My 6502 based general-purpose system is build around a mother board with 2-sided bus, which has a CPU side and buffered I/O side, both separated with 74LS245 transceivers.
I gate the buffer that separates data lines with signals:
Phi2, A10
and
/IO, which is a signal from my address decoder, active low in range c000-c7ff (8 I/O slots 0..7, 256 bytes each).
The direction of the buffer is driven by R/W signal from CPU.
The remaining buffers for address lines and CPU control signals have fixed direction from CPU to I/O side and are gated by /IO signal only.
My whole I/O range is c000..c7ff, however I designated only slots 4..7 to be the expansion slots of my system (with connectors on the mobo) and wanted to use range of I/O 0..3 (c000..c3ff) for other (internal) purposes, like RAM bank register, RTC/battery backed SRAM, general purpose I/O with PIA or VIA chip (that's why A10 line is used to gate the data buffer, to open it only in C400..c7ff range).
I wanted to have ability to connect the I/O devices designated for internal purposes on the CPU bus side, while the expansion cards (I/O 4..7) will be connected only on the other (buffered I/O) side of the bus.
This design I think is correct and it works (I tested my UART card on both sides of the bus, CPU and buffered I/O and worked in both cases), however I have a problem with my RTC circuit, which will only work on the I/O expansion side but will not work on the internal CPU bus side.
I believe that by using Phi2, A10 and /IO signals to gate the data buffer I eliminated the possibility of contention on the CPU bus side coming from the data signals of the buffer chip, so why is this still not working?
I suspect some tight timing issue, the DS1685 is a multiplexed bus type after all.
Unfortunately I don't have oscilloscope or logic analyzer to take a closer look at this problem (I hope to have one soon, should be already on its way from China).
PS:
Credits where due - my RTC circuit is based on Chris Ward's work.
Circuit diagrams:
CPU card: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
CPU bus:: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
I/O bus::: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
UART::::: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
RTC:::::: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
I hope you can advise me on a problem I am having with my design.
My 6502 based general-purpose system is build around a mother board with 2-sided bus, which has a CPU side and buffered I/O side, both separated with 74LS245 transceivers.
I gate the buffer that separates data lines with signals:
Phi2, A10
and
/IO, which is a signal from my address decoder, active low in range c000-c7ff (8 I/O slots 0..7, 256 bytes each).
The direction of the buffer is driven by R/W signal from CPU.
The remaining buffers for address lines and CPU control signals have fixed direction from CPU to I/O side and are gated by /IO signal only.
My whole I/O range is c000..c7ff, however I designated only slots 4..7 to be the expansion slots of my system (with connectors on the mobo) and wanted to use range of I/O 0..3 (c000..c3ff) for other (internal) purposes, like RAM bank register, RTC/battery backed SRAM, general purpose I/O with PIA or VIA chip (that's why A10 line is used to gate the data buffer, to open it only in C400..c7ff range).
I wanted to have ability to connect the I/O devices designated for internal purposes on the CPU bus side, while the expansion cards (I/O 4..7) will be connected only on the other (buffered I/O) side of the bus.
This design I think is correct and it works (I tested my UART card on both sides of the bus, CPU and buffered I/O and worked in both cases), however I have a problem with my RTC circuit, which will only work on the I/O expansion side but will not work on the internal CPU bus side.
I believe that by using Phi2, A10 and /IO signals to gate the data buffer I eliminated the possibility of contention on the CPU bus side coming from the data signals of the buffer chip, so why is this still not working?
I suspect some tight timing issue, the DS1685 is a multiplexed bus type after all.
Unfortunately I don't have oscilloscope or logic analyzer to take a closer look at this problem (I hope to have one soon, should be already on its way from China).
PS:
Credits where due - my RTC circuit is based on Chris Ward's work.
Circuit diagrams:
CPU card: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
CPU bus:: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
I/O bus::: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
UART::::: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp
RTC:::::: https://onedrive.live.com/redir?resid=1 ... hoto%2cbmp