Created by: | Group 11 - Sean Hunter, Michael Wong, Thomas Zylstra |
Description: | This application note describes how to integrate a Flexipanel LinkMatik 2.0 Bluetooth Transceiver into a project using the Altera DE2 in order to enable audio data transfer between the board and a paired device. This application note applies to Quartus II v10.1, and uses the SOPC Builder tool. The software IDE used is the Nios II IDE Version 10.1sp1, Build 197.
NOTE: The demo project included with this application note is not fully working, but it should provide a solid starting point to any group hoping to use the LinkMatik 2.0 in their project. The demo project does perform some audio feedback to the target phone, but this feedback is currently a mere click. However, it should be noted that the PCM codec provided was successfully used with G11's Voice Manipulator in ECE492 w2013, with satisfactory audio quality. |
Physical Connection: | The LinkMatik 2.0 can be connected to the DE2 through the GPIO pins. In this appnote, we use GPIO_1(9 downto 0) to interface with the transceiver. The connection scheme is shown in the image below. Note that RESET remains unconnected. If reset functionality is desired, this should be given a pin.
![]() |
Hardware Operation: | The featured hardware in this appnote is the PCM codec (pcm_interface.vhd). This codec performs two functions: it takes an input audio data stream from a Nios II and serializes it, and it reads an incoming serial audio signal and converts it to a 16-bit integer that can be passed to the Nios II. The PCM standard is implemented for this audio transfer. When a call is ongoing, the LinkMatik 2.0 generates a 256kHz bit clock on the PCMC pin, shown on the first line in the timing diagram below. It also generates a synchronization signal that goes high on the rising edge of the bit clock and stays high for 7.5 cycles, then stays low for another 23.5 cycles. Thus there are 32 cycles of the bit clock between rising edges of the sync signal. 16-bit audio data is expected on the input and output lines (the third and fourth in the timing diagram) on the 16 successive falling edges of the bit clock following the rising edge of the synchronization signal.
![]() Altera on-chip FIFOs are used in this demo project to facilitate data transfer between the Nios II and the PCM Codec. The FIFO that feeds integer samples to be transmitted is MM-WRITE, ST-SOURCE, so that integer values pushed to this FIFO are streamed to the codec. The FIFO that sends the deserialized samples to the Nios II is ST-SINK, MM-READ, so that the processor can read incoming values as needed. See the attached .sopc file for the needed configuration. ![]() The LinkMatik 2.0 also implements an RS-232 compliant serial interface used to configure the transceiver. A UART should be included in the system to allow this communication. Through this interface, configuration commands can be sent to the transceiver, and status messages indicating the status of the link can be received. See the LinkMatik 2.0 Command Reference for more details on this operation. |
Software Operation: | Given the above hardware configuration, we should be able to simply read data from the incoming FIFO when a call is ongoing. Altera HAL API calls can be used to easily perform this task at a high level. This demo project then reads these values and simply writes them into the outgoing FIFO to be re-serialized. This results in operation in which audio incoming from a phone is routed back towards the target phone. |
Files: | |
Instructions for Reproducing: |
|
References: |
|