Download SH6605

Transcript
SH6605
3. RAM
The Built-in SRAM contains general-purpose data memory, LCD RAM, and system registers. They can be accessed by direct
addressing in one instruction.
The following is the memory allocation map:
$000 - $01F: System register and I/O;
$020 - $1FF: Data memory (480 X 4bits, partitioned into 4 banks).
$300 - $321, $350 - $36D: LCD RAM space (34 X 4 bits).
The Configuration of System Register
Address
Bit3
$00
IEX
$01
IRQX
$02
TM0.3
$03
BTM.3
$04
T0L.3
$05
T0H.3
$06 - $07
$08
PA.3
$09
PB.3
$0A
$0B
PACR.3
$0C
PBCR.3
$0D
$0E
TBR.3
$0F
INX.3
$10
DPL3
$11
$12
-
Bit2
Bit1
Bit0
IET0
IRQT0
TM0.2
BTM.2
T0L.2
T0H.2
PA.2
PB.2
PACR.2
PBCR.2
TBR.2
INX.2
DPL2
DPM.2
DPH.2
IEBT
IRQBT
TM0.1
BTM.1
T0L.1
T0H.1
PA.1
PB.1
PC.1
PACR.1
PBCR.1
TBR.1
INX1
DPL1
DPM.1
DPH.1
IEP
IRQP
TM0.0
BTM.0
T0L.0
T0H.0
PA.0
PB.0
PC.0
PACR.0
PBCR.0
TBR.0
INX.0
DPL0
DPM.0
DPH.0
$13
PPULL
PAM2
PAM1
HLM
$14
OXS
-
OXM
OXON
$15
LPS1
LPS0
LCDOFF
Should
Be
Set “1”
$16
LPD
O/S
-
-
$17
C1.3
C1.2
C1.1
C1.0
$18
OCT1
C1.6
C1.5
C1.4
$19
$1A
$1B
C2.3
C2.7
C2.11
C2.2
C2.6
C2.10
C2.1
C2.5
C2.9
C2.0
C2.4
C2.8
$1C
OCT2
C2.14
C2.13
C2.12
$1D
VOL1
VOL0
CH2EN
CH1EN
$1E
SEL1
SEL0
C2M
C1M
$1F
-
-
-
-
Function
Interrupt enable flags
Interrupt request flags
Timer0 mode register
Base timer mode register
Timer0 load/counter low nibble
Timer0 load/counter high nibble
Reserved
PORTA
PORTB
Bonding option
Set PORTA to be output port
Set PORTB to be output port
Reserved
Table branch register
Index register (INX)
Data pointer for INX low nibble
Data pointer for INX middle nibble
Data pointer for INX high nibble
Bit1, 2: PA.1 & PA.2 as PSG output or I/O PORT
Bit0: Heavy load mode
Bit3: Port pull-up control
Bit0: Turn on OSCX oscillator
Bit1: CPU clocks select (1:OSC X /0:OSC)
Bit3: OSCX type selection
Bit0: programmer should set “1”
Bit1: LCD off
Bit2, 3: LCD frequency control
Bit2: Set LCD segment as output
Bit3: LCD Power degrade
PSG channel 1 low nibble
PSG channel 1 high nibble
Bit3: channel 1 octave shift control
PSG channel 2 nibble 1 or alarm output
PSG channel 2 nibble 2
PSG channel 2 nibble 3
PSG channel 2 nibble 4
Bit3: channel 2 octave shift control
Bit0, Bit1: Channel 1, 2 enable
Bit2, Bit3: volume control
Bit0, 1: PSG1, PSG2 mode control
Bit2, 3: PSG1, PSG2 clock source selection
Reserved
System Register $00 - $12. (Please refer to SH6610C User’s manual)
5
Initial
Value
0000
0000
0000
0000
0000
0000
0000
0000
01 (default)
0000
0000
0000
0000
0000
0000
0000
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R
W
W
R/W
R/W
R/W
R/W
R/W
0000
R/W
0000
R/W
0000
R/W
0000
R/W
0000
W
0000
W
0000
0000
0000
W
W
W
0000
W
0000
W
0000
W
-
-
R/W