ROM or 2 Mbits SRAM
SED15X(KSX), MC141X and HD66410
·
series LCD driver compatible interface
option
46 bytes message buffer
·
One 16-bit timer and one 8-bit timer
·
General Description
The HT9580 is a high performance pager controller which can be used for Chinese Pager
system applications. The HT9580 4-in-1 Character Pager Controller combines a POCSAG decoder with a M6502 microprocessor core, 2
Mbits Character ROM and 256 Kbits SRAM to
provide both high decoder performance and excellent system flexibility. The decoder utilizes a
2-bit random error correction algorithm and
Internal 2Hz or 1Hz RTC or Real Time
·
Clock option
Single buzzer generator output (BZ) with
·
duty cycle control
low current HALT mode operation
·
16-bit watchdog timer
·
Built-in data filter (16-times over-sampling )
·
and bit clock recovery
Advanced synchronization algorithm
·
2-bit random and (optional) 4-bit burst er
·
ror correction for address and message
Up to 6 user addresses and 6 user frames,
·
independently programmable
3 RF power-on timing control pins
·
and Received data inversion (optional)
Built in SPI circuit
·
Out-of-range condition indicator
·
One internal 8-bit D/A converter
·
Battery fail and battery low detection
·
80-pin LQFP package
·
therefore provides excellent decoder sensitivity. The controller contains a full function
pager decoder at a 512, 1200, 2400 bps data
rates. Using an M6502 core takes advantage of
a flexible external control interface, LCD driver
chips and abundant programming resources
from worldwide providers. The internal SPI
would communicate with SPI of FLEX
speed pager decoder.
2LCD_CS1
3LCD_CS0
4LCD_CLOLCD driver clock output
5LCD_A0OLCD driver data/command select control
6LCD_RWOLCD Driver Read/Write signal output
7LCD_EOLCD driver enable clock control
15~8D0~D7I/O8-bit, tristate, bidirectional I/O data bus.
16R/W
17SRAM_CE
18MASK_CE
19OE
20PSENO
21~24RA17~RA14OExtended address bus pins
26P_MODEI
27, 57, 78 VSS
43~28A0~A15O
44TMR1ISchmitt trigger input for timer1 counter with pull-high resisor.
45~52PB0~PB7I/O
53~54PC0~PC1I/O
55BZOBuzzer non-inverting BZ output
Positive power supply
¾
OLCD driver chip select control (for slave LCD driver)
OLCD driver chip select control (for master LCD driver)
ORead/Write signal output
SRAM chip Enable. This signal is generated from the HT9580 to
O
provide read or write timing for external SRAM devices. (See Ap
plication Circuit)
Mask ROM Chip Enable. This signal is generated from the
O
HT9580 to provide read timing for external Mask ROM devices.
(See Application Circuit)
Mask ROM or SRAM Output Enable. This signal is generated
O
from the HT9580 to provide read timing for external Mask ROM
and SRAM devices. (See Application Circuit)
Program Store Enable. This pin is used to connect the OE
pins of the external 44 Kbytes program ROM when the
²MODE_P² internal pad is connected to VSS. (See note)
Internal or external program ROM selection without pull-high resistor. If the pin connects to VDD, the internal program ROM will
be fetched (normal type), otherwise the external program ROM
will be fetched when the pin connects to VSS (Romless).
Negative power supply
¾
Address bus pins. This is used for memory and I/O exchanges on
the data bus.
General Input/Output Port B. The input cell structures can be se
lected as CMOS or CMOS with pull-high resistors.
General Input/Output Port C. The input cell structures can be se
lected as CMOS or CMOS with pull-high resistors.
and CE
-
-
-
4April 28, 2000
Preliminary
Pin No.Pin NameI/ODescription
BALIBattery voltage detector input with pull-high resistor.
SPI slave ready ¾ This slave ready pin is a Schmitt trigger input
58
59BAF
60DA_OUTOD/A converter output. This pin is an 8-bit D/A analog output
61RSSII
62
63
64
65
66TS
72~67PA0~PA5I/O
73RESETISchmitt trigger reset input, active low.
74TSC
75TS1
77
76
80
79
SRDY
DII
MISOI
BS3OPLL power control enable, CMOS output
MOSIO
BS2ORF quick charge control enable, CMOS output
SCKI/O
BS1OPager receiver power control enable output, CMOS output
SS
OSC1
OSC2
X1
X2
with pull-high resistor. When the slave initiates the SPI transfer,
I
a high to low transition activates an interrupt. When the master
initiates the SPI transfer, a high to low transition trigger the
master to start the transfer.
IBattery fail indication input, active low.
RSSI output from IF circuit. This pin should be pulled high or low
externally when this pin is not used.
POCSAG code input serial data. CMOS input with pull-high re
sistor.
SPI master-in-slave-out ¾ this is the data input with pull-high
resistor for SPI communications.
SPI master-out-slave-in ¾ this is the data output for SPI commu
nications.
SPI serial clock ¾ the SCK signal is used to synchronize the data
transfer. If HT9580 is in the master mode, the SCK is output
clock. Otherwise, SCK is input clock if HT9580 is in the slave
mode.
SPI slave select ¾ this signal is used to enable the SPI slave for
O
transfer.
IDecoder test mode input pin, active low with pull-high resistor.
General Input/Output Port A. These ports can be programmed to
have a wake-up capability for applications in keyboard operations
or as normal I/O. Also the input cell structures are all Schmitt
trigger types and can be selected between CMOS or CMOS with
pull-high resistors.
mC test mode input pin, active low with internal pull-high resis
I
tor. The test circuit will be activated when this pin pulls low.
Decoder test mode input pin, active low with pull-high resistor.
I
The internal test mode will be activated when this pin pulls low.
IOOSC1 and OSC2 are connected to an RC network to form a main
clock oscillator
IOX1 and X2 are connected to a crystal to form an internal low power
clock oscillator (32.768kHz, 76.8kHz, or 153.6kHz)
HT9580
-
-
-
5April 28, 2000
Absolute Maximum Ratings
Preliminary
HT9580
Supply Voltage ..............................-0.3V to 3.6V
Input Voltage .................V
Current Drain Per Pin Excluding V
-0.5V to VDD+0.5V
SS
and VSS............................................................................10mA
DD
Storage Temperature.................-55°Cto150°C
Operating Temperature ..............-30°Cto85°C
Note: These are stress ratings only. Stresses exceeding the range specified under ²Absolute Maxi
mum Ratings² may cause substantial damage tothe device.Functional operation of this de
vice at other conditions beyond those listed in the specification is not implied and prolonged
exposure to extreme conditions may affect device reliability.
There are two clock source input pins on the
chip, the main clock and the pager decoder in
put clock. The main clock is generated by an RC
network. The system clock may be the OSC in
put or the X1-clock depending on bit
²CLK_SEL². The pager decoder input clock co
mes from two external pins, X1 and X2. The fre
quency of the sub-clock will be double that of
the X1, X2 input clock. The OSC1 main clock
will be generated from an RC network that
needs an external resistor (see Application Cir
cuit). The system clock may be X1-clock, DF or
RC clock. If no higher frequency (RC) is needed,
the external resistor between OSC1 and OSC2
can be removed. The system clock can be
switched by bit ²CLK_SEL².If²CLK_SEL²=0
(POR State), the system clock will be X1-clock.
In other cases, with ²CLK_SEL²=1, the OSC in
put clock will be the system clock. The clock
switching function will assist software programmers to change the mC system clock within an adequate time if necessary. The
OSC1
OSC_MOD
0: R C
1 : D F
OSC
C ontrol
OSC
Input
HALT
Main
Clock
Frequency
Sub-clock
²OSC_MOD² bit selects the OSC input clock to
be either RC or DF. If ²OSC_MOD² is set to
²low² then the RC configuration is selected, oth
erwise the DF application is selected. The pro
grammer should note that the condition of
²CLK_SEL², ²HALT² and ²OSC_MOD² assures
that the system clock is working properly. It is
recommended that the OSC clock source is ei
ther DF or RC. If DF and RC are necessary, it is
required to switch the system clock to X1-clock
before switching between DF and RC. Then
switch the system clock back to the OSC input
by using bit CLK_SEL if the switching action of
DF and RC is complete. Before enter HALT
mode, the system clock must select X1-clock.
The HT9580 will generate two RTC frequen
cies, 1Hz and 2Hz respectively, determined by
bit RTC. If the bit is logic low, the 1Hz RTC fre
-
quency will be selected, otherwise the 2Hz RTC
frequency will be selected. The RTC counter is
enabled/disabled by bit RTCEN and can be
masked or not masked as determined by the bit
RTCMSK of the interrupt control register
SST
D oubler
DF
X1-clock
10-bit R ipple
C ounter
SST Control
X1
-
-
-
-
-
X1-clock
X1-clock
C lock S e lect
CLK_SEL
C ounter
S ystem C lock
0: X 1-clock
1: O SC Input
1H z & Tim e O ut
2H z & Tim e O ut
RTC block diagram
10April 28, 2000
RTC Tim e Out
RTC
Preliminary
(0005H). If the RTC counter is enabled, the
RTC counter will start to count. The RTC coun
ter source clock is the X1-clock, so the X1 clock
setting via by SPF12, SPF13 and SPF14 should
be correct.
In order to guarantee that the system clock has
started and stabilized, the SST (System
Start-up Timer) provides an extra delay of 1024
system clock pulse when the system is powered
up.
10
Select 2Hz as the
RTC
RTC
The low power oscillator of the pager decoder
input clock should be crystal type. The decoder
subsystem low power oscillator, on the other
hand, is of a crystal type which is designed with
a power on start-up function to reduce the sta
bilization time of the oscillator. This start-up
function is enabled by bit ²LPM² which is ini
tially set high at power on reset, and should be
cleared to low so as to enable the low-power os
cillator function. The oscillator configuration is
running in the low power mode.
The system clock oscillator can be enabled/dis
abled by the register bit, ²HALT². The system
clock circuit is powered down, when the bit is
set to high. On the other hand, the system clock
Select 1Hz as the
RTC
V
DD
-
100k
W
50k
W
50k
W
100k
W
VSS
L o w p o w e r o s c illa to r fu n c t io n
LPM
(Low power m ode control)
X2
H T 9580
X1
low power oscillator
circuit is powered up, when the bit is low. When
this bit is set high, the CPU is also stopped.
-
When this bit is cleared low, the CPU core re
turns to its normal operation. After this is set
sub-clock divided by 8. The counter is seg
mented as a 9-bit prescaler and a 7-bit user pro
grammable counter. The input clock is first
divided by 512 (9-stage) to get the nominal
time-out period. The output of the 9-bit
pre-scaler can then be divided by a 7-bit pro
grammable counter to generate the longer
watchdog time-out depending on the user¢sre
quirements. The 7-bit programmable counter is
controlled by 3 register bits, WS0~2. The
watchdog timer is enabled/disabled by a control
bit WDTEN. To prevent the overflow of this
Register
Name
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
-
be executed before the timer overflows. The
clear-WDT operation is to write any number to
the register, CLRWDT (0002H). When the
watchdog timer overflows (checked by bit 3 of
0006H ²WDTOVFG²), the program counter is
-
set to FFFC H and FFFD H to read the program
start vector. The definitions of the control bits
are listed below.
-
10
WDTEN
Enable the
watchdog timer
Disable the
watchdog timer
watchdog timer, a clear-WDT operation should
11April 28, 2000
State on
POR
Preliminary
HT9580
The WDT 7-bit counter is programmed by bits
WS0~WS2. The division ratio for the counter is
listed in the table.
WS2WS1WS0
Division
Ratio
0001:1
0011:2
0101:4
0111:8
1001:16
The other pair ²TMR0_PR0² and ²TMR0_PR1²
are used to select the prescaler ratio for timer0.
The definition is shown in the table.
The buzzer generator is composed of a 16-bit
PFD counter and aduty cycle control. The counter value is set by two registers, namely BZ-H
and BZ-L. The source for this generator may be
the system clock or the X1-clock. The buzzer
generator is enabled/disabled by the register
bit ²MGEN² in the configuration regis
ter(0000H). When this bit is set high, the
buzzer generator is activated. There is another
bit in the configuration register(0000H) which
controls the buzzer output volume, bit
²MDUT². If the bit is logic high, the output of
the BZ will be modulated by the X1-clock. The
clock source of the buzzer is selected by bit
²BZ_CLK². When BZ_CLK=0, the clock source
is the system clock. On the other hand, when
BZ_CLK=1, the value of the selector will be the
X1-clock.
The truth table for enabling/disabling the
buzzer generator is shown in the table.
10
MGEN
12April 28, 2000
Enable the
buzzer generator
Disable the
buzzer generator
Preliminary
HT9580
When BZ-L and BZ-H are all 00H, the tone gen
erator is disabled and BZ is high. The value of
the frequency divider, ranges from 2
(BZ-L=01H, BZ-H=00H)~65536 (BZ-L=FFH,
BZ-H=FFH). Writing to BZ-L only writes the
data into a low byte buffer, while writing to
BZ-H will write the high byte data and the con
tents of the low byte buffer into the PFD coun
ter.
When the buzzer generator is disabled by
clearing the ²MGEN² bit in the configuration
register (0000H), the BZ pin remains at its last
state. If the BZ pin is low, the BZ transistor in
System C lock
X1-clock
BZ_C LK=0
BZ_C LK=1
BZ_C LK
MDUT=0
MDUT=1
the application circuits is always active. There
fore it is recommended that both BZ-L and
BZ-H be cleared and that the ²MGEN² bit in the
configuration register (0000H) also be cleared,
when it is desired to disable or stop the buzzer.
The output of the 16-bit PFD counter is divided
by 2 to generate a BZ output with or without
modulation. For example, if the desired output
of BZ is 1.6kHz with modulation and the fre
quency source is X1-clock (76.8kHz), then the
value of 16-bit PFD counter is set to BZ-L=17H,
BZ-H=00H and ²MDUT² is set high.
There are two interrupts for the HT9580: a
Non-Mask Interrupt (NMI) and a generic interrupt request (IRQ). The data ready interrupt
and battery fail interrupt share the NMI call lo
cation. Which interrupt occurred can be deter
mined by checking bit BF_FG and the data
ready interrupt bit DR_FG or SPI complete flag
SPIFG (in SPI-CONFIG register). DR_FG is
the data ready interrupt indication bit. When a
valid call is detected, data begins to transfer.
Either one call is terminated or a message
buffer is full or one batch is over but the mes
sage is not terminated, the data ready inter
rupt will occur and DR_FG is set high. The
DR_FG bit should be cleared low by the mC soft
ware after a data ready condition has occurred.
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
A battery fail condition is triggered by a high to
low transition on pin BAF
and will set the bat-
tery fail interrupt request flag BF_FG to logic
-
high. For details, refer to the POCSAG Decoder
-
section. The sources for the IRQ are timer 0
overflow, timer 1 overflow, out-of-range status
changes and RTC time out. The four interrupt
sources all could be masked, but the four corre
sponding interrupt flags will still be set when
the interrupt conditions are met. All the four
flags are readable/writeable. When an inter
-
rupt condition is met, a flag will be set. If an in
-
terrupt routine is performed, the software
should check which flag is set to high then de
termine what kind of interrupt source occurred.
The WDTOVFG is the flag for the watchdog
13April 28, 2000
State on
POR
-
-
-
-
Preliminary
HT9580
timer overflow and RTC_FG is an indicator for
the RTC time out interrupt request flag. The
OR_FG will be set high when an out-of-range
status from low to high or high to low transition
occurrs. Those flags such as TM0OVFG,
TM1OVFG, BF_FG, DR_FG, OR_FG and
RTC_FG should be cleared by the software af
ter they are activated.
10
RTCEN
RTCMSK
TM0IMSK
TM1IMSK
ORMSK
RTC counter is
enabled
RTCinterrupt
is masked
Timer 0 overflow
interrupt is
masked
Timer 1
overflow
interrupt is
masked
Out-of-range
interrupt is
masked
RTC counter is
disabled
RTC interrupt is
not masked
Timer0overflow
interruptisnot
masked
Timer 1
overflow
interrupt is not
masked
Out-of-range
interrupt is not
masked
D ata R eady
SPI Reqst
TM 0/1IM S K
TM 0/1O VFG
RTC_FG
RTCM SK
OR_FG
ORMSK
B a tte ry F a il
-
TM0OVFG
TM1OVFG
WDTOVFG
BF_FG
DR_FG
OR_FG
RTC_FG
NMI
M 6502
Core
IR Q
10
Timer 0
overflows
Timer 1
overflows
Watchdog
timer has
overflown
Battery fail
request
Data ready
request
Out-of-range
request
RTC interrupt
request
No timer 0
overflow
No timer 1
overflow
No watchdog
timer overflow
No battery fail
request
No data ready
request
No out-of-range
request
No RTC
interrupt
request
Block diagram of NMI and IRQ
14April 28, 2000
Preliminary
HT9580
IR Q
TM 0IM SK
TM 1IM SK
TM 0OV FG
TM 1OV FG
tim e r 0
overflow
S
M asked by
TM 0OV FG
tim e r 1
overflow
S
Timer0 and Timer1 timing diagram
Reset conditions
The HT9580 will reset the whole chip when the
following conditions are met:
·
Power On
·
The external RESET pin is held low for at
least 1 ms
·
The WDT overflows
The input is used to reset the mC. Reset must be
held low at least 1 ms after VDD reaches operating voltage from a power down. A positive
tim e r 0
overflow
S
C leared by softw areC leare d by softw are
overflow
M asked by
TM 0IM SK
tim e r 1
S
tim e r 0
overflow
S
M asked by
TM 1OV FG
tim e r 0
overflow
S
C leared by softw areC leare d by softw areC leared by softw are
tim e
transition on the chip reset will then cause an
initialization sequence to begin. After the sys
tem is operating, a low on this line of at least 1
ms in duration will cause mC activity. When a
positive edge is detected, there is an initialization sequence lasting 8-clock cycles. Then the
interrupt mask flag is set, the decimal mode is
cleared and the program counter is loaded with
the restart vector from locations FFFC (low
byte) and FFFD (high byte). This is the start location for program control. This input should be
high during normal operation.
-
15April 28, 2000
5000H
FFFAH
FFFBH
FFFCH
Preliminary
Program R O M Space
D ata R eady & Battery Fail Service
R outine Vector Low B yte
D ata R eady & Battery Fail Service
R outine Vector H igh Byte
In addition to the watchdog timer, the HT9580
provides two timers: an 8-bit timer (timer 0) and
one 16-bit timer (timer 1). Those two timers are
controlled and configured by the register TMRC.
Both timers are programmable up-count coun
ters whose clocks may be derived from the
X1-clock (32.768kHz, 76.8kHz or 153.6kHz). To
program the timers, TMR0, TMR1L, and
TMR1H should be written with a start value.
When the timers are enabled, they will count-up
from the start value. If the timers overflow, cor
responding interrupts will be generated. When
the timers are disabled, the counter contents
will not be reset. To reset the counter contents,
the software should write the start value again.
Since timer1 is a 16-bit counter, it is important
to note the method of writing data to both
TMR1L and TMR1H. Writing to TMR1L only
writes the data into a low byte buffer, while writing to TMR1H will simultaneously write the
high byte data and the contents of the low byte
Labels (TMRC0
and TMRC1)
TMR0EN,
TMR1EN
TMR0EDG,
TMR1EDG
TMR0CLK4
TMR1CLK5
TMR1MOD7
BitsFunction
01Enable/disable timer counting
(0=disable; 1=enable)
23Define the TMR0 and TMR1 active edge
(0=active on low to high; 1=active on high to low)
buffer into the Timer Counter preload register
(16-bit). Note that the Timer counter preload
register contents are changed by a TMR1H
write operation while writing to TMR1L does
not change the contents of the preload register.
Reading TMR1H will also latch the contents of
TMR1L into the byte buffer to avoid false timing
problem. Reading TMR1L returns the contents
of the low byte buffer. In other words, the low
byte of the timer counter cannot be read directly.
It must first read TMR1H to latch the low byte
contents of the timer counter into the buffer.
TMRC is the timer counter control register,
which defines the timer counter options. The
timer1 clock source can be selected from either
the internal clock or an external input clock by bit
TMR1MOD of the TMRC register. The
timer0/timer1 can also select its clock source by
bits TMR0CLK/TMR1CLK. TMRC as shown in
the table.
The HT9580 has three general purpose I/O
ports. The I/O cell structures are configurable.
Details are shown in the table.
Port A
Port A is a general-purpose I/O port. The PAC
register controls the data directions for port A.
When set as input data type, this port has
wake-up capability and the input cell struc
tures are schmitt trigger types. While in a
²HALT² condition, a falling edge signal on Port
A can wake-up the mC. In addition, the input
cell structures can be configured as pull-high or
non-pull-high. When set as an output datatype,
the output structures are CMOS outputs.
10
PA
The pin output
logic high
The pin output
logic low
PACAs input pinAs output pin
PAWUE
PAIM
The pin has
wake-up
capability
CMOS input
structure
with pull-high
resistor
The pin has no
wake-up
capability
CMOS input
structure without pull-high
resistor
Port B
Port B is a general-purpose I/O port controlled
by the PBC register. The PBIM register con
trols the input cell structures: normal CMOS
inputs or CMOS inputs with pull-high resis
tors.
10
-
PB
Pin output
logic high
Pin output
logic low
PBCInput pinOutput pin
PBIM
CMOS input
structure with
pull-high
resistor
CMOS input
structure without
pull-high resistor
Port C
This is a general-purpose I/O port contolled by
the PCC register. The PCIM register controls
the input cell structures: normal CMOS inputs
or CMOS inputs with pull-high resistors.
10
PC
The pin output
logic high
The pin output
logic low
PCCAs input pinAs output pin
CMOS input
structure
without pull-high
resistor
PCIM
CMOS input
structure
with pull-high
resistor
-
-
19April 28, 2000
Loading...
+ 44 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.