Difference between revisions of "Minimig RTC"

From OpenCircuits
Jump to navigation Jump to search
(rtc idea)
 
(why + reformulate)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Idea would be to have a clock that keeps the time over power cycling.<br>
+
Real time clock that keeps the time over power cycling.<br>
[http://amigahardware.mariomisic.de/cgi-bin/showhardware_en.cgi?HARDID=968 Commodore: A501, 512k + RTC]<br>
+
Advantages:
 +
:* Disc files get correct date
 +
:* Any software dependent on date will work correctly (astronomy/satellite?)
 +
 
 +
[http://amigahardware.mariomisic.de/cgi-bin/showhardware_en.cgi?HARDID=968 Commodore: A501 Rev5, 512k + RTC]<br>
 +
:RAM organised as 16 x (Sanyo LM33256G-12 DIP16) 1 x 256kbit Dynamic RAM
 +
:RTC 5 Volt "OKI M6242B" U9 DIP18 clocked with a 32768 Hz crystal, backed up by a 3,6V NiCd battery
 +
<!-- amigahardware.mariomisic.de/download_photos/a501_1_big.jpg -->
 +
:[http://www.tranzistoare.ro/datasheets2/18/182008_1.pdf M6242B datasheet]
 +
 
 +
:Register table:<!-- http://en.wikipedia.org/wiki/Help:Table#Positioning -->
 +
:{| class="wikitable"
 +
|-
 +
! rowspan=2 colspan=1 align="center" | Address Input
 +
! rowspan=2 colspan=1 align="center" | Register name
 +
! rowspan=1 colspan=4 align="center" | Data
 +
! rowspan=2 colspan=1 align="center" | Count value
 +
! rowspan=2 colspan=1 align="center" | Description
 +
|-
 +
!        D3  !! D2    !! D1  !! D0
 +
|-
 +
| align="center"| 0 || S1  || S8  || S4    || S2  || S1  || 0-9 ||  1-second digit register
 +
|-
 +
| align="center"|1 || S10  || *  || S40  || S20  || S10  || 0-5 || 10-second digit register
 +
|-
 +
| align="center"|2 || MI1  || mi8 || mi4  || mi2  || mi1  || 0-9 ||  1-minute digit register
 +
|-
 +
| align="center"| 3 || MI10 || *  || mi40  || mi20 || mi10 || 0-5 || 10-minute digit register
 +
|-
 +
| align="center"| 4 || H1  || h8  || h4    || h2  || h1  || 0-9 ||  1-hour digit register
 +
|-
 +
| align="center"| 5 || H10  || *  || PM/AM || h20  || h10  || 0-2 or 0-1 || PM/AM 10-hour digit register
 +
|-
 +
| align="center"| 6 || D1  || d8  || d4    || d2  || d1  || 0-9 ||  1-day digit register
 +
|-
 +
| align="center"| 7 || D10  || *  || *    || d20  || d10  || 0-3 || 10-day digit register
 +
|-
 +
| align="center"| 8 || MO1  || mo8 || mo4  || mo2  || mo1  || 0-9 ||  1-month digit register
 +
|-
 +
| align="center"| 9 || MO10 || *  || *    || *    || MO10 || 0-1 || 10-month digit register
 +
|-
 +
| align="center"| A || Y1  || y8  || y4    || y2  || y1  || 0-9 ||  1-year digit register
 +
|-
 +
| align="center"| B || Y10  || y80 || y40  || y20  || y10  || 0-9 || 10-year digit register
 +
|-
 +
| align="center"| C || W    || *  || w4    || w2  || w1  || 0-6 || Week register (0=Sunday)
 +
|-
 +
| align="center"| D || CD  ||  30 sec. ADJ || IRQ FLAG || BUSY || HOLD || -  || Control Register D
 +
|-
 +
| align="center"| E || CE  || t1  || t0    || ITRPT /STND || MASK || -  || Control Register E
 +
|-
 +
| align="center"| F || CF  || TEST|| 24/12 || STOP || REST || -  || Control Register F
 +
|}
 +
:REST = RESET
 +
:ITRPT/STND = INTERRUPT/STANDARD
 +
:
 +
:<B>Note 1)</B> Bit * does not exist (unrecognized during a write and held at "0" during a read).
 +
:<B>Note 2)</B> Be sure to mask the AM/PM bit when processing 10's of hour's data.
 +
:<B>Note 3)</B> BUSY bit is read only. The IRQ FLAG bit can only be set to a "0". Setting the IRQ FLAG to a "1" is done by hardware.
 +
:<B>Note 4)</B> PM at 1 and AM at 0 for PM / AM bit.
 +
 
 +
 
 
[http://amigahardware.mariomisic.de/cgi-bin/showhardware_en.cgi?HARDID=1683 Micronik: Realtime Clock for Clockport, RTC]<br>
 
[http://amigahardware.mariomisic.de/cgi-bin/showhardware_en.cgi?HARDID=1683 Micronik: Realtime Clock for Clockport, RTC]<br>
 +
 +
Pin maps:
 +
:[[Minimig Board v1.0 MCU connections|MCU pins]]
 +
:[[Minimig Board v1.0 FPGA connections|FPGA pins]]

Latest revision as of 19:49, 29 August 2007

Real time clock that keeps the time over power cycling.
Advantages:

  • Disc files get correct date
  • Any software dependent on date will work correctly (astronomy/satellite?)

Commodore: A501 Rev5, 512k + RTC

RAM organised as 16 x (Sanyo LM33256G-12 DIP16) 1 x 256kbit Dynamic RAM
RTC 5 Volt "OKI M6242B" U9 DIP18 clocked with a 32768 Hz crystal, backed up by a 3,6V NiCd battery
M6242B datasheet
Register table:
Address Input Register name Data Count value Description
D3 D2 D1 D0
0 S1 S8 S4 S2 S1 0-9 1-second digit register
1 S10 * S40 S20 S10 0-5 10-second digit register
2 MI1 mi8 mi4 mi2 mi1 0-9 1-minute digit register
3 MI10 * mi40 mi20 mi10 0-5 10-minute digit register
4 H1 h8 h4 h2 h1 0-9 1-hour digit register
5 H10 * PM/AM h20 h10 0-2 or 0-1 PM/AM 10-hour digit register
6 D1 d8 d4 d2 d1 0-9 1-day digit register
7 D10 * * d20 d10 0-3 10-day digit register
8 MO1 mo8 mo4 mo2 mo1 0-9 1-month digit register
9 MO10 * * * MO10 0-1 10-month digit register
A Y1 y8 y4 y2 y1 0-9 1-year digit register
B Y10 y80 y40 y20 y10 0-9 10-year digit register
C W * w4 w2 w1 0-6 Week register (0=Sunday)
D CD 30 sec. ADJ IRQ FLAG BUSY HOLD - Control Register D
E CE t1 t0 ITRPT /STND MASK - Control Register E
F CF TEST 24/12 STOP REST - Control Register F
REST = RESET
ITRPT/STND = INTERRUPT/STANDARD
Note 1) Bit * does not exist (unrecognized during a write and held at "0" during a read).
Note 2) Be sure to mask the AM/PM bit when processing 10's of hour's data.
Note 3) BUSY bit is read only. The IRQ FLAG bit can only be set to a "0". Setting the IRQ FLAG to a "1" is done by hardware.
Note 4) PM at 1 and AM at 0 for PM / AM bit.


Micronik: Realtime Clock for Clockport, RTC

Pin maps:

MCU pins
FPGA pins