sh6613 SinoWealth Micro-Electronics Corp. Ltd, sh6613 Datasheet

no-image

sh6613

Manufacturer Part Number
sh6613
Description
4k 4-bit Microcontroller With Lcd Driver
Manufacturer
SinoWealth Micro-Electronics Corp. Ltd
Datasheet
Features
General Description
SH6613 (SH6613B, SH6613C) 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
SH6613B
SH6613C
6
3
V
SH6613
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.
3
1/33
S
E
G
2
8
33
11
P
B.
2
S
E
G
2
9
32
12
P
B.
1
S
31
13
Low power consumption
E
G
3
0
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
P
B.
GND
0
S
E
G
3
1
30
14
P
A.
3
20
S
E
G
3
2
29
28
27
26
25
24
23
22
21
19
17
16
15
18
OSCO
COM4
COM3
COM2
COM1
OSCI
PC.0
OSCXO
OSCXI
PA.0
PA.1
PA.2
SEG33
SEG34
SH6613B
SH6613C
SH6613
V1.2

Related parts for sh6613

sh6613 Summary of contents

Page 1

... LCD driver: 136 dots(1/4 duty 1/3 bias) LCD used as scan output General Description SH6613 (SH6613B, SH6613C 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 ...

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 SH6613/B/C 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.2 ...

Page 3

... The ALU provides the following functions: Binary addition/subtraction (ADC, SBC, ADD, SUB, ADI, SBI) 2. ROM SH6613/B/C 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 SH6613/B/C Initial Function Value 0000 0000 0000 0000 0000 0000 0000 0000 01(default) 0000 0000 0000 ...

Page 5

... Oscillator circuit 5.1 Circuit Configuration SH6613/B/C 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 SH6613/B/C V1.2 ...

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 SH6613/B/C 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 SH6613/B/C Bit1 Bit0 PACR.1 PACR.0 PBCR.1 PBCR.0 1:Enable 1:Enable pull-up MOS R/W V1.2 ...

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 SH6613/B/C V1.2 ...

Page 10

... CH2EN 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 SH6613/B/C /2 CH1 OUT C2M SELECTOR CH2 OUT /2 ENEVLOP Function CH2 is Sound generator. CH2 is Noise generator. ...

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 SH6613/B V1.2 ...

Page 12

... SH6613/B V1.2 ...

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 SH6613/B/C V1.2 ...

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 SH6613/B/C V1.2 ...

Page 15

... Timer 0 SH6613/B/C 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 SH6613/B/C 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 V1.2 ...

Page 17

... SH6613/B/C 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

... SEG11 31BH SEG12 SEG12 31CH SEG13 SEG13 31DH SEG14 SEG14 31EH SEG15 SEG15 31FH SEG16 SEG16 320H SEG17 SEG17 321H 18/33 SH6613/B/C LCD com1 common ~ driver com4 LCD seg1 segment driver ~ & scan seg34 output Bit 1 Bit level designed to DD Bit3 ...

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 SH6613/B/C 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 SH6613/B/C: • 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

... Hold RST , INT0 , a) If RST signal valid, system will be reset. INT1 ,T0INT b) If INT0 , INT1 , T0INT or BTINT signal valid, system will enter interrupt subroutine first, then execute the main BTINT program to continue. 21/33 SH6613/B GND PC.0 PC GND PC.0 PC ...

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 SH6613/B/C 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 SH6613/B/C 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

... A ×0.8 3.0V). DD ×0. 3.0V). DD ×2. 24/33 SH6613/B/C Conditions All output pins unload execute NOP instruction exclude LCD bias current All output pins unload (HALT mode) exclude LCD bias current All output pins unload (STOP mode), LCD off PORTA, PORTB INT0, RESET ...

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 SH6613/B/C stop, unless otherwise specified) stop, unless otherwise specified) Conditions [F(4.5)-F(3.6)]/F(4.5), Bias resistance accuracy within 1% V1.2 ...

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 SH6613/B V1.2 ...

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 SH6613/B/C 20p 455KHz 100 Ω BUZZER Ext.int V1.2 ...

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 SH6613/B/C V1.2 ...

Page 29

... AP5: Large LCD panel: External LCD bias 1/3 Bias Normal LCD pannel V LCD V SH6613/B floating 3 29/33 SH6613/B/C 1/3 Bias Large LCD pannel V LCD Ext SH6613/B/C Ext Ext V1.2 ...

Page 30

... SH6613/B/C 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

... SH6613/B/C 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.2 ...

Page 32

... SH6613/B/C 29 SEG32 28 SEG33 27 SEG34 26 COM4 25 COM3 24 COM2 23 COM1 1680µm 22 OSCI 21 OSCO PC.0 19 OSCXO 18 OSCXI 17 PA.0 16 PA.1 PA.2 15 Designation X(µm) SEG[32] 900.00 SEG[31] 770 ...

Page 33

... Ordering Information Part No. Package SH6613H CHIP FORM SH6613BH CHIP FORM SH6613CH CHIP FORM 33/33 SH6613/B/C V1.2 ...

Related keywords