Audio Codec Board for 2G/3G/4G Terminal PCM Interface
Tutorial, October 12, 2016 - 10:31am, 3073 views
This tutorial is about the opportunity to have audio with our Gemalto terminals so that next to the data transfere voice calls become possible.
- no programming is needed
- only a few AT commands to setup the right connection
- only 5 GPIOs are needed
- schematics and eagle design files for the codec boards can be downloaded below
- BGS5T USB
- EHS6T USB
- EHS6T LAN
- ELS61T E2 LAN Rel.2
The 2G/3G and 4G Gemalto terminal have two GPIO "Weidmüller" connectors which provide access to a lot of module signals including a Digital Audio Interface (DAI).
The DAI can be used to connect audio devices capable of pulse code modulation (PCM).
The PCM functionality allows the use of an external audio codec like the one used in this example.
The audio codec board is small in its footprint (3cm x 2,3 cm). It integrates a 3.3V single channel PCM codecchip (AK2300), has a fixed terminal block (green connector) in order to connect easily to the terminal (EHS6T, BGS5T...) and a 3.5 mm 4 pin audio jack connector for the headphones.
The DAI Interface supports following configurations:
- 256 kHz long frame synchronization master mode
- 16 Bit linear
- 8 kHz sample rate
- The most significant bit MSB is tranferred first
- Data write at rising edge / data read at falling edge
- Common frame sync signal for transmit and receive
Connecting Terminal to Audio Codec Board
The following pictures shows the pinout of the GPIO connector(Terminal). Please check the pinout for the other terminals in the related HID.
The pinout of the codec board is aligned in that way that no cables crosses another.
For proper usage of the DAI interface the GPIOs has to be configured.
There are two options:
- use the Java MIDlet (coming soon)
Download the zip file with the MIDlet inside. Unpack it and copy the jad and jar file to the module. Install and start the MIDlet via At-commands:
at^sjam=4 // installed midlets
at^sjam=0,"name_of_midlet.jad","" // install midlet
at^sjam=1,"name_of_midlet.jad","" // start midlet
at^smso // restart module
- do it manually via AT-Commands
Therefore connect the terminal with the PC via ASC0/USB.
Open for instance an HTerm and open port (115200, 8N1, no flowcontrol).
Following commands are needed:
- at^scfg="Gpio/mode/DAI","std" // set GPIOs in the module to DAI functionality
- at^sspi= // open I2C connection
- <aD41601> // set GPIO 22 to output (TFSDAI)
- <aD41701> // set GPIO 23 to output (SCLK)
- <aD41800> // set GPIO 21 to input (RXDDAI)
- <aD41901> // set GPIO 20 to output (TXDDAI)
- # // close I2C connection
- AT^SNFS=3 // configure
The configuration is non-volatile and becomes active after a module restart.
- AT+CFUN=1,1 // restart
After configuring the terminal put in a SIM card into the terminal. Via the serial interface request the mobile phone number with AT+cnum. Call this phone number and accept call in HTerm with the command ATA.
For more commands see the ATC related to the terminal module.
HINT: If the DAI Interface is active a blue LED is shining on the codec board.