sh6613d SinoWealth Micro-Electronics Corp. Ltd, sh6613d Datasheet

no-image

sh6613d

Manufacturer Part Number
sh6613d
Description
4k 4-bit Microcontroller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
Features
General Description
SH6613D is a single chip microcontroller integrated with SRAM, timer and dual-tone PSG, LCD driver and I/O port. This chip
builds in a dual-oscillator to enhance the total chip performance.
Pad Diagram
- External interrupts ( INT0 ).
- Internal interrupt (Timer0).
- Internal interrupt (Base Timer).
- Port's falling edge interrupt: PORTB ( INT1 )
SH6610C-based single-chip 4-bit micro-controller
ROM: 4096 × 16 bits
RAM: 512 × 4 bits
Operation voltage: 2.4V – 6.0V
8 CMOS bi-directional I/O pins
4-Level subroutine nesting (include interrupts)
One 8-bit auto re-load timer/counter
Warm-up timer for power-on reset
Powerful interrupt sources:
8-bit Base timer
LCD driver: 136 dots(1/4 duty 1/3 bias)
LCD used as scan output
SEG17
SEG16
SEG15
SEG14
SEG13
SEG12
SEG11
SEG10
SEG9
SEG8
SEG7
SEG6
SEG5
SEG4
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
S
E
G
3
S
E
G
1
8
43
1
S
E
G
2
S
E
G
1
9
42
2
S
E
G
1
S
E
G
2
0
41
3
V
L
C
D
S
E
G
2
1
40
4
1
V
S
E
G
2
2
39
5
V
2
S
E
G
2
3
38
SH6613D
6
3
V
S
E
G
2
4
37
7
T
E
S
T
S
E
G
2
5
36
8
E
E
T
_
R
S
4K 4-Bit Microcontroller with LCD Driver
VDD
S
E
G
2
6
35
9
C.
P
1
S
E
G
2
7
34
10
P
B.
1/33
3
S
E
G
2
8
33
11
P
B.
2
S
E
G
2
9
32
12
P
B.
1
Low power consumption
S
E
G
3
0
31
13
Built-in dual tone PSG with one noise generator
2 Clock source
OSC: (code option select crystal or RC type)
- Crystal oscillator 32.768K
- RC oscillator: 262K
OSCX: (system register select ceramic or RC type)
- Ceramic oscillator 455K
- RC oscillator 1.8M or 2M
Instruction cycle time:
- 122.07 µ s for 32.768 kHz crystal
- 15.27 µ s for 262 kHz RC
- 8.79 µ s for 455KHz ceramic
- 2.22 µ s for 1.8 MHz RC
- 2 µ s for 2.0 MHz RC
Two low power operation mode: HALT and STOP
GND
P
B.
0
S
E
G
3
1
30
14
P
3
A.
20
S
E
G
3
2
29
28
27
26
25
24
23
22
21
19
17
16
15
18
OSCI
OSCO
PA.0
PA.1
PA.2
SEG33
SEG34
COM4
COM3
COM2
COM1
PC.0
OSCXO
OSCXI
SH6613D
V1.0

Related parts for sh6613d

sh6613d Summary of contents

Page 1

... LCD driver: 136 dots(1/4 duty 1/3 bias) LCD used as scan output General Description SH6613D is a single chip microcontroller integrated with SRAM, timer and dual-tone PSG, LCD driver and I/O port. This chip builds in a dual-oscillator to enhance the total chip performance. Pad Diagram SEG17 ...

Page 2

... Bit programmable I/O ,Vector interrupt( INT1 ) Bit programmable I/O,PA.0 shared with INT0 I/O PA.1 , PA.2shared with PSG output I Oscillator X input pin O Oscillator X output pin P Ground pin O Oscillator output pin I Oscillator input pin O Common signal output for LCD display 2/33 SH6613D OSCI OSCO OSCXI OSCXO PORTB[0:3] PA.1(PSG) PA.0(INT0 ) PA.2(PSG) PA.3 COM[1:4] SEG[1:34] V1.0 ...

Page 3

... The ALU provides the following functions: Binary addition/subtraction (ADC, SBC, ADD, SUB, ADI, SBI) 2. ROM SH6613D can address 4096×16 bit of program area $000 to $FFF. There is an area from addresses $000 through $004 that is reserved for special interrupts service routines as starting vector address. Address Instruction ...

Page 4

... C2.12 PSG channel 2 nibble 4 Bit3:channel 2 octave shift control CH2EN CH1EN Bit0,Bit1:Channel 1,2 enable Bit2,Bit3:volume control C2M C1M Bit0,1:PSG1,PSG2 mode control Bit2,3:PSG1,PSG2 clock source selection - - Reserved 4/33 SH6613D Initial Function Value 0000 0000 0000 0000 0000 0000 0000 0000 01(default) 0000 0000 0000 ...

Page 5

... Oscillator circuit 5.1 Circuit Configuration SH6613D has two on-chip oscillation circuits OSC and OSCX. OSC is a low frequency crystal (Typ. 32.768KHz (Typ.262KHz) determined by the code option. This is designed for low frequency operation. OSCX also has two types: ceramic (Typ.455KHz (1.8M or 2MHz) to determine by software option. ...

Page 6

... If the OSCX is not used, it must be masked to be Ceramic resonator and the OSCXI must be connected to GND. RBIAS OSCI 32768Hz XTL RF OSCO 5-6p RBIAS OSCI RO Ring Oscllator OSCO OX OFF OSCXI 455KHz RF Ceramic OSCXO OSCI RO Ring Oscllator OSCO 6/33 CPU STOP TO CPU RO CPU STOP TO CPU CPUSTOP TO CPU CPUSTOP OX OFF TO CPU SH6613D V1.0 ...

Page 7

... PORT control register (PACR, PBCR) controls ON/OFF of the output buffer. 7.1 PORTA~B These ports contain 8-bidirectional I/O ports. The circuit configuration of PORTA~B as below. I/O ports of SH6613D can be accessed by read/write system register. User can output any value to any I/O port bit at any time. Memory map addresses are listed as follow: Address ...

Page 8

... HEAVYLOAD Bit2 PACR.2 PBCR.2 Bit1 Bit0 Function PAM1 HLM Bit1,2:Select PA.1,PA.2 as I/O port or PSG output Bit0:Hevey load mode Bit3:Port pull-up control 0:Disable pull-up MOS 0 HLM 1 ON OFF 1 Instruction Cycle Time 8/33 SH6613D Bit1 Bit0 PACR.1 PACR.0 PBCR.1 PBCR.0 1:Enable 1:Enable pull-up MOS R/W V1.0 ...

Page 9

... CHANNEL1 OSC MPX CHANNEL2 SEL0 SEL1 /2 PSG CLK CLK-SLECTOR /16 Clk source OSC OSC=32.768K OSC=262K OSC/2 OSC=32.768K OSC=262K OSCX OSCX=1.8M OSCX=455K OSCX/16 OSCX=1.8M OSCX=455K 9/33 CH1 CLK PSG MIXER PSG CH2 CLK PSG clk 32.768K 262K 16.384K 131K 1.8M 455K 112.5K 28.4K SH6613D V1.0 ...

Page 10

... It can be a 15-bit wide-band noise generator or a 7-bit sound generator. It can also create an alarm envelope signal. 0 CH1 is Sound generator. 0 CH1 is Sound generator. 1 CH1 is Sound generator. 10/33 /2 CH1 OUT C2M SELECTOR CH2 OUT /2 ENEVLOP Function CH2 is Sound generator. CH2 is Noise generator. CH2 is Alarm mode register. SH6613D V1.0 ...

Page 11

... TIME SLOT VOL0 VOL1 VOL TIME SLOT CONTROL 0 PA.1:I/O PORT PA.2:I/O PORT 1 PA.1:PSG output PA.2:I/O PORT 0 PA.2: PSG output PA.1:I/O PORT 1 PA.1:PSG output PA.2: PSG output NO YES YES YES 11/33 PAM1 PA.1 I/O PA.1 SELECTOR1 PSG PSG PA.2 SELECTOR2 PA.2 I/O PAM2 Function VOL1 VOL0 Vol. Level SH6613D V1.0 ...

Page 12

... SH6613D V1.0 ...

Page 13

... Then he can select OCT1=0 and the value of channel 1 LSFR (C1.6~C1.0)=4F,so the N =81. Please see the Music table1. So the channel 1 sound frequency=112.5Khz/1/(2×81)=694.4Hz ≒ the F5 sound frequency . (5) Lastly, he should select the VOL1=1 and VOL0=0, so the VOL level=3. Note: Example2: CH1EN=0;CH2EN=1 OSCX=1.8M,SEL0=SEL1=1 So PSG clk =112kHz;Switch clk=28kHz; Vol. clk=112kHz 13/33 SH6613D V1.0 ...

Page 14

... Then select channel 1 alarm mode (C1M=1), and OCT1=0,C2.0~C2.3 are set to 00H. VOL1, VOL2=1,1. Then select C1.6~C1.0=7E, so that N=6 and the PSG output frequency=455KHz/1/(2×6)=37.92KHz. Or select C1.6~C1.0=78,so that N=4 and the PSG output frequency=455KHz/1/(2×4)=56.87KHz. C2.0 Alarm output control 0 DC envelop 1 1Hz output X 4Hz output X 8Hz output X 32Hz output 14/33 SH6613D V1.0 ...

Page 15

... Timer 0 SH6613D has one 8-bit timer. The timer consists of an 8-bit up counter and an 8-bit preload register. The timers provide the following functions: • Programmable internal timer function • Read the counter values 9.1 Timer 0 configuration and operation The timer 0 consists of an 8-bit write-only timer load register (TL0L, TL0H) and an 8-bit read-only timer counter (TC0L, TC0H). ...

Page 16

... BTM.3=1: Enable the base timer BTM.2=1: reset the base timer Prescaler Ratio /16 MPX / /16 4Bit Scaler 16/33 Bit0 Function BTM.0 Base timer mode register Clock source 4096Hz or 32KHz 4096Hz or 32KHz 4096Hz or 32KHz 4096Hz or 32KHz 8 Bit base timer counter reset SH6613D V1.0 ...

Page 17

... SH6613D Bit 0 Should be set "1" 1,0 1,1 1Hz 1/8Hz 1.7Hz 1Hz 1/8Hz 6.9Hz 1Hz 1/8Hz 7.6Hz 8Hz 1Hz 1.7Hz 1Hz 6.9Hz 8Hz 1Hz 7 ...

Page 18

... SEG28 SEG28 SEG28 SEG29 SEG29 SEG29 SEG30 SEG30 SEG30 SEG31 SEG31 SEG31 SEG32 SEG32 SEG32 SEG33 SEG33 SEG33 SEG34 SEG34 SEG34 SH6613D Bit0 COM1 SEG18 SEG19 SEG20 SEG21 SEG22 SEG23 SEG24 SEG25 SEG26 SEG27 SEG28 SEG29 SEG30 SEG31 SEG32 SEG33 SEG34 V1.0 ...

Page 19

... SEG13 364H 35DH SEG14 365H 35EH SEG15 366H 35FH SEG16 367H 1/4 DUTY 1/3 BIAS SELECT UNSELECT OM SELECT UNSELECT G 19/33 SH6613D Bit0 Address Bit0 SEG17 368H SEG25 SEG18 369H SEG26 SEG19 36AH SEG27 SEG20 36BH SEG28 SEG21 36CH SEG29 SEG22 36DH SEG30 ...

Page 20

... Interrupt 4 interrupt sources are available on SH6613D: • External interrupt ( INT0 ) • Timer0 interrupt • Base timer interrupt • Port's falling edge detection interrupt( INT1 ) The configuration of system register $0: Bit 3 Bit 2 $00 IEX IET0 $01 IRQX IRQT0 12.1 External Interrupt ( INT0 ) External interrupt is shared with the PA.0, falling edge active. When the bit 3 of the register $0 (IEX) is set to 1, the external interrupt is enabled, writing a " ...

Page 21

... V DD PC.1 PCB PC PC.1 PCB PC SH6613D Bonding Option CPU core Wake up Executing after wake up Hold RST , INT0 , a) If RST signal valid, system will be reset. INT1 b) If INT0 , INT1 signal valid, system will enter interrupt subroutine, and then execute the main program to continue. ...

Page 22

... AC, Mx ← ← AC, Mx ← AC, Mx ← Mx ⊕ I AC, Mx ← AC, Mx ← Mx & I Function AC; Mx ← Decimal adjust for add. AC; Mx ← Decimal adjust for sub. 22/33 SH6613D Flag Change Flag Change ...

Page 23

... ← ← X (Include p) PC ← (PC11-C8)(TBR)(AC) No Operation I Immediate data ⊕ Logical exclusive OR | Logical OR & Logical AND bbb RAM bank=000 23/33 SH6613D Flag Change Flag Change if AC ≠ CY ≠ AC(0)=1 if AC(1)=1 if AC(2)=1 if AC(3)= ROM page = 0 ST Stack TBR Table Branch Register V1 ...

Page 24

... PORTA.0, PORTA.3, PORTB (I OL PORTA.1, PORTA.2 or PSG output, I PORTA.1, PORTA.2 or PSG output, I SEGx, C=50P, rise time<1000ns SEGx SEG1 - 30to be output port, I =-1mA OH SEG1 - 30to be output port, I =1mA OL COMx -1mA. OH COMx 1mA =3V, exclude CPU core operation current DD SH6613D = 0). = -2mA). = 2mA). = -5mA 5mA. OL V1.0 ...

Page 25

... F =262KHz OSC OSCX Min. Typ. Max. Unit Conditions - - 100 µ s [F(3.0)-F(2.5)]/F(3.0), Bias resistance accuracy - - 10 % within 1% =25 ℃ =262KHz OSC OSCX Min. Typ. Max. Unit - - 10 % 25/33 SH6613D stop, unless otherwise specified) stop, unless otherwise specified) Conditions [F(4.5)-F(3.6)]/F(4.5), Bias resistance accuracy within 1% V1.0 ...

Page 26

... V (Volts Typical RC oscillator Frequency vs (Reference only R=919KΩ R=108KΩ 26/33 270 260 250 240 230 (Volts) DD 2100 1900 1700 1500 1300 (Volts) DD 2300 2100 1900 1700 R=91KΩ V (Volts) DD SH6613D : V1.0 ...

Page 27

... V OSCXI DD 10KΩ RESET OSCXO I/O PORTB PORTA.1 OSCO 32768Hz PORTA.2 OSCI 12p TEST GND 1/4 duty 1/3 bias V OSCXI DD 10KΩ RESET OSCXO PORTA I/O PORTB PORTA.0 OSCO Ω 930K OSCI GND TEST 27/33 20p 455KHz 100 Ω BUZZER Ext.int SH6613D V1.0 ...

Page 28

... SEG2 SEG1 PORTB0 PORTB1 PORTB2 PORTB3 SEG1~SEG4 as SCAN outpost V OSCXI DD 10KΩ RESET OSCXO I/O PORTB PORTA.1 OSCO OSCI PORTA.2 GND TEST LCD PANNEL 28/33 SPEAKETR 100~120KΩ (V =3~5v) DD 10KΩ 8050 KEY BOARD SH6613D V1.0 ...

Page 29

... AP5: Large LCD panel: External LCD bias 1/3 Bias Normal LCD pannel V LCD V SH6613D floating 3 29/33 SH6613D 1/3 Bias Large LCD pannel V LCD Ext SH6613D Ext Ext V1.0 ...

Page 30

... SH6613D Real Error% freq. 494.04 0.03% 521.48 -0.34% 586.67 -0.11% 662.59 0.51% 695.31 -0.45% 782.22 -0.23% 880.00 0.00% 988.07 0.03% 1042.96 -0.34% 1173.33 -0.11% 1309.77 -0.66% 1408.00 0.79% 1564.44 -0.23% 1760.00 0.00% 1942.07 -1.69% 2085.93 -0.34% 2346.67 -0.11% 2681.90 1.70% 2816.00 0.79% 3128.89 -0.23% 3520 ...

Page 31

... SH6613D Real Error% freq. 260.06 -0.60% 292.57 -0.37% 327.68 -0.59% 348.60 -0.18% 390.10 -0.48% 442.81 0.64% 496.48 0.53% 528.52 1.01% 585.14 -0.37% 655.36 -0.59% 712.35 1.99% 780.19 -0.48% 862.32 -2.01% 963.76 -2.43% 1024.00 -2.15% 1170.29 -0.37% V1.0 ...

Page 32

... SEG[12] -814.50 SEG[11] -814.50 SEG[10] -814.50 SEG[9] -814.50 SEG[8] -814.50 SEG[7] -814.50 SEG[6] -814.50 SEG[5] -814.50 SEG[4] -814.50 SEG[3] -814.50 SH6613D Y( µ m) 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 756.00 639.00 531.00 423.00 319 ...

Page 33

... Ordering Information Part No. Package SH6613DH CHIP FORM 33/33 SH6613D V1.0 ...

Related keywords