Karaoke Machine
An I2C Controller Implementation
Background
I worked on this team project with 4 other students in my ECE 2031 Digital Design Laboratory class. We worked on this project for a duration of 8 weeks. Below you can download the final report specifying the delivered requirements:
|
|
Summary
The karaoke machine was built using a simple computer (SCOMP), Wolfson WM8731 audio codec and an I2C controller on a DE2 board. I2C controller was written in VHDL which helped in managing the data between SCOMP, the audio codec and several other peripheral devices. For this project, the seven peripheral devices used were switches, pushbuttons, LEDs, LCD screen, microphone, speaker and an iPod. I2C controller sends two bytes of data when writing and receives one byte of data when reading. It sends 8-bit commands to any 7-bit addresses on I2C bus. It responds to the in and out commands of the SCOMP. An assembly program was written and downloaded to the DE2 board to control the audio codec and all the peripheral devices. This assembly program consisted of four main states, namely, AudioInit, HandleButtons, HandleSwitches, and HandleState. AudioInit takes care of the initializing the settings of the audio codec, HandleButtons and HandleSwitches manage the user response of the pushbuttons and the switches respectively, and HandleState ensures correct transition between the states. This execution provides a robust design that allows the user to easily communicate to other I2C enabled devices for future enhancements. The future work which the team wants to do with the current project includes ideas such as integrating the video codec to display the song lyrics and visual backgrounds, adding clock synchronization and playing music from a memory card or USB storage. Moreover, the main advantage of this implementation is discretization of fades and preventing the blocking of the user. It also allows state transition to stop in the middle of the fade. The design met all the requirements of the project and was very successful during the demonstration.
The karaoke machine was built using a simple computer (SCOMP), Wolfson WM8731 audio codec and an I2C controller on a DE2 board. I2C controller was written in VHDL which helped in managing the data between SCOMP, the audio codec and several other peripheral devices. For this project, the seven peripheral devices used were switches, pushbuttons, LEDs, LCD screen, microphone, speaker and an iPod. I2C controller sends two bytes of data when writing and receives one byte of data when reading. It sends 8-bit commands to any 7-bit addresses on I2C bus. It responds to the in and out commands of the SCOMP. An assembly program was written and downloaded to the DE2 board to control the audio codec and all the peripheral devices. This assembly program consisted of four main states, namely, AudioInit, HandleButtons, HandleSwitches, and HandleState. AudioInit takes care of the initializing the settings of the audio codec, HandleButtons and HandleSwitches manage the user response of the pushbuttons and the switches respectively, and HandleState ensures correct transition between the states. This execution provides a robust design that allows the user to easily communicate to other I2C enabled devices for future enhancements. The future work which the team wants to do with the current project includes ideas such as integrating the video codec to display the song lyrics and visual backgrounds, adding clock synchronization and playing music from a memory card or USB storage. Moreover, the main advantage of this implementation is discretization of fades and preventing the blocking of the user. It also allows state transition to stop in the middle of the fade. The design met all the requirements of the project and was very successful during the demonstration.