Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microcomputer Systems I ECE 3551 – Fall 2010 Ryan M. Winget.

Similar presentations


Presentation on theme: "Microcomputer Systems I ECE 3551 – Fall 2010 Ryan M. Winget."— Presentation transcript:

1 Microcomputer Systems I ECE 3551 – Fall 2010 Ryan M. Winget

2  To synthesize the old Scottish poem song “Auld Lang Syne” using the ADSP-BF533 board.  To be able to be able to start and stop the song using the button PF8  To be able to slow down and speed up the song using the buttons PF9 and PF10.

3

4  Used Digital Sinusoids for the sound synthesis.  f s = 48000 Hz  f 0 = note frequency

5 Notef 0 (Hz)ω0ω0 Max n for 2pi b3246.9420.032325194 c#4277.1830.036283173 d#4311.1270.040726154 e4329.6280.043148146 f#4369.9940.048432130 g#4415.3050.054363116 b4493.8830.06464997 c#5554.3650.07256687

6  Sport0 ◦ Used to send the audio signals to the speakers  FlagA ◦ Used for control of the buttons PF8-PF10 in this project  Timer0 ◦ Added to this project to control the timing of the song.

7  Code files used: ◦ Talkthrough.h ◦ main.c ◦ Initialize.c ◦ ISR.c ◦ Process_data.c

8  Bit Manipulation: #define bit_get(p,m) ((p) & (m)) #define bit_set(p,m) ((p) |= (m)) #define bit_clear(p,m) ((p) &= ~(m)) #define bit_flip(p,m) ((p) ^= (m)) #define bit_write(c,p,m) (c ? bit_set(p,m) : bit_clear(p,m)) #define BIT(x) (0x01 << (x)) #define LED9 BIT(5) #define LED8 BIT(4) #define LED7 BIT(3) #define LED6 BIT(2) #define LED5 BIT(1) #define LED4 BIT(0)

9  Music Control extern int count; //initialize counter for Auld Lang Syne extern int speedUp; //initialize counter for speeding up extern int slowDown; //initialize counter for slowing down  Counter for button PF8 extern int pf8_state;

10  Uses a while loop to run the code indefinitely until it is halted.  Initializes the values for count, speedUp, slowDown and pf8_state to be 0.

11  Initializes: ◦ Init_EBIU ◦ Init_Flags ◦ Init_Flash ◦ Init1836 ◦ Init_Sport0 ◦ Init_DMA ◦ Enable_DMA_Sport0 ◦ Init_Interrupts ◦ Init_Timers

12  Interrupt Service Register ◦ Sport0_RX_ISR  Sends audio to the speakers in this project ◦ FlagA_ISR  *pFIO_FLAG_C == 0x0100  PF8  *pFIO_FLAG_C == 0x0200  PF9  *pFIO_FLAG_C == 0x0400  PF10

13  FlagA_ISR (Cont.) ◦ *pFlashA_PortB_Data  Controls the LEDs  Timer0_ISR ◦ Controls timing for the notes

14  I initialized the values for the radial frequencies of the notes and some other values used for the digital sinusoid equation for synthesizing the notes.

15  An else if statement was used to cycle through the notes of the song.

16  Timing for the notes sounds off and can use work.  Need to add a slight pause between notes with the same frequencies that are back to back.  Clean up unused code from the lab I initially used.

17  Xerxes Beharry for helping me realize that the value of *pSIC_IAR2 should be 0xffff5ff4.  Ben Lishman for helping me debug my project.  Haren Lachland for helping me understand the board throughout the course.

18


Download ppt "Microcomputer Systems I ECE 3551 – Fall 2010 Ryan M. Winget."

Similar presentations


Ads by Google