English
Language : 

SM5K3 Datasheet, PDF (19/28 Pages) Sharp Electrionic Components – 4-Bit Single-Chip Microcomputers(Controllers With 10-Bit A/D Converter)
SM5K3/SM5K4/SM5K5
MODE REGISTERS
The registers which control functions of the
SM5K3/5K4/5K5 and which serve as counter/timer are
commonly referred to as “mode registers”. In the
SM5K3/5K4/5K5, R8 to RB are 8-bit mode registers;
and R3, RC, RE and RF are 4-bit mode registers.
To set data into the mode registers, the OUT
command is used; and to check the contents of the
mode registers IN command is used.
R3 (A/D pin selection register)
Any pin on 4-pin port P3 can be set accommodate
analog voltage (hereafter called A/D pin).
Bit 3
0
Bit i (i = 3 to 0)
Sets P3i pin to either general purpose input or
A/D pin
0 | (General purpose) input
1 | A/D input
∗ Select one pin which is to be selected by mode register R8.
R8 (A/D conversion control & A/D data
register)
An 8-bit register used to control A/D conversion
and storing part of A/D conversion result. It also
stores the results of comparison.
Bit 7
0
Bit 5
∗ A/D operation enable/disable flag
0 | Disable (A/D power source off)
1 | Enable (A/D power source on)
Bit 4
Storages of comparison result (read only)
0 | P3i pin voltage < internal setting voltage
1 | P3i pin voltage > internal setting voltage
(i = 3 to 0)
Bit 3
∗ S/R flag (start/clear)
0 | End of operation (or stop)
1 | Start of operation (or in operation)
Bit 2
Operation mode selection
0 | A/D conversion
1 | Comparison
Bits 1 to 0
Select one of A/D pins as A/D conversion
00 | P30
01 | P31
10 | P32
11 | P33
∗ When operation is end, these bits are cleared.
R9 (A/D data register)
The register to store the upper 8-bit of 10-bit data
resulting from A/D conversion.
Bit 7
0
Bits 7 to 6
Storage of A/D conversion result (A/D conversion
mode) and setting of internal voltage (comparison
mode)
• Use as part of a 10-bit data ragister in
combination with mode register R9.
• Bit R86 is the LSB.
• Store lower 2-bit of converted data in A/D
conversion mode.
• Use as lower 2-bit of internal voltage setting
data in comparison mode.
Bit i (i = 7 to 0)
Storages of A/D conversion result (A/D conversion
mode) and setting of internal voltage (comparison
mode)
• Uses as part of a 10-bit data register in
combination with mode register R8.
• Bit R97 is the MSB.
• Stores upper 8-bit of A/D conversion result.
• Uses as upper 8-bit of internal voltage setting
data in comparison mode.
- 19 -