![](http://datasheet.mmic.net.cn/ams/AS2540-T_datasheet_96401/AS2540-T_9.png)
Data Sheet AS2540
austriamicrosystems
Revision 3.1
Page 8 of 18
<Line Event> Message
<LineEvent> message format
b7
MSB
b6
b5
11111
LSB
b7
b6
b5
b4
b3
b2
b1
b0
Status
Remark
1
1
10
1
valid ring signal detected
0
1
10
1
no ring signal
1
1
10
1
manual hook switch - off-hook (pin MHS)
0
1
10
1
manual hook switch - on-hook (pin MHS)
1
1
10
1
electronic hook switch - off-hook (pin EHS)
0
1
10
1
electronic hook switch - on-hook (pin EHS)
Status of AS2540
Protocol
Line Events
AS2540 has 3 inputs, namely MHS (Manual Hook Switch),
EHS (Electronic Hook Switch) and RFD (Ring Frequency
Detector), which sense the state of the two hook-switches
and discriminate an applied ring signal. The MHS is
connected to the manual hook switch which is operated by
the handset and the EHS is connected to an electronic
hook switch which is operated by the CPU. Whenever the
state of these inputs changes, AS2540 immediately sends
<LineEvent> to the CPU after a debounce time. MHS and
EHS up-debouncing lasts 15ms, down-debouncing lasts
85ms. RFD start to discriminate the ring frequency
immediately but will send a <LineEvent> message with a
delay of 102ms. A status change of MHS and EHS pins
must not change the momentary selected path of the
speech network.
The <LineEvent>-message is sent without consideration of
the momentary activities of AS2540 in order to meet PTT
requirements (e.g. line break signalling). The code for the
<LineEvent>-message is chosen with regard to the
minimum current consumption in order to operate the
optocouplers. Pending <Ack>-messages will be queued
after the <LineEvent>-message. An already running
transmissions of <Ack> will not be interrupted and
<LineEvent> will be sent afterwards in this case.
-
Mode transitions
Idle
→
→ BM →
→
→ MPM →
→
→ Idle
AS2540 always starts up in backup mode and is prepared
to act like an independent dialler. <LineEvent> is sent to
the CPU and AS2540 remains in back-up mode until any
valid message is sent from the CPU. This makes sure that
a non-operable CPU does not disable basic dialling
functions.
-
Mode transition
MPM
→
→ BM
A watchdog timer is started after <LineEvent> and is reset
whenever AS2540 receives a message from the CPU via
the serial interface. If the CPU does not send any further
valid message within 2400ms, AS2540 goes back into
back-up mode, immediately locks the UART and remains in
backup mode till next on-hook.
Dialling Functions
DTMF
The DTMF generator provides 8 frequencies (in Hz):
1
11
697+1209
2
22
697+1336
3
33
697+1477
4
44
770+1209
5
55
770+1336
6
66
770+1477
7
77
852+1209
8
88
852+1336
9
99
852+1477
***
941+1209
0
00
941+1336
#
##
941+1477
ams
AG
Technical
content
still
valid