itron SMART TFT Hardware   General Overview + Connector Pin Assignment  
             
Interfaces Memory Accessories
RS232 SD Card Audio
RS485 NAND CANBUS
Async EEPROM Rotary Encoder
SPI USB Host
I2C Design Ethernet
USB Mounting SD Card
External Key + I/O RFI Gaskets
ADC ESD Cables
  PWM Temperature Battery Holder
  BUZZ Precautions  


AC97 Audio Module
 
The MCBK-AC97 audio board is an accessory for the itron TFT module that connects to CN4 on the module to allow audio files to be played or recorded using the bi directional stereo codec and 8ohm mono speaker output, the audio board includes three 3.5mm sockets that allow Microphone, Headphones and Line In to be connected. The MCBK-AC97P1 comes with an additional stereo power amp of 2+2W.
 

MCBK-AC97P1
Bi-directional stereo codec and 8ohm mono speaker output
with stereo power amp 2+2W

2D mechanical

View Photograph

 

MCBK-AC97P2
Bi-directional stereo codec and 8ohm mono speaker output.
Minimum order 100pcs

2D mechanical

View Photograph


Jumper and Pin Information

PIN

1 2 3 4 5 6 7 8 9 10 Notes
Jumper
J1 +L -L +R -R             -
J2 R L                 -
J3 +R -R                 -
J4 5v GAIN 0                 -
J5 NC NC 0v 5v NC TX RX CK FS   -
J6 5v GAIN 1                 -
J10 FUTURE RESISTIVE TOUCH On rear of PCB
J11 GP1 GP2 GP3 GP4 GP5 GND 3v3 5v     -
J12 Mic1 Mic2 GND HL HR GND LIN L LIN R GND OUT3 -

PIN

1/6 2/5 3/4 Connector

Jumper

Headphone
Line out J7
HL HR GND  
1   6
 
2   5
 
3   4
 
     
 
Line In J8 LINL LINR GND
Mic J9 M1 M2 GND
 

Electrical Characteristics
For electrical characteristics of the Audio Codec please refer to the WM9711 datasheet


AC97 Setup

SETUP(AC97)
  {
  active = Y; // enabled or not
  line_gain_L = 31; // 0 - 63
  line_gain_R = 31; // 0 - 63
  mic_gain_L = 31; // 0 - 63
  mic_gain_R = 31; // 0 - 63
  rec_sel = MIC; // MIC / LINE
  rec_rate = 44100; // 0 - 48000
  treble = 0; // 0 - 15
  bass = 7; // 0 - 15
  threeD = 0; // 0 - 15
  master_volume = 100;    //0 low - 100 high
  speaker_volume = 100;  //0 low - 100 high
  headphone_volume = 100; //0 low - 100 high
  balance = 50;   //0-Left   50-Center   100-Right
  stereo_speaker = Y;    //Y when using module with stereo amp, N when using single speaker
  pbdonefnc = EndFunc; // function that is called when playback is finished
  pbprogfnc = UpdateVal;  // function that is called every 100ms during playback
  pbmode = fore; // halts further execution of itronSmart code until playback finishes
  pbmode = back; // playback occurs in the background and the pbdonefnc is called when playback finishes (default)

  }

The above setup is suitable for firmware versions 49.03+ (maximum of 16 parameters allowed)
Values for parameters 0-63 are inverted 0 being high and 63 being low

During playback the system variables AC97LEN_H, AC97LEN_M, AC97LEN_S, AC97LEN_D hold the length (hours, minutes, seconds, 1/10 sec) and AC97PRG_H, AC97PRG_M, AC97PRG_S, AC97PRG_D hold the current play position.

These variables can be updated in the pbprogfnc for the AC97.

Playing and Stopping a File

To play a file from the RAM you need to load the track into the library then load into AC97 using the line below
  LIB(Track1,"SDHC/Track1.wav");
  LOAD(AC97,Track1);                   v49+
To load track straight from SD card to decrease loading time use the line below
  LOAD(AC97,"SDHC/Track1.wav");  v49.02+ 


To stop the file playing you will need to clear AC97 by using the line below
  LOAD(AC97,"");
 


Example Code
Demonstration that has two buttons to play the related audio file as well as a stop button.
The playing time of the track and total duration are also shown.
The track is played from the SDCard when the key is pressed.
You will need two .wav files on the SDCard, named as Track1 and Track2 respectively.



            
Picture shows how the example code will look

SETUP(AC97)
  {
  active = Y; // enabled or not
  treble = 0; // 0 - 15
  bass = 7; // 0 - 15
  threeD = 0; // 0 - 15
  master_volume = 100;    //0 - 100
  speaker_volume = 50;  //0 - 100
  headphone_volume = 50; //0 - 100
  balance = 50;   //0-Left   50-Center    100-Right
  stereo_speaker = Y;    //Y when using module with stereo amp, N when using single speaker
  pbdonefnc = EndFunc; // function that is called when playback is finished
  pbprogfnc = UpdateVal;  // function that is called every 100ms during playback
  }

STYLE(bstyle,DRAW) { type=B; maxX=480; maxY=272; back=lightcyan; col=black; width=1; rotate=0; curRel=cc; }
STYLE(ps, Page) { back = white; }
STYLE(SS1, Text) { font = Ascii8; col = black; curRel=RC; xtrim=N; }
STYLE(SS, Text) { font = Ascii8; col = black; curRel=CC; }
STYLE(SS2, Text) { font = Ascii8; col = black; curRel=LC; xtrim=N; }

PAGE(page1, ps)
{
POSN(110,50);   DRAW(Song1,200,80,bstyle);
                         TEXT(Song1T,"Song 1",SS);
                         KEY(Song1K,[RUN(EndFunc);LOAD(AC97,"SDHC/Track1.wav");],200,80,TOUCH);
POSN(110,222); DRAW(Song2,200,80,bstyle);
                         TEXT(Song2T,"Song 2",SS);
                         KEY(Song2K,[RUN(EndFunc);LOAD(AC97,"SDHC/Track2.wav");],200,80,TOUCH);
POSN(390,136); DRAW(Stop1, 100,40,bstyle);
                         TEXT(Stop1T,"Stop",SS);
                         KEY(Stop1K,[RUN(EndFunc);],100,40,TOUCH);

 POSN(252,136); TEXT(Played,%*02d%AC97PRG_M,SS1);
 POSN(254,136); TEXT(PlayedS,":",SS);
 POSN(259,136); TEXT(Played2,%*02d%AC97PRG_S,SS2);
 POSN(280,136); TEXT(PDS,"/",SS);
 POSN(302,136); TEXT(Duration,%*02d%AC97LEN_M,SS1);
 POSN(304,136); TEXT(DurationS,":",SS);
 POSN(309,136); TEXT(Duration2,%*02d%AC97LEN_S,SS2);
}

FUNC(UpdateVal)
{
TEXT(Played,%*02d%AC97PRG_M); TEXT(Played2,%*02d%AC97PRG_S);
TEXT(Duration,%*02d%AC97LEN_M); TEXT(Duration2,%*02d%AC97LEN_S);;
}

FUNC(EndFunc) { LOAD(AC97,""); }

SHOW(page1);
 


Pin Assignments, Module Dimensions and Function Syntax Copyright 2010 Noritake Co Limited