Tandy 200 Timer: Difference between revisions
(9 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
It is not complete yet | It is not complete yet | ||
== RP5C01: Real Time Clock with Internal RAM == | == RP5C01: Real Time Clock with Internal RAM == | ||
Line 52: | Line 9: | ||
From the [[Media:Rp5c01 T200 timer.pdf|Datasheet]]: | From the [[Media:Rp5c01 T200 timer.pdf|Datasheet]]: | ||
"The RP/RF5C01A are real-time clocks for microcomputers that can be connected directly to buses of | "The RP/RF5C01A are real-time clocks for microcomputers that can be connected directly to buses of microcomputers with such CPUs as the 8085A or Z80 and allow setting or reading of the clock with the same procedures as | ||
for the Read/Write operation for memory. | for the Read/Write operation for memory. | ||
Line 70: | Line 26: | ||
* Outputs alarm signals or timing pulse of 16Hz or 1Hz. | * Outputs alarm signals or timing pulse of 16Hz or 1Hz. | ||
* Packages : 18pin DIP (RP5C01A) | * Packages : 18pin DIP (RP5C01A) | ||
== Interaction Between Timer and Memory Subsystem == | |||
The timer is accessible via port $9X. | |||
Uniquely on the T200, the timer is used as scratchpad for copying data from bank to bank in the memory subsystem. | |||
The code below illustrates how to change the mode on the timer to allow RAM access. | |||
2E0CH (DBH) IN 9DH ; get current TIMER CHIP MODE | |||
2E0EH (E6H) ANI 0CH ; and with 0c | |||
2E10H (F6H) ORI 02H ; or with 02 | |||
2E12H (D3H) OUT 9DH ; SET TIMER CHIP MODE- LEAVE ALARMS ALONE, BUT SET TO RAM MODE | |||
Now the timer is ready to be read/written. Note, the typical value for port $9D is 1000b or 8d. | |||
Port $90 is used to store the source bank location, and port $91 is used to store the target. | |||
ex. | |||
2E14H (DBH) IN D8H ; GET CURRENT BANK DATA | |||
2E16H (D3H) OUT 90H ; STORE 4 BITS IN THE RAM LOCATION 0 | |||
[[Category:Model T Developer Reference]] | [[Category:Model T Developer Reference]] |
Latest revision as of 13:47, 19 March 2009
Overview
This article is intended to provide sufficient information to allow you to access the RP5C01 Timer chip in the Tandy 200 without necessarily using any ROM routines.
It is not complete yet
RP5C01: Real Time Clock with Internal RAM
From the Datasheet:
"The RP/RF5C01A are real-time clocks for microcomputers that can be connected directly to buses of microcomputers with such CPUs as the 8085A or Z80 and allow setting or reading of the clock with the same procedures as for the Read/Write operation for memory.
These products have various features such as clock and calendar counters, alarm functions, and 26 ́ 4bits RAM which can be backed up by batteries. They can then be used as non-volatile RAM."
- Connected directly to CPU
- 4bit bidirectional data bus : D0 - D3
- 4bit address input : A0 - A3
- Built-in clock counter (hour, minute, second) and calendar counter (leap year, year, month, day, day-of-the-week)
- Supports both 12-hour AM/PM clock and 24-hour clock
- All clock data expressed in BCD codes
- ±30 second adjustment function
- Built-in 26 X 4bits RAM
- Backed up by batteries (minimum:2.2V)
- Outputs alarm signals or timing pulse of 16Hz or 1Hz.
- Packages : 18pin DIP (RP5C01A)
Interaction Between Timer and Memory Subsystem
The timer is accessible via port $9X.
Uniquely on the T200, the timer is used as scratchpad for copying data from bank to bank in the memory subsystem.
The code below illustrates how to change the mode on the timer to allow RAM access.
2E0CH (DBH) IN 9DH ; get current TIMER CHIP MODE 2E0EH (E6H) ANI 0CH ; and with 0c 2E10H (F6H) ORI 02H ; or with 02 2E12H (D3H) OUT 9DH ; SET TIMER CHIP MODE- LEAVE ALARMS ALONE, BUT SET TO RAM MODE
Now the timer is ready to be read/written. Note, the typical value for port $9D is 1000b or 8d.
Port $90 is used to store the source bank location, and port $91 is used to store the target.
ex.
2E14H (DBH) IN D8H ; GET CURRENT BANK DATA 2E16H (D3H) OUT 90H ; STORE 4 BITS IN THE RAM LOCATION 0