View - Microsemi

ZLS38503
Firmware for Voice Prompting and
Messaging
Firmware Manual
Features
•
October 2007
Voice recording (messaging) and playback (voice
prompting)
•
Easy file manage
•
Requires very few microprocessor resources
Work on low cost Voice Processor (ZL38004)
•
DTMF receiver
•
•
Tone Generator (preprogrammed DTMF + user
defined tones)
Applications
•
Burst mode
•
Answering Machines
•
Optional twist
•
Programmable Gain
•
•
Analog Speakerphone
Home Automation
•
Call progress tone detection
•
VAD
1. 2Vcore
FPI
CLK1
3. 3VIO
Timing
Caller ID
Detection
TMS
TDI
TDO
TCK
TRST
Control
Software
ADC
Voice
Detection
DAC
DTMF/Call
Progress
Tone Detector
ADC
DAC
Tone
Generator
PCM I/O
12S
UART
SPI Slave
SPI Master /
FLASH Port
Figure 1 - Firmware Functional Block Diagram
2
Zarlink Semiconductor Inc.
ZLS38503
Firmware Manual
1.0 Functional Description
The ZLS38503 firmware provides voice prompting and voice messaging (VPM) functionality to systems utilizing the
ZL38004. In addition to the voice prompting and messaging function the ZLS38503 also provides a DTMF receiver,
tone generator, caller ID detection, voice detection, call progress, and tone detection. The current release of the
firmware only operates with 8 KHz sampled audio.
The firmware is designed to be easily swapped in and out of working memory to allow multiple firmwares to run on
the same platform. For example for a speakerphone with call answer. The ZL38004 hardware platform would be
used with the ZLS38502 speakerphone firmware and the ZLS38503 voice prompting and messaging firmware.
Both firmwares resides on the same FLASH. During a active call the ZL38502 speakerphone firmware is loaded.
During idle period or a call message the ZLS38503 firmware is loaded in. The firmware swap is initiated by a Host
processor but is performed automatically by the firmware.ZLS38502.
2.0 Firmware Algorithm Description
Figure 1 describes the block diagram of the ZLS38503 VPM firmware. The VPM firmware provides the following
functions:
•
Voice Recording (messaging) and Playback (voice prompting)
•
Tone Generator: A programmable tone generator to produce Dual Tone Multiple Frequency (DTMF), Single
Frequency (SF), Multi frequency (MF) and tone ringer
•
DTMF Receiver: A DTMF tone receiver to decode DTMF tones
•
Caller ID Receiver: Decodes Caller ID information
•
Call Progress Tone detection: Determines call progress tone type using tone cadence
•
VAD: Voice Activity Detector determines the end of a message
•
G.169 ALC: Automatic Level Controller in the Sin to Sout path
•
Gain Pads: Adjusts signal levels at Rout, Sin and Sout. The Sin Gain Pad is adjustable from -24 to +21 dB in
1.5 dB steps; Gain Pads for Rout and Sout are adjustable from -24 to +21 dB in 3 dB steps. See section 6.0,
“Assigning Audio Channels to Ports“ for port definitions.
•
A/ -Law or Linear: Converts 8-bit -law, A-law or sign magnitude PCM to 16-bit linear data.
•
File Management API: Reduces program space/processor resources and speeds up the software
development process
jt
jt
2.1 Voice Prompting and Messaging
2.1.1 Voice Prompting
The Voice Prompting feature of the VPM firmware allows the designer to either preload special messages (i.e., time
and date prompts) or the user can record an outgoing message. In the case of the preloaded special messages, the
designer would record the prerecord the messages (in 8-bit A-law or law) and loaded them directly into FLASH
at a predetermined location. In the case of the user recording an outgoing message, the firmware API provides a
function that automatically digitized the outgoing message, compands it (8-bit A-law or law), and saved to
FLASH. The FLASH locations are automatically calculated and stored in a Message Attribution Table (MAT). The
firmware API also provides a function that retrieves the prompt FLASH location from the MAT and then play out the
recorded message from FLASH.
jt-
jt-
7
Zarlink Semiconductor Inc.
ZLS38503
Firmware Manual
2.1.2 Voice Messaging
The Voice Messaging feature of the VPM firmware works in a similar way ad the voice prompting feature. Voice
data is routed from any source - codec, PCM or I2S ports companded and stored in FLASH. The FLASH address
are automatically calculated and store into the MAT. In addition to this the MAT also provides a location to store the
time and date voice prompts locations associated with the message. When After a message is recorded the Host
can read the caller ID receiver register and determine the time and data. This is then associated with the proper
voice prompts. This message is then saved in the MAT. When playing out a message the Host first plays out the
series of voice prompts (time and date) from FLASH then plays out the message. The output prompt and message
can be routed to any port on the ZL38004.
2.2 Tone Generation and Detection
The VPM firmware provides both a programmable DTMF and tone generator and a DTMF detector. Table shows
the DTMF frequencies associated with the keypad digits.
1209 Hz
1336 Hz
1477 Hz
1633 Hz
697 Hz
1
2
3
A
770 Hz
4
5
6
B
852 Hz
7
8
9
C
941 Hz
*
0
#
D
Table 1 - DTMF Tones
2.2.1 Programmable Tone Generation
The ZLS38503 firmware incorporates a programmable tone generator, which supports the following features:
•
Single or dual tones, with pre-programmed frequencies
• Warble-effect ring tone using a square wave with programmable duty cycle and frequency
• Two sets of eight pre-programmed frequencies in the user config file where each pair of frequencies can be
selected. Overall, any of 16 programmable frequencies can be selected.
•
Burst mode with programmable burst time (from 0 to approximately 4 seconds). During the burst generation
of DTMF any modification to the tone generator is ignored.
•
Programmable output gain from -18 to 24 dB in 6 dB steps. (Default is 0 dB)
•
Individual output gain for low and high tones
•
DTMF output can be switched to Rout or Sout (or both) outputs. During DTMF injection, the signal passing
through Sout or Rout is switched out.
•
2-dB twist support mode for DTMF tones. The twist mode can be enabled or disabled.
2.2.2 DTMF Detection
The Q.24 compliant DTMF detection block functions continuously and can be assigned to any port. When a valid
DTMF tone is received, the firmware issues an interrupt generated (GPIO10 is used as an interrupt signal) and the
DTMF information is saved in the "VPM interrupt status register". Based on either the active low interrupt on
GPIO10 or the "DTMFDetection" status bit in the "VPM interrupt status register", the Host decodes bits 7:4 of this
register as the detected DTMF tone.
8
Zarlink Semiconductor Inc.
ZLS38503
Firmware Manual
2.3 Caller ID Receiver
The ZLS38503 VPM firmware provides a caller ID detector with the following features:
• a Type 1 Caller ID (CID) detection algorithm which complies with Bellcore GR-30-CORE (formerly known as TRNWT-000030) and EETS 300 778• 1200-baud Bell 202 and ITU v.23 Frequency Shift Keying (FSK)
• Works with and without CAS
• FSK carrier detect status output
• A 64-character buffer for received data
The firmware does not provide CID on Call Waiting (Type 2).
The Caller ID module receives and decodes Type 1 Caller ID messages in both Bellcore and ETSI formats. It is
intended to be activated by the Host during periods where Type 1 Caller ID needs to be detected, which is normally
only during the initial on-hook period of a phone call.
After device power-up, the Caller ID module automatically initializes and goes into the idle state. Instructing the
module to look for Caller ID information is done by setting the CID_ACTIVATE bit. Once activated, Caller ID
continuously looks for messages. Since only the Type 1 version of Bellcore and ETSI Caller ID is supported, the
Caller ID module should be deactivated before going off-hook.
The Caller ID module decodes the FSK signal, stores the results into a 64-byte buffer, and performs a check sum.
The Host is responsible for interpreting the information.
Two commonly message formats, SDMF and MDMF, are used. In both cases the Caller ID module stores the
information in the same format as it is received.
2.3.1 SDMF Message Format
SDMF messages contain only the call date, time and number (or other text). Call type for SDMF is always 0x04.
Message Character(s)
Value
Format
0
0x04 (SDMF call type).
Hex
1
Message length (length is number of characters AFTER
message length, but excluding the checksum).
Hex
2, 3
Two digits for the month.
ASCII
4, 5
Two digits for the date.
ASCII
6, 7
Two digits for the hour (24-hour clock).
ASCII
8, 9
Two digits for the minute.
ASCII
Calling party number (or other text).
ASCII
Checksum
HEX
10 -> (2 + message length)
(2 + message length) + 1
Table 2 - SDMF Message Format
Text information is always sent as ASCII codes, leftmost digits first. Thus a call from 505-555-4455 at 16:23 on
March 9 would be sent as [0x04 0x1 2 0x30 0x33 0x30 0x39 0x31 0x36 0x32 0x33 0x35 0x30 0x35 0x35 0x35 0x35
0x34 0x34 0x35 0x35 0x47] in SDMF.
9
Zarlink Semiconductor Inc.
ZLS38503
Firmware Manual
2.3.2 MDMF Message Format
MDMF messages use general format illustrated in Figure 2:
Figure 2 - MDMF Format
Transmission Direction
Message
Type
(HEX)
Message
Length
(HEX)
Char 0
Char 1
.
Parameter 1
..
Parameter 2
Parameter N
Message Length
Characters
Checksum
(HEX)
Char (2 +
Message
Length) + 1
Parameter
Parameter
Type
(HEX)
Parameter
Length
(HEX)
Parameter Data
(ASCII)
Parameter Length
Characters
The first character is Message Type. For Type 1 Caller ID, this is usually 0x80. The next character is Message
Length, which is the number of characters AFTER message length, but not including the checksum.
N parameters follow, which themselves have type, length and data fields. There are many different types of
parameters, but the most common are 0x01 for date & time, 0x02 for calling number, and 0x07 for calling party
name. The last character is the checksum.
Text information is always sent as ASCII codes, leftmost digits first. Thus, a call from Caul R Idee, 505-555-4455 at
16:23 on March 9 would be sent as [0x80 0x23 0x01 0x08 0x30 0x33 0x30 0x39 0x31 0x36 0x32 0x33 0x02 0x0A
0x35 0x30 0x35 0x35 0x35 0x35 0x34 0x34 0x35 0x35 0x07 0x0B 0x43 0x61 0x75 0x6C 0x20 0x52 0x20 0x49
0x64 0x65 0x65 0x05] in MDMF.
10
Zarlink Semiconductor Inc.
ZLS38503
Firmware Manual
2.4 Call Progress Tone Detection
Call Progress Tone Detector detects any tones in the frequency range from 300 Hz to 640 Hz. The tone cadence
(on/off times) is measured and saved in a register to be read by the C. The type of progress tone is determined
from the cadence value (see Table 3).
µ
Tones
Power per frequency at the
exchange where the tone
is applied
Cadence
Dial tone
-13 dBm0
Recall dial tone
-13 dBm0
Continuous tone
3 bursts of 0.1 s followed by
a continuous tone
Busy tone
-24 dBm0
Burst 0.5 s / silence 0.5 s
Reorder tone
-24 dBm0
Burst 0.25 s / silence 0.25 s
Audible ringing tone
-19 dBm0
Burst 0.2 s / silence 0.2 s
Table 3 - US Tone Plan as listed in CCITT Fascicle 11.2
2.5 Voice Activity Detector
To ensure that only the message its self is recorded (not silence) a power-based Voice Activity Detector (VAD) is
used to signal the end of voice activity on a recorded message. When the end of the message is detected, the
recording stops and the system is notified. It operates at both the Sin and Rin ports.
The VAD has two programmable parameters:
• Threshold: If the signal level falls below the threshold, the VAD starts the "no voice" timer.
• Time: If the signal level remains below the threshold for a fixed time, the VAD declares "no voice".
2.6 G.169 Automatic Level Control
The G.169 Automatic Level Control (ALC) controls the signal level in the Sin and Rin path, ensuring that the
recorded levels are constant.
2.7 Programmable Gain Pads
The gain pads are associated with Rout, Sin and Sout. The pads are to be set once during initialization and not
adjusted during normal operation. Sin gain pad is adjustable from -24 to +21 dB in 1.5 dB steps; Rout and Sout
gain pads are adjustable from -24 to +21 dB in 3 dB steps.
2.8 A/ -Law or Linear Converter
µ
The Linear to A/ -Law converters converts 16-bit linear data to 8-bit -law/A-law, or sign magnitude PCM and
vice versa. The A/ -Law converters are only on the Rin and Sout ports. This is used to compand (compress and
expand) the voice before it is stored in FLASH thus make better use the memory. The converters can be
bypassed if the network interface is already in one of the supported formats.
µ
µ
µ
11
Zarlink Semiconductor Inc.
ZLS38503
Firmware Manual
2.9 File Access
The ZLS38503 firmware incorporates an API that simplifies file access for the Host microcontroller ( C). The API
has the following commands:
µ
• Play Prompt
• Record Prompt
• Play Message
• Message Rec ord
• Play Special Prompt
• Write Special Prompt
• Delete Message
• Delete Prompt
• Delete Special Prompt
• Delete All
• Load MAT
• Save MAT
• Write Prompt RAM Buffer
These API commands will be covered in more detail in Section 7.0.
12
Zarlink Semiconductor Inc.
For more information about all Zarlink products
visit our Web Site at
www.zarlink.com
Information relating to products and services furnished herein by Zarlink Semiconductor Inc. or its subsidiaries (collectively “Zarlink”) is believed to be reliable.
However, Zarlink assumes no liability for errors that may appear in this publication, or for liability otherwise arising from the application or use of any such
information, product or service or for any infringement of patents or other intellectual property rights owned by third parties which may result from such application or
use. Neither the supply of such information or purchase of product or service conveys any license, either express or implied, under patents or other intellectual
property rights owned by Zarlink or licensed from third parties by Zarlink, whatsoever. Purchasers of products are also hereby notified that the use of product in
certain ways or in combination with Zarlink, or non-Zarlink furnished goods or services may infringe patents or other intellectual property rights owned by Zarlink.
This publication is issued to provide information only and (unless agreed by Zarlink in writing) may not be used, applied or reproduced for any purpose nor form part
of any order or contract nor to be regarded as a representation relating to the products or services concerned. The products, their specifications, services and other
information appearing in this publication are subject to change by Zarlink without notice. No warranty or guarantee express or implied is made regarding the
capability, performance or suitability of any product or service. Information concerning possible methods of use is provided as a guide only and does not constitute
any guarantee that such methods of use will be satisfactory in a specific piece of equipment. It is the user’s responsibility to fully determine the performance and
suitability of any equipment using such information and to ensure that any publication or data used is up to date and has not been superseded. Manufacturing does
not necessarily include testing of all functions or parameters. These products are not suitable for use in any medical products whose failure to perform may result in
significant injury or death to the user. All products and materials are sold and services provided subject to Zarlink’s conditions of sale which are available on request.
Purchase of Zarlink’s I2C components conveys a license under the Philips I2C Patent rights to use these components in and I2C System, provided that the system
conforms to the I2C Standard Specification as defined by Philips.
Zarlink, ZL, the Zarlink Semiconductor logo and the Legerity logo and combinations thereof, VoiceEdge, VoicePort, SLAC, ISLIC, ISLAC and VoicePath are
trademarks of Zarlink Semiconductor Inc.
TECHNICAL DOCUMENTATION - NOT FOR RESALE