SlideShare a Scribd company logo
1 of 11
Audio Led
Bargraph Equalizer
Final Project for ECE-3551
05/02/09
Instructor: Dr Kepuska

By; Anushan Weerasooriya & Chris Guzowski
Outline
•

Summary:

1) Objective: – 6 Band Led Bargraph Equalizer
2) Design: - Overview
3) C Code: - FiltersTimersDisplay
4) Difficulties: - Audio Addition
5) Outcome: - Functionality
6 Band Led Bargraph Equalizer
•
•

Synopsis:

a) Using 6 leds and 4 switches create an led bargraph equalizer using C code and the Analog Devices
BF533 Evaluation board. This project contains modest functionality so that it could be used for the job that it
was intended. Each switch along with each led of the Bf533 will be utilized. Intended functions will include
audio gain and hold adjustments for each individual bandpass filter, varying led intensity displaying audio
output levels (alterd vs. unaltered), audio switchability for channel comparison and sample/hold led display.

•

b) The led display will recreate audio levels (across all 6 bandpass filters) by illumination intensity, the
brightest being the most and the weakest being the least.

•

c) All 6 filters will be recombined into a composite audio output of the original audio input incorporating our
desired gain adjustments.
Overview
•

Implementation
•

Switches/Leds:

a) Switch #1 selects each bandpass of filters one at a time which will be displayed by its appropriate led and
corresponding illumination intensity.
b) Switch #2 controls 3 levels of gain adjustments for each filter one at a time.
c) Switch #3 locks in gain for each channel adjusted.
d) Switch #4 selects altered (all bandpass filters) audio with full led bargraph display or the full led bargraph
display by itself.
FIR Filters:
a) Six bandpass filters will make up the original audio input spectrum. Low frequencies will be pass by the 200hz750hz filter, the highest frequencies will be passed by the 7khz-10khz filter and the midband frequencies will be
pass by the 5khz-7khz, the 3khz-5khz, the 1.5khz-3khz , the 750hz-1.2khz filters respectively.
Diagram of Typical FIR Filter
Overview - Switching
Code snippets for audio switching control:
*pDMA1_IRQ_STATUS = 0x0001; // Confirm Interrupt Handling
if(LED1 == 0x00 && LED4 == 0x00) // Checking LED Status
{
// Copy Input Data from Dma Input Buffer into Variables
iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0];
iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0];
Process_Data();// Call Function that Contains user Code
// Copy Processed Data from Variables into Dma Output Buffer
iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut;
iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut;
Status1 = 0x00; // Controls Led's Illumination Time
}
if(LED1 == 0x01 && LED4 == 0x00) // Checking LED Status
{
// Copy Input Data from Dma Input Buffer into Variables
iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0];
iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0];
// Copy Processed Data from Variables into Dma Output Buffer
Status1 = 0x01; // Controls Led's Illumination Time
abandpass();
iTxBuffer1[INTERNAL_DAC_L0] = aChannel0LeftOut;
iTxBuffer1[INTERNAL_DAC_R0] = aChannel0RightOut;
}
// One Bandpass Filter at a Time
if(*pFIO_FLAG_C == 0x0100 && pf8count == 0) // Switch P8 Flag & Count at 0
{
FIO_ANOM_0311_FLAG_W(0x0100,pFIO_FLAG_C);// Confirm Interrupt Handling
LED1 = 0x01; // Sets LED1 Control Variable
pf8count++;
}
if(*pFIO_FLAG_C == 0x0100 && pf8count == 1) // Switch P8 Flag & Count at 1
{
FIO_ANOM_0311_FLAG_W(0x0100,pFIO_FLAG_C);// Confirm Interrupt Handling
LED1 = 0x02; // Sets LED1 Control Variable
pf8count++;
}
FIR Filters - Code in Process_data.c file
– Filter Coefficients (101) for the 100th Order
– Impulse response of a Nth order FIR filter lasts N+1 samples & dies to 0
– Filter Equation Implementation
for (m=fBL - 1; m >= 0; m--)
{
xl[m]=xl[m-1]; // moving the array data from the end to the beginning (leftwards)
xr[m]=xr[m-1];
}
xl[0]=(float)(iChannel0LeftIn<<8); // Shift Left 8 bits to make 16 bit arrays since ADC gives 24 bit arrays
xr[0]=(float)(iChannel0RightIn<<8);
for(counter=0;counter < fBL;counter++)
{
yl += fB[counter] * xl[counter];
yr += fB[counter] * xr[counter];
}

FIR Filter Algorithm
N

y[ n] = ∑ w[ k ] * x[n − k ]
k =0

fChannel0LeftOut=(((int)yl)>>8)*gainbp6; // Shift Right 8 bits to create the original 24 bit array
fChannel0RightOut=(((int)yr)>>8)*gainbp6;
Timers - Code in ISR.c file
•
•

a) A two timer operation will be enabled to run the led brightness display by gauging the fastest running timer
against the slowest running timer ultimately providing varying intensities with each corresponding led
frequency band.

•
•
•
•
•
•
•

Timer Configuration:

*pTIMER0_CONFIG = 0x0019;
*pTIMER0_PERIOD = 0x00080000; // Timer0 Period
*pTIMER0_WIDTH = 0x00040000; // Timer0 Width
*pTIMER1_PERIOD = 0x00003900; // Timer1 Period
*pTIMER1_WIDTH = 0x00001950; // Timer0 Width
*pTIMER_ENABLE = 0x0003; // Enable Timers0/1

•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

Timer Setup:

Timer Code:

timerstatus = (*pTIMER_STATUS); // Records TIMER_STATUS before it is Reset
*pTIMER_STATUS = 0x0003; // Confirms Interrupt Handling
if((timerstatus & 0x0001) == 0x0001) // Checks for Timer0 Status Bit
{
tim0++; // Once Timer0 is Detected Keep Enabled until Cycle Complete
}
if((timerstatus & 0x0002) == 0x0002) // Checks for Timer1 Status Bit
{
tim1++; // Auto Increment tim1
tim2++; // Auto Increment tim2
}
if(tim0 < 1 ) // Reset tim0=1 when tim0 does not = 1
{
tim1 = 0;
}
Timers - Continued
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

Timer Code

// Led1 Section-------------------------------------------------------------------------------------------------------------//
if(ledctr == 1 && tim0 == 1 && tim1 == 1) // Send to amp "level" of Freq #1 when tim0=1
{
if(hold== 0)
{
amp1 = famp1; // Samples and Holds famp1 Before it is Used
}
*pFlashA_PortB_Data = 0x01&Status1; // Illuminate Led #1
}
if(ledctr == 1 && tim0 == 1 && tim1 > amp1) // Checks to Turnoff all Led's
{
*pFlashA_PortB_Data = 0x00; // De-illuminate all Led's
tim0 = 0; // reset tim0=0
tim1 = 0; // reset tim1=0
}

Timing Diagram
Timer0

pTIMER0_PERIOD = 0x00080000

-32 Possible Illumination Levels-

Timer1
pTIMER1_PERIOD = 0x00003900

Initialize.c file Changes:
// Set Sport0 RX (DMA1) interrupt priority to 2 = IVG9
*pSIC_IAR0 = 0xffffffff;
*pSIC_IAR1 = 0xffffff2f; // Sport0->ID2
*pSIC_IAR2 = 0xffff5f44; // FlagA->ID5/Timer0->ID4/Timer1->ID4
// assign ISRs to interrupt vectors
register_handler(ik_ivg9, Sport0_RX_ISR); // Sport0 RX ISR -> IVG 9
register_handler(ik_ivg11, Timerz_ISR); // Timer0/1 ISR -> IVG 11
register_handler(ik_ivg12, FlagA_ISR); // FlagA ISR -> IVG 12
// enable Sport0 RX and FlagA interrupt
*pSIC_IMASK = 0x000b0200;
Display - Code in ISR.c Process_data.c files
Led Values are set here after each filter algorithm which converts audio output words
into integers:
// Led Value Set Here
if(aChannel0LeftOut<0xffff0000 && aChannel0LeftOut>0xf0000000)
{
famp1 = 32;
}
if(aChannel0LeftOut<0xf0000000 && aChannel0LeftOut>0x0f000000)
{
famp1 = 24;
}
if(aChannel0LeftOut<0x0f000000 && aChannel0LeftOut>0x00f00000)
{
famp1 = 16;
}
if(aChannel0LeftOut<0x00f00000 && aChannel0LeftOut>0x000f0000)
{
famp1 = 8;
}
if(aChannel0LeftOut<0x000f0000 && aChannel0LeftOut>0x0000f000)
{
famp1 = 4;
}
if(aChannel0LeftOut<0x0000f000 && aChannel0LeftOut>0x00000f00)
{
famp1 = 0;
}
Audio Addition
•
•

Recombining Audio Bands:

a) An unorthodox audio addition scheme was utilized to allow for complete board functionality. All bandpass audio filters are
added using time division multiplexing. This seemed to be the only way to recombine six altered audio channel into one
composite stream and overcome Bf533 board slowdowns or halts.

•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•

if(LED4 == 0x01 && LED1 == 0x00) // Checking LED status
{
// Copy Processed Data from Variables into Dma Output Buffer
if(tim2 == 1)
{
abandpass();
}
if(tim2 == 2)
{
bbandpass();
}
if(tim2 == 3)
{
cbandpass();
}
if(tim2 == 4)
{
dbandpass();
}
if(tim2 == 5)
{
ebandpass();
}
if(tim2 == 6)
{
fbandpass();
}
iTxBuffer1[INTERNAL_DAC_L0] = aChannel0LeftOut+bChannel0LeftOut+cChannel0LeftOut+dChannel0LeftOut+eChannel0LeftOut+fChannel0LeftOut;
Functionality
•
•

Discussion:

a) All the desired led/switch and audio pass functions of the project operated nominally; however, final added
bandpass filters produced unwanted frequencies in each band producing an undesirable filtered audio
output. Total functional operation was realized; however, there were unwanted sympathic (outside of
bandpass filter) frequencies and Bf533 board slowdowns/halts.

•

b) Also, because of time constraints and audio addition (switching noise) problems, other functions such as
adjustable led rise/decay rates and decibel signal referencing would have been a nice touch but could not be
realized.

•

c) Although we had a few difficulties, overall we learned a lot about controlling the Bf533 board and using it to
digitally manage signals.

More Related Content

What's hot

Configure ospf v3 single areaa
Configure ospf v3 single areaaConfigure ospf v3 single areaa
Configure ospf v3 single areaajebong03
 
93 appendix pic18(l)f2 x4xk22 (1)
93 appendix pic18(l)f2 x4xk22 (1)93 appendix pic18(l)f2 x4xk22 (1)
93 appendix pic18(l)f2 x4xk22 (1)Devanshu Suman
 
Advanced motion controls dpcante 016b080
Advanced motion controls dpcante 016b080Advanced motion controls dpcante 016b080
Advanced motion controls dpcante 016b080Electromate
 
LinuxCNC 入門簡介
LinuxCNC 入門簡介LinuxCNC 入門簡介
LinuxCNC 入門簡介roboard
 
Lathe Spindle Sensor
Lathe Spindle SensorLathe Spindle Sensor
Lathe Spindle SensorJoeCritt
 
FAR/MARS Avionics CDR
FAR/MARS Avionics CDRFAR/MARS Avionics CDR
FAR/MARS Avionics CDRCade Walton
 
8051 experiments1
8051 experiments18051 experiments1
8051 experiments1tt_aljobory
 
Cataloge ge 3.control and_automation_dienhathe.com-4_13_vat300_e_c5-1_rev_b
Cataloge ge 3.control and_automation_dienhathe.com-4_13_vat300_e_c5-1_rev_bCataloge ge 3.control and_automation_dienhathe.com-4_13_vat300_e_c5-1_rev_b
Cataloge ge 3.control and_automation_dienhathe.com-4_13_vat300_e_c5-1_rev_bDien Ha The
 
Introduction to-cleanflight
Introduction to-cleanflightIntroduction to-cleanflight
Introduction to-cleanflightZachary Scally
 
Iai robonet controller_specsheet
Iai robonet controller_specsheetIai robonet controller_specsheet
Iai robonet controller_specsheetElectromate
 
SOMADOR BINáRIO de 4 bits
SOMADOR BINáRIO de 4 bits SOMADOR BINáRIO de 4 bits
SOMADOR BINáRIO de 4 bits Renato Cabral
 

What's hot (20)

TSync_Timing_Boards_revA
TSync_Timing_Boards_revATSync_Timing_Boards_revA
TSync_Timing_Boards_revA
 
Datasheet
DatasheetDatasheet
Datasheet
 
Configure ospf v3 single areaa
Configure ospf v3 single areaaConfigure ospf v3 single areaa
Configure ospf v3 single areaa
 
93 appendix pic18(l)f2 x4xk22 (1)
93 appendix pic18(l)f2 x4xk22 (1)93 appendix pic18(l)f2 x4xk22 (1)
93 appendix pic18(l)f2 x4xk22 (1)
 
Advanced motion controls dpcante 016b080
Advanced motion controls dpcante 016b080Advanced motion controls dpcante 016b080
Advanced motion controls dpcante 016b080
 
LinuxCNC 入門簡介
LinuxCNC 入門簡介LinuxCNC 入門簡介
LinuxCNC 入門簡介
 
Lathe Spindle Sensor
Lathe Spindle SensorLathe Spindle Sensor
Lathe Spindle Sensor
 
74ls373
74ls37374ls373
74ls373
 
7486
74867486
7486
 
FAR/MARS Avionics CDR
FAR/MARS Avionics CDRFAR/MARS Avionics CDR
FAR/MARS Avionics CDR
 
8051 experiments1
8051 experiments18051 experiments1
8051 experiments1
 
Cataloge ge 3.control and_automation_dienhathe.com-4_13_vat300_e_c5-1_rev_b
Cataloge ge 3.control and_automation_dienhathe.com-4_13_vat300_e_c5-1_rev_bCataloge ge 3.control and_automation_dienhathe.com-4_13_vat300_e_c5-1_rev_b
Cataloge ge 3.control and_automation_dienhathe.com-4_13_vat300_e_c5-1_rev_b
 
Ad7716
Ad7716Ad7716
Ad7716
 
74 hc hct393
74 hc hct39374 hc hct393
74 hc hct393
 
Plc programming course1
Plc programming course1Plc programming course1
Plc programming course1
 
abc song
abc songabc song
abc song
 
Introduction to-cleanflight
Introduction to-cleanflightIntroduction to-cleanflight
Introduction to-cleanflight
 
Iai robonet controller_specsheet
Iai robonet controller_specsheetIai robonet controller_specsheet
Iai robonet controller_specsheet
 
74ls390
74ls39074ls390
74ls390
 
SOMADOR BINáRIO de 4 bits
SOMADOR BINáRIO de 4 bits SOMADOR BINáRIO de 4 bits
SOMADOR BINáRIO de 4 bits
 

Viewers also liked

Allaboutequalizers
AllaboutequalizersAllaboutequalizers
Allaboutequalizersdouglaslyon
 
Seminar 20091023 heydt_presentation
Seminar 20091023 heydt_presentationSeminar 20091023 heydt_presentation
Seminar 20091023 heydt_presentationdouglaslyon
 
Lecture5 cuda-memory-spring-2010
Lecture5 cuda-memory-spring-2010Lecture5 cuda-memory-spring-2010
Lecture5 cuda-memory-spring-2010douglaslyon
 
35 dijkstras alg
35 dijkstras alg35 dijkstras alg
35 dijkstras algdouglaslyon
 
Td and-fd-mmse-teq
Td and-fd-mmse-teqTd and-fd-mmse-teq
Td and-fd-mmse-teqdouglaslyon
 
Inventors association of ct april 23 2013
Inventors association of ct april 23 2013Inventors association of ct april 23 2013
Inventors association of ct april 23 2013douglaslyon
 
CR346-Lec00 history
CR346-Lec00 historyCR346-Lec00 history
CR346-Lec00 historydouglaslyon
 
Crowdfunding your invention_ia
Crowdfunding your invention_iaCrowdfunding your invention_ia
Crowdfunding your invention_iadouglaslyon
 
Lec16 memoryhier
Lec16 memoryhierLec16 memoryhier
Lec16 memoryhierdouglaslyon
 
Fairfield univ lyons internet mktg 110315
Fairfield univ lyons internet mktg 110315Fairfield univ lyons internet mktg 110315
Fairfield univ lyons internet mktg 110315douglaslyon
 
Het belang van performance management
Het belang van performance managementHet belang van performance management
Het belang van performance managementTOPdesk
 

Viewers also liked (20)

Lecture5
Lecture5Lecture5
Lecture5
 
04ip
04ip04ip
04ip
 
01 intro
01 intro01 intro
01 intro
 
Lecture 04
Lecture 04Lecture 04
Lecture 04
 
Allaboutequalizers
AllaboutequalizersAllaboutequalizers
Allaboutequalizers
 
Seminar 20091023 heydt_presentation
Seminar 20091023 heydt_presentationSeminar 20091023 heydt_presentation
Seminar 20091023 heydt_presentation
 
Lecture5 cuda-memory-spring-2010
Lecture5 cuda-memory-spring-2010Lecture5 cuda-memory-spring-2010
Lecture5 cuda-memory-spring-2010
 
35 dijkstras alg
35 dijkstras alg35 dijkstras alg
35 dijkstras alg
 
Ht upload
Ht uploadHt upload
Ht upload
 
Td and-fd-mmse-teq
Td and-fd-mmse-teqTd and-fd-mmse-teq
Td and-fd-mmse-teq
 
Inventors association of ct april 23 2013
Inventors association of ct april 23 2013Inventors association of ct april 23 2013
Inventors association of ct april 23 2013
 
06tcpip
06tcpip06tcpip
06tcpip
 
Bmev3 w mov
Bmev3 w movBmev3 w mov
Bmev3 w mov
 
CR346-Lec00 history
CR346-Lec00 historyCR346-Lec00 history
CR346-Lec00 history
 
Crowdfunding your invention_ia
Crowdfunding your invention_iaCrowdfunding your invention_ia
Crowdfunding your invention_ia
 
Ch13
Ch13Ch13
Ch13
 
Lec16 memoryhier
Lec16 memoryhierLec16 memoryhier
Lec16 memoryhier
 
Ch15 transforms
Ch15 transformsCh15 transforms
Ch15 transforms
 
Fairfield univ lyons internet mktg 110315
Fairfield univ lyons internet mktg 110315Fairfield univ lyons internet mktg 110315
Fairfield univ lyons internet mktg 110315
 
Het belang van performance management
Het belang van performance managementHet belang van performance management
Het belang van performance management
 

Similar to Audio led bargraph equalizer

Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01cairo university
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming IIOmar Sanchez
 
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
AVR_Course_Day6 external hardware  interrupts and analogue to digital converterAVR_Course_Day6 external hardware  interrupts and analogue to digital converter
AVR_Course_Day6 external hardware interrupts and analogue to digital converterMohamed Ali
 
2.4G Radio Transceiver for IEEE802.15.4 and ZigBee Applications
2.4G Radio Transceiver for IEEE802.15.4 and ZigBee Applications2.4G Radio Transceiver for IEEE802.15.4 and ZigBee Applications
2.4G Radio Transceiver for IEEE802.15.4 and ZigBee ApplicationsPremier Farnell
 
Design and Implement Any Digital Filters in Less than 60 Seconds
Design and Implement Any Digital Filters in Less than 60 SecondsDesign and Implement Any Digital Filters in Less than 60 Seconds
Design and Implement Any Digital Filters in Less than 60 SecondsMike Ellis
 
Lecture SOHIL LUHAR
Lecture SOHIL LUHARLecture SOHIL LUHAR
Lecture SOHIL LUHARSOHIL LUHAR
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorialFutura infotech
 
Microcontrollers ii
Microcontrollers iiMicrocontrollers ii
Microcontrollers iiKumar Kumar
 
EC8691 - UNIT 5.pdf
EC8691 - UNIT 5.pdfEC8691 - UNIT 5.pdf
EC8691 - UNIT 5.pdfSPonmalar1
 
igorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reportsigorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reportsIgor Freire
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptxnaveen088888
 
MicrocontrollersII.ppt
MicrocontrollersII.pptMicrocontrollersII.ppt
MicrocontrollersII.pptSatheeshMECE
 
EE40_Final_Hack_Writeup
EE40_Final_Hack_WriteupEE40_Final_Hack_Writeup
EE40_Final_Hack_WriteupYanbo Yao
 
CC2500 Wireless Trans-receiver Module
CC2500 Wireless Trans-receiver ModuleCC2500 Wireless Trans-receiver Module
CC2500 Wireless Trans-receiver ModuleAarya Technologies
 

Similar to Audio led bargraph equalizer (20)

Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01Lecture 2 (system overview of c8051 f020) rv01
Lecture 2 (system overview of c8051 f020) rv01
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
Assembly programming II
Assembly programming IIAssembly programming II
Assembly programming II
 
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
AVR_Course_Day6 external hardware  interrupts and analogue to digital converterAVR_Course_Day6 external hardware  interrupts and analogue to digital converter
AVR_Course_Day6 external hardware interrupts and analogue to digital converter
 
2.4G Radio Transceiver for IEEE802.15.4 and ZigBee Applications
2.4G Radio Transceiver for IEEE802.15.4 and ZigBee Applications2.4G Radio Transceiver for IEEE802.15.4 and ZigBee Applications
2.4G Radio Transceiver for IEEE802.15.4 and ZigBee Applications
 
Design and Implement Any Digital Filters in Less than 60 Seconds
Design and Implement Any Digital Filters in Less than 60 SecondsDesign and Implement Any Digital Filters in Less than 60 Seconds
Design and Implement Any Digital Filters in Less than 60 Seconds
 
13486500-FFT.ppt
13486500-FFT.ppt13486500-FFT.ppt
13486500-FFT.ppt
 
CATV Optical Transmitter
CATV Optical TransmitterCATV Optical Transmitter
CATV Optical Transmitter
 
8085-paper-presentation.ppt
8085-paper-presentation.ppt8085-paper-presentation.ppt
8085-paper-presentation.ppt
 
Lecture SOHIL LUHAR
Lecture SOHIL LUHARLecture SOHIL LUHAR
Lecture SOHIL LUHAR
 
8051 training an interactive tutorial
8051 training an interactive tutorial8051 training an interactive tutorial
8051 training an interactive tutorial
 
Microcontrollers ii
Microcontrollers iiMicrocontrollers ii
Microcontrollers ii
 
EC8691 - UNIT 5.pdf
EC8691 - UNIT 5.pdfEC8691 - UNIT 5.pdf
EC8691 - UNIT 5.pdf
 
igorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reportsigorFreire_UCI_real-time-dsp_reports
igorFreire_UCI_real-time-dsp_reports
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
 
MicrocontrollersII.ppt
MicrocontrollersII.pptMicrocontrollersII.ppt
MicrocontrollersII.ppt
 
EE40_Final_Hack_Writeup
EE40_Final_Hack_WriteupEE40_Final_Hack_Writeup
EE40_Final_Hack_Writeup
 
Product catlog
Product catlogProduct catlog
Product catlog
 
CC2500 Wireless Trans-receiver Module
CC2500 Wireless Trans-receiver ModuleCC2500 Wireless Trans-receiver Module
CC2500 Wireless Trans-receiver Module
 

Recently uploaded

Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewasmakika9823
 
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptx
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptxBanana Powder Manufacturing Plant Project Report 2024 Edition.pptx
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptxgeorgebrinton95
 
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCRsoniya singh
 
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDFCATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDFOrient Homes
 
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiFULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiMalviyaNagarCallGirl
 
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...lizamodels9
 
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCRsoniya singh
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...lizamodels9
 
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfCatalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfOrient Homes
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechNewman George Leech
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedKaiNexus
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfmuskan1121w
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Serviceankitnayak356677
 
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / NcrCall Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncrdollysharma2066
 

Recently uploaded (20)

Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service DewasVip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
Vip Dewas Call Girls #9907093804 Contact Number Escorts Service Dewas
 
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptx
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptxBanana Powder Manufacturing Plant Project Report 2024 Edition.pptx
Banana Powder Manufacturing Plant Project Report 2024 Edition.pptx
 
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Hauz Khas 🔝 Delhi NCR
 
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDFCATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
CATALOG cáp điện Goldcup (bảng giá) 1.4.2024.PDF
 
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | DelhiFULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
FULL ENJOY - 9953040155 Call Girls in Chhatarpur | Delhi
 
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
Call Girls In Kishangarh Delhi ❤️8860477959 Good Looking Escorts In 24/7 Delh...
 
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
(8264348440) 🔝 Call Girls In Mahipalpur 🔝 Delhi NCR
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
 
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdfCatalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
Catalogue ONG NƯỚC uPVC - HDPE DE NHAT.pdf
 
Best Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting PartnershipBest Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting Partnership
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
RE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman LeechRE Capital's Visionary Leadership under Newman Leech
RE Capital's Visionary Leadership under Newman Leech
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
 
rishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdfrishikeshgirls.in- Rishikesh call girl.pdf
rishikeshgirls.in- Rishikesh call girl.pdf
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
 
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / NcrCall Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
 

Audio led bargraph equalizer

  • 1. Audio Led Bargraph Equalizer Final Project for ECE-3551 05/02/09 Instructor: Dr Kepuska By; Anushan Weerasooriya & Chris Guzowski
  • 2. Outline • Summary: 1) Objective: – 6 Band Led Bargraph Equalizer 2) Design: - Overview 3) C Code: - FiltersTimersDisplay 4) Difficulties: - Audio Addition 5) Outcome: - Functionality
  • 3. 6 Band Led Bargraph Equalizer • • Synopsis: a) Using 6 leds and 4 switches create an led bargraph equalizer using C code and the Analog Devices BF533 Evaluation board. This project contains modest functionality so that it could be used for the job that it was intended. Each switch along with each led of the Bf533 will be utilized. Intended functions will include audio gain and hold adjustments for each individual bandpass filter, varying led intensity displaying audio output levels (alterd vs. unaltered), audio switchability for channel comparison and sample/hold led display. • b) The led display will recreate audio levels (across all 6 bandpass filters) by illumination intensity, the brightest being the most and the weakest being the least. • c) All 6 filters will be recombined into a composite audio output of the original audio input incorporating our desired gain adjustments.
  • 4. Overview • Implementation • Switches/Leds: a) Switch #1 selects each bandpass of filters one at a time which will be displayed by its appropriate led and corresponding illumination intensity. b) Switch #2 controls 3 levels of gain adjustments for each filter one at a time. c) Switch #3 locks in gain for each channel adjusted. d) Switch #4 selects altered (all bandpass filters) audio with full led bargraph display or the full led bargraph display by itself. FIR Filters: a) Six bandpass filters will make up the original audio input spectrum. Low frequencies will be pass by the 200hz750hz filter, the highest frequencies will be passed by the 7khz-10khz filter and the midband frequencies will be pass by the 5khz-7khz, the 3khz-5khz, the 1.5khz-3khz , the 750hz-1.2khz filters respectively. Diagram of Typical FIR Filter
  • 5. Overview - Switching Code snippets for audio switching control: *pDMA1_IRQ_STATUS = 0x0001; // Confirm Interrupt Handling if(LED1 == 0x00 && LED4 == 0x00) // Checking LED Status { // Copy Input Data from Dma Input Buffer into Variables iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; Process_Data();// Call Function that Contains user Code // Copy Processed Data from Variables into Dma Output Buffer iTxBuffer1[INTERNAL_DAC_L0] = iChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = iChannel0RightOut; Status1 = 0x00; // Controls Led's Illumination Time } if(LED1 == 0x01 && LED4 == 0x00) // Checking LED Status { // Copy Input Data from Dma Input Buffer into Variables iChannel0LeftIn = iRxBuffer1[INTERNAL_ADC_L0]; iChannel0RightIn = iRxBuffer1[INTERNAL_ADC_R0]; // Copy Processed Data from Variables into Dma Output Buffer Status1 = 0x01; // Controls Led's Illumination Time abandpass(); iTxBuffer1[INTERNAL_DAC_L0] = aChannel0LeftOut; iTxBuffer1[INTERNAL_DAC_R0] = aChannel0RightOut; } // One Bandpass Filter at a Time if(*pFIO_FLAG_C == 0x0100 && pf8count == 0) // Switch P8 Flag & Count at 0 { FIO_ANOM_0311_FLAG_W(0x0100,pFIO_FLAG_C);// Confirm Interrupt Handling LED1 = 0x01; // Sets LED1 Control Variable pf8count++; } if(*pFIO_FLAG_C == 0x0100 && pf8count == 1) // Switch P8 Flag & Count at 1 { FIO_ANOM_0311_FLAG_W(0x0100,pFIO_FLAG_C);// Confirm Interrupt Handling LED1 = 0x02; // Sets LED1 Control Variable pf8count++; }
  • 6. FIR Filters - Code in Process_data.c file – Filter Coefficients (101) for the 100th Order – Impulse response of a Nth order FIR filter lasts N+1 samples & dies to 0 – Filter Equation Implementation for (m=fBL - 1; m >= 0; m--) { xl[m]=xl[m-1]; // moving the array data from the end to the beginning (leftwards) xr[m]=xr[m-1]; } xl[0]=(float)(iChannel0LeftIn<<8); // Shift Left 8 bits to make 16 bit arrays since ADC gives 24 bit arrays xr[0]=(float)(iChannel0RightIn<<8); for(counter=0;counter < fBL;counter++) { yl += fB[counter] * xl[counter]; yr += fB[counter] * xr[counter]; } FIR Filter Algorithm N y[ n] = ∑ w[ k ] * x[n − k ] k =0 fChannel0LeftOut=(((int)yl)>>8)*gainbp6; // Shift Right 8 bits to create the original 24 bit array fChannel0RightOut=(((int)yr)>>8)*gainbp6;
  • 7. Timers - Code in ISR.c file • • a) A two timer operation will be enabled to run the led brightness display by gauging the fastest running timer against the slowest running timer ultimately providing varying intensities with each corresponding led frequency band. • • • • • • • Timer Configuration: *pTIMER0_CONFIG = 0x0019; *pTIMER0_PERIOD = 0x00080000; // Timer0 Period *pTIMER0_WIDTH = 0x00040000; // Timer0 Width *pTIMER1_PERIOD = 0x00003900; // Timer1 Period *pTIMER1_WIDTH = 0x00001950; // Timer0 Width *pTIMER_ENABLE = 0x0003; // Enable Timers0/1 • • • • • • • • • • • • • • • • Timer Setup: Timer Code: timerstatus = (*pTIMER_STATUS); // Records TIMER_STATUS before it is Reset *pTIMER_STATUS = 0x0003; // Confirms Interrupt Handling if((timerstatus & 0x0001) == 0x0001) // Checks for Timer0 Status Bit { tim0++; // Once Timer0 is Detected Keep Enabled until Cycle Complete } if((timerstatus & 0x0002) == 0x0002) // Checks for Timer1 Status Bit { tim1++; // Auto Increment tim1 tim2++; // Auto Increment tim2 } if(tim0 < 1 ) // Reset tim0=1 when tim0 does not = 1 { tim1 = 0; }
  • 8. Timers - Continued • • • • • • • • • • • • • • • • Timer Code // Led1 Section-------------------------------------------------------------------------------------------------------------// if(ledctr == 1 && tim0 == 1 && tim1 == 1) // Send to amp "level" of Freq #1 when tim0=1 { if(hold== 0) { amp1 = famp1; // Samples and Holds famp1 Before it is Used } *pFlashA_PortB_Data = 0x01&Status1; // Illuminate Led #1 } if(ledctr == 1 && tim0 == 1 && tim1 > amp1) // Checks to Turnoff all Led's { *pFlashA_PortB_Data = 0x00; // De-illuminate all Led's tim0 = 0; // reset tim0=0 tim1 = 0; // reset tim1=0 } Timing Diagram Timer0 pTIMER0_PERIOD = 0x00080000 -32 Possible Illumination Levels- Timer1 pTIMER1_PERIOD = 0x00003900 Initialize.c file Changes: // Set Sport0 RX (DMA1) interrupt priority to 2 = IVG9 *pSIC_IAR0 = 0xffffffff; *pSIC_IAR1 = 0xffffff2f; // Sport0->ID2 *pSIC_IAR2 = 0xffff5f44; // FlagA->ID5/Timer0->ID4/Timer1->ID4 // assign ISRs to interrupt vectors register_handler(ik_ivg9, Sport0_RX_ISR); // Sport0 RX ISR -> IVG 9 register_handler(ik_ivg11, Timerz_ISR); // Timer0/1 ISR -> IVG 11 register_handler(ik_ivg12, FlagA_ISR); // FlagA ISR -> IVG 12 // enable Sport0 RX and FlagA interrupt *pSIC_IMASK = 0x000b0200;
  • 9. Display - Code in ISR.c Process_data.c files Led Values are set here after each filter algorithm which converts audio output words into integers: // Led Value Set Here if(aChannel0LeftOut<0xffff0000 && aChannel0LeftOut>0xf0000000) { famp1 = 32; } if(aChannel0LeftOut<0xf0000000 && aChannel0LeftOut>0x0f000000) { famp1 = 24; } if(aChannel0LeftOut<0x0f000000 && aChannel0LeftOut>0x00f00000) { famp1 = 16; } if(aChannel0LeftOut<0x00f00000 && aChannel0LeftOut>0x000f0000) { famp1 = 8; } if(aChannel0LeftOut<0x000f0000 && aChannel0LeftOut>0x0000f000) { famp1 = 4; } if(aChannel0LeftOut<0x0000f000 && aChannel0LeftOut>0x00000f00) { famp1 = 0; }
  • 10. Audio Addition • • Recombining Audio Bands: a) An unorthodox audio addition scheme was utilized to allow for complete board functionality. All bandpass audio filters are added using time division multiplexing. This seemed to be the only way to recombine six altered audio channel into one composite stream and overcome Bf533 board slowdowns or halts. • • • • • • • • • • • • • • • • • • • • • • • • • • • • if(LED4 == 0x01 && LED1 == 0x00) // Checking LED status { // Copy Processed Data from Variables into Dma Output Buffer if(tim2 == 1) { abandpass(); } if(tim2 == 2) { bbandpass(); } if(tim2 == 3) { cbandpass(); } if(tim2 == 4) { dbandpass(); } if(tim2 == 5) { ebandpass(); } if(tim2 == 6) { fbandpass(); } iTxBuffer1[INTERNAL_DAC_L0] = aChannel0LeftOut+bChannel0LeftOut+cChannel0LeftOut+dChannel0LeftOut+eChannel0LeftOut+fChannel0LeftOut;
  • 11. Functionality • • Discussion: a) All the desired led/switch and audio pass functions of the project operated nominally; however, final added bandpass filters produced unwanted frequencies in each band producing an undesirable filtered audio output. Total functional operation was realized; however, there were unwanted sympathic (outside of bandpass filter) frequencies and Bf533 board slowdowns/halts. • b) Also, because of time constraints and audio addition (switching noise) problems, other functions such as adjustable led rise/decay rates and decibel signal referencing would have been a nice touch but could not be realized. • c) Although we had a few difficulties, overall we learned a lot about controlling the Bf533 board and using it to digitally manage signals.