S3C44B0X is a cost-effective microprocessor launched by Samsung for embedded systems. It is a 16/32-bit RISC processor based on the ARM7TDMI core and has a main frequency of 66MHz. In order to reduce costs and save product development cycles, S3C44BO0X provides a wealth of built-in components, including: internal SRAM, LCD controller, 8-channel 10-bit ADC, IIC bus interface, IIS bus interface, etc. Among them, the S3C44B0X IIS interface can be used to connect an external 8/16-bit stereo sound decoder. CS4334 is a series of audio decoding chips launched by CIRRUS. Their working principles and applications are discussed in detail in the literature [1,2,3].
This paper studies the connection between S3C44B0X IIS bus interface and CS4334 in detail, and builds an embedded work platform based on the two. The playback of WAVE audio files is realized on this platform, and a test program is given.
1IIS bus structure
The S3C44B0X IIS (Inter-IC Sound) interface provides DMA transfer mode instead of interrupt mode for FIFO access. It can send and receive data at the same time or only send or only receive.
As shown in Figure 1, the bus interface FIFO control includes the bus interface, internal registers and state machine, which control the bus interface logic and FIFO access; the 3-bit dual divider includes one as the IIS bus master clock generator and the other as the external encoder clock generator; the master serial bit clock generator (master mode) divides the master clock to get the serial bit clock; the channel generator and state machine generate and control IISCLK and IISLRCK, and control the reception and transmission of data; the 16-bit shift register converts the data from parallel to serial when sending data, and does the opposite when receiving data.
The IIS bus can use three transmission modes: normal transmission mode, DMA transmission mode and simultaneous transmission and reception mode.
2 Audio digital-to-analog conversion chip CS4334
CS4334 is an audio digital-to-analog conversion chip produced by CIRRUS Semiconductor. It has the characteristics of simple interface, stable performance and easy operation, and is widely used in embedded systems. In addition, since the WAVE digital audio is weak after being converted into analog audio by CS4334, an audio power amplifier needs to be added. This article uses the PHILIPS company's TDA7050 low-level mono/stereo power amplifier.
Figure 1 IIS bus structure diagram
Figure 2 Connection diagram of S3C44B0X, CS4334 and TDA7050
Connection between 3S3C44B0X, CS4334 and TDA7050
The S3C44B0X IIS bus interface and the CS4334 module are both highly versatile and can be easily connected. The connection method is: connect the S3C44B0X ports PF6 (IISDO), PF8 (IISCLK), PF5 (IISLRCK), and PE8 (END/AN) to the CS4334 pins 1, 2, 3, and 4 respectively. When connecting the CS4334 to the TDA7050, simply connect the CS4334 output to the corresponding input pin of the TDA7050. The specific connection method is shown in Figure 2.
4 Programming
The program design assumes that the S3C44B0X has been successfully started. Here we focus on the main function of playing WAVE files:
Playwave().IIS_Init() is the function to initialize the IIS interface, and BDMA0_Done() is the BDMA0 interrupt processing function. They are introduced as follows. [page]
4.1 IIS interface initialization
The code is as follows:
void IIS_Init(void){
rPCONF = 0x24900a; //Set I/O port PF to make port PF5~8 work in IIS state
Init_4334(); //Initialize CS4334 chip}
4.2 Play WAVE audio file function
Before the Playwave() function is run, it will prompt you to download the wave audio file to the specified RAM area. The function will calculate the file size and prompt whether to play it or not, and finally return.
void Playwave (U32 addr, U32 size){
unsigned char *pWave;
U32 samplesize; //WAVE file length
U32 save_PLLCON;
save_PLLCON = rPLLCON;
rPLLCON= x69<<12)|(0x17<<4)|0;
SerialChgBaud(115200);
pISR_BDMA0=(unsigned)BDMA0_Done;
rINTMSK=~(BIT_GLOBAL|BIT_BDMA0); //interrupt setting
pWave=(unsigned char *)addr; //wave file data address
pWave+=0x28; //point to wav sampling length
samplesize=*(pWave+0) | *(pWave+1)<<8 | *(pWave+2)<<16 | *(pWave+3)<<24;
pWave+=4; //point to wav data
samplesize=(samplesize>>1)<<1;
printf(\\nsample start:0x%x,pWave);
printf(\\nsamplesize:0x%x,samplesize);
Init_4334();
/****** IIS Initialization******/
rIISCON=0x22; //Enable DMA, receive idle, enable frequency division
rIISMOD=0x89; //Main mode, IIS format, 16-bit data, 256fs, 32fs
rIISPSR=0x33; //Division factor
rIISFCON=0xa00; //Receive and send DMA mode, enable FIFO
/****** BDMA0 initialization******/
rBDISRC0=(1<<30)+(1<<28)+(U32)pWave; //DMA source; 16-bit data, growth mode
rBDIDES0=(1<<30)+(3<<28)+((U32)rIISFIF); //DMA destination: M2IO, internal module
rBDICNT0=(1<<30)+(1<<26)+(3<<22)+(1<<21)+(0<<20)+samplesize;
rBDICNT0 |= (1<<20); //Set DMA request source to IIS, interrupt mode, manual reload, enable DMA
rBDCON0 = 0x0<<2;
printf(\\nNow play the wave file ...);
printf(\\nPush any key to exit!!!);
rIISCON |= 0x1;
while(!getkey()); //Press any key to return}
5 Summary
This paper uses the built-in IIS bus of S3C44B0X and the audio digital-to-analog conversion chip CS4334 to build a working platform with the two as the core, and discusses in detail the method of playing WAVE audio files based on this platform. Since the S3C44B0X and CS4334 modules have strong versatility, the implementation method and program given in this paper are simple to use, stable in operation, and easy to transplant.
The author's innovation lies in the detailed design of a WAVE audio file playback platform based on the embedded microprocessors S3C44B0X and CS4334, which combines the advantages of ARM processors' low power consumption, portability, high code execution efficiency and good sound quality of WAVE audio files, and gives a detailed connection method. The designed program has been successfully run on the hardware platform.
References:
[1] Li Yan, Rong Panxiang. Principles and applications of embedded uClinux system based on S3C44B0X[M]. Beijing: Tsinghua University Press, 2005.
[2] Jiang Junhui. Embedded system hardware design based on ARM[J]. Microcomputer Information, Vol. 21, No. 7-2, 2005, p. 120.
[3] Ma Zhongmei. ARM Embedded Processor Architecture and Application Foundation[M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 2002.
[4] Du Chunlei. ARM Architecture and Programming[M]. Beijing: Tsinghua University Press, 2003.
Previous article:TV-specific microprocessor ST6388 with screen display output
Next article:Design and implementation of embedded media player based on MiniGUI
Recommended ReadingLatest update time:2024-11-16 20:30
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple and Samsung reportedly failed to develop ultra-thin high-density batteries, iPhone 17 Air and Galaxy S25 Slim phones became thicker
- Micron will appear at the 2024 CIIE, continue to deepen its presence in the Chinese market and lead sustainable development
- Qorvo: Innovative technologies lead the next generation of mobile industry
- BOE exclusively supplies Nubia and Red Magic flagship new products with a new generation of under-screen display technology, leading the industry into the era of true full-screen
- OPPO and Hong Kong Polytechnic University renew cooperation to upgrade innovation research center and expand new boundaries of AI imaging
- Gurman: Vision Pro will upgrade the chip, Apple is also considering launching glasses connected to the iPhone
- OnePlus 13 officially released: the first flagship of the new decade is "Super Pro in every aspect"
- Goodix Technology helps iQOO 13 create a new flagship experience for e-sports performance
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TI: Development platform compatible with multiple wireless communication protocols
- Hey guys.. I'm here to ask questions again
- Studying the road to electric motor driving-3: The size of "torque"
- Wireless charging technology? Xiaomi has really developed it!
- [RVB2601 Creative Application Development] 5. OLED Displays Weather Information
- What are the conditions for enabling the serial port interrupt USART_INT_IDLE of GD32F103?
- Design of large LED display system based on FPGA+MCU
- Unattended Brushless DC Motor System
- Analysis of the voltage following circuit of the operational amplifier
- Detailed explanation of ADC of MSP430 microcontroller