DOC PREVIEW
Berkeley COMPSCI 150 - Project Checkpoint 2 Audio Interface

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

DAC OverviewEPROM OverviewEPROM Data FormatPrelab PreparationsEPROM Pin ConnectionsDAC and LM4862 Amplifier Pin ConnectionsProgramming the EPROMDesign StructureAudio Module StructureDesign SpecificationsDAC ModuleAudio ModuleController InterpreterThings To DoDesignImplementation / schematicsTestingUniversity of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science EECS 150 R. H. Katz Spring 2001 P. Yan Project Checkpoint 2 Audio Interface DAC Overview In order for the DreamKatz videogame console to generate sound, we need to translate the digital sound data stored in the EPROM (erasable programmable ROM) into an analog signal so that it can be output to a speaker. To accomplish this, we will use a DAC (digital to analog converter), which can be thought of as the DreamKatz’s sound chip. The AD1866 we are using is a 2-channel 16-bit DAC (we are only using one channel, though). Internally, the DAC has a 16-bit shift register, which shifts in a new bit from the DL line on each positive edge of the clock. On a negative edge of the LL line, the DAC takes the current 16-bit value in the shift register as the new value to output. The DAC only changes its output value at each negative edge of LL. Notice that the negative edge of LL comes after the last bit has been shifted in but before the next positive edge of the clock. This is a VERY IMPORTANT detail that you should be aware of when you design the DAC module. EPROM Overview We will use the EPROM to store sound data for sound effects. The EPROM uses 19-bit addresses, which reference 8-bit words. The only interfaces with the EPROM are the address lines (19 bits) and the data lines (8 bits). To read a word, all that is necessary is to drive the address lines with an address, and the word at that address will be output to the data lines (after a small delay, of course). EPROM Data Format The sound samples stored in the EPROM are 16-bit (two’s complement) sampled at 16khz. Since the EPROM is 512K, this gives us a total of 16 seconds of sound. To organize the sounds, the EPROM is partitioned into 8 segments each holding 2 seconds of sound; the upper (most significant) three bits are used to refer to each partition. These 8 partitions are used to store six sound effects. The first fourpartitions each hold one sound. The fifth and sixth partitions hold a double-long (4 seconds) sound, as do the seventh and eighth partitions. Since each sound sample is 16-bit, we need two words of the EPROM to hold each sample. The samples in the EPROM are all aligned in little endian format. Each sample resides in two consecutive addresses, where the lower byte is contained at an address with LSB = 0, and the higher byte is contained at an address with LSB = 1. Thus, you can refer to a sample by the upper 18 bits of the address and just toggle the LSB to get the lower and higher bytes. Prelab Preparations This checkpoint requires these hardware components: • M27C4001 EPROM • AD1866 DAC • LM4862 amplifier • the two discrete packages There is A LOT of wire wrapping to do. All of the components listed above need to be wire wrapped. It will probably be helpful to place wrap-IDs on the pin array for each chip, which can be found at U:\cs150\projectdocs\wrapid.doc. Also, it is a good idea to place components close to other components that they will be connected to (i.e. place the EPROM close to the Xilinx 4010XL chip). EPROM Pin Connections 000 001 010 011 100 101 110 111 sound 1sound 2sound 3sound 4sound 5 sound 6 EPROM…0 …1 16-bit sample lower byte higher byteDAC and LM4862 Amplifier Pin Connections connection connection VCC P59 P60 P67 P66 P18 P14 P62 GND GND P61 P84 P83 P81 P82 P80 VCC P57 P58 P65 P10 P8 P9 P7 P6 P4 P5 P3 P77 P79 P78 GND VCC 1 15 9 AD1866 P70 P69 P72 2 (LL) 3 (DL) 4 (clk) 11 13 7 12 10µf 10µf 14 GND GND GND GND VCC VCC LM4862 GND 1µf . GND GND VCC 1nf 22K 4 3 2 1 7 6 . . 5 8 . headphone jack 20K 0.47µf 10µf 0.1µf 10µf 10µf 0.1µf 0.1µf 0.1µf 0.47µf 20K 1nf 22K 0.1µf 1µf discrete parts .Programming the EPROM All of the tools necessary to program the EPROM are found in the back corner of 204b Cory. The programming software can be found in the computer on the left (next to the trash can). First, you must make sure the EPROM is blank. To erase the contents of the EPROM, place it in the UV Eraser for about 15 – 20 minutes. To program the EPROM, open up C:\advin\Speprom.exe. First, you need to make sure the settings are correct. The device type should be ST M27C4001 512KB. (This should already be set.) Also make sure that the file format (found in the File menu) is BINARY. Then follow these steps to program the EPROM: 1) Place the EPROM in the PILOT-U40 programmer 2) Set the binary file directory (from the File->Directory menu) to C:\cs150\sfx\test.bin 3) Load the file into buffer 0 (File->Load) 4) Make sure the EPROM is blank (PROM->Blank) 5) Program the EPROM (PROM->Program) 6) Verify that it was programmed correctly (PROM->Verify) Design Structure The goal of this checkpoint is to build an independent audio module that can receive requests to play a sound effect. We will test this module with the controller from checkpoint 1. Audio Module Structure The Audio Module contains the DAC Module so that it can communicate with the DAC. It requires an FSM to handle requests and communicate with the EPROM and DAC Module. EPROM Audio Module controller block 3 8 19 32 play sound address Controller Interpreter address data EPROM 8 19 address data Audio Module FSM play sound address 3 DAC Module 16 sample load sampleDesign Specifications The goal for this checkpoint is very simple: to play a sound effect when a button is pressed on the controller. Since there are 6 sounds, we will use these 6 buttons: button sound effect (sound address) C-UP sound 1 (000) C-DOWN sound 2 (001) C-LEFT sound 3 (010) C-RIGHT sound 4 (011) A sound 5 (100) B sound 6 (110) All clocks should be the 4mhz clock used in checkpoint 1. DAC Module The DAC Module should store the 16-bit sample into a register upon receiving a load signal, which should be a one-clock-cycle pulse. Then it should serially shift out the 16-bit sample (MSB first) to the DL line. After the 16th bit has


View Full Document

Berkeley COMPSCI 150 - Project Checkpoint 2 Audio Interface

Documents in this Course
Lab 2

Lab 2

9 pages

Debugging

Debugging

28 pages

Lab 1

Lab 1

15 pages

Memory

Memory

13 pages

Lecture 7

Lecture 7

11 pages

SPDIF

SPDIF

18 pages

Memory

Memory

27 pages

Exam III

Exam III

15 pages

Quiz

Quiz

6 pages

Problem

Problem

3 pages

Memory

Memory

26 pages

Lab 1

Lab 1

9 pages

Memory

Memory

5 pages

Load more
Download Project Checkpoint 2 Audio Interface
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Project Checkpoint 2 Audio Interface and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Project Checkpoint 2 Audio Interface 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?