ZHCSEY6E March 2013 – January 2023 DRV2667
PRODUCTION DATA
This example loads and plays the six effects shown in Figure 6-15 through Figure 6-20 into the waveform RAM. This is a simple example of how to put multiple waveforms in memory for subsequent low-latency recall. It is generally good practice to put the waveform header in page 1, and the waveform data in the following pages. When new waveforms are added later, the waveform data does not need to be shifted when this practice is used. Although this sequence seems long with the verbose descriptions, this example only takes 121 bytes of the waveform RAM, that is 6% of the available on-chip memory.
I2C ADDRESS | I2C DATA | DESCRIPTION |
---|---|---|
Control | ||
0x02 | 0x00 | Take device out of standby mode |
0x01 | 0x03 | Set to highest gain, 200 VPP maximum |
0x03 | 0x02 | Set sequencer to play waveform ID #2 (Figure 6-15) |
0x04 | 0x01 | Set sequencer to play waveform ID #1 (Figure 6-16) |
0x05 | 0x03 | Set sequencer to play waveform ID #3 (Figure 6-17) |
0x06 | 0x04 | Set sequencer to play waveform ID #4 (Figure 6-18) |
0x07 | 0x05 | Set sequencer to play waveform ID #5 (Figure 6-19) |
0x08 | 0x06 | Set sequencer to play waveform ID #6 (Figure 6-20) |
0x09 | 0x00 | End of sequence |
Header | ||
0xFF | 0x01 | Set memory to page 1 |
0x00 | 0x1E | Header size –1 |
0x01 | 0x81 | Start address upper byte #1, also indicates Mode 3 |
0x02 | 0x00 | Start address lower byte #1 |
0x03 | 0x01 | Stop address upper byte #1 |
0x04 | 0x03 | Stop address lower byte #1 |
0x05 | 0x01 | Repeat count, play waveform #1 once |
0x06 | 0x81 | Start address upper byte #2, also indicates Mode 3 |
0x07 | 0x04 | Start address lower byte #2 |
0x08 | 0x01 | Stop address upper byte #2 |
0x09 | 0x07 | Stop address lower byte #2 |
0x0A | 0x01 | Repeat count, play waveform #2 once |
0x0B | 0x81 | Start address upper byte #3, also indicates Mode 3 |
0x0C | 0x08 | Start address lower byte #3 |
0x0D | 0x01 | Stop address upper byte #3 |
0x0E | 0x0B | Stop address lower byte #3 |
0x0F | 0x01 | Repeat count, play waveform #3 once |
0x10 | 0x81 | Start address upper byte #4, also indicates Mode 3 |
0x11 | 0x0C | Start address lower byte #4 |
0x12 | 0x01 | Stop address upper byte #4 |
0x13 | 0x1B | Stop address lower byte #4 |
0x14 | 0x01 | Repeat count, play waveform #4 once |
0x15 | 0x81 | Start address upper byte #5, also indicates Mode 3 |
0x16 | 0x1C | Start address lower byte #5 |
0x17 | 0x01 | Stop address upper byte #5 |
0x18 | 0x37 | Stop address lower byte #5 |
0x19 | 0x01 | Repeat count, play waveform #5 once |
0x1A | 0x81 | Start address upper byte #6, also indicates Mode 3 |
0x1B | 0x38 | Start address lower byte #6 |
0x1C | 0x01 | Stop address upper byte #6 |
0x1D | 0x5B | Stop address lower byte #6 |
0x1E | 0x01 | Repeat count, play waveform #6 once |
Data | ||
0xFF | 0x02 | Set memory to page 2 |
0x00 | 0xFF | Amplitude for waveform ID #1, full-scale, 200 VPP at gain = 3 |
0x01 | 0x1A | Frequency for waveform ID #1, 203 Hz |
0x02 | 0x0A | Duration for waveform ID #1, play 10 cycles |
0x03 | 0x10 | Envelope for waveform ID #1, ramp up = 32 ms, ramp down = no envelope |
0x04 | 0xFF | Amplitude for waveform ID #2, full-scale, 200 VPP at gain = 3 |
0x05 | 0x1A | Frequency for waveform ID #2, 203 Hz |
0x06 | 0x03 | Duration for waveform ID #2, play 3 cycles |
0x07 | 0x01 | Envelope for waveform ID #2, ramp up = no envelope, ramp down = 32 ms |
0x08 | 0xFF | Amplitude for waveform ID #3, full-scale, 200 VPP at gain = 3 |
0x09 | 0x1A | Frequency for waveform ID #3, 203 Hz |
0x0A | 0x0A | Duration for waveform ID #3, play 10 cycles |
0x0B | 0x12 | Envelope for waveform ID #3, ramp up = 32 ms, ramp down = 64 ms |
0x0C | 0xFF | Amplitude for waveform ID #4, full-scale, 200 VPP at gain = 3 |
0x0D | 0x1A | Frequency for waveform ID #4, 203 Hz |
0x0E | 0x04 | Duration for waveform ID #4, play 4 cycles |
0x0F | 0x00 | Envelope for waveform ID #4, ramp up = no envelope, ramp down = no envelope |
0x10 | 0xBF | Amplitude for waveform ID #4, 150 VPP at gain = 3 |
0x11 | 0x1A | Frequency for waveform ID #4, 203 Hz |
0x12 | 0x04 | Duration for waveform ID #4, play 4 cycles |
0x13 | 0x00 | Envelope for waveform ID #4, ramp up = no envelope, ramp down = no envelope |
0x14 | 0x80 | Amplitude for waveform ID #4,100 VPP at gain = 3 |
0x15 | 0x1A | Frequency for waveform ID #4, 203 Hz |
0x16 | 0x04 | Duration for waveform ID #4, play 4 cycles |
0x17 | 0x00 | Envelope for waveform ID #4, ramp up = no envelope, ramp down = no envelope |
0x18 | 0x40 | Amplitude for waveform ID #4, full-scale, 50 VPP at gain = 3 |
0x19 | 0x1A | Frequency for waveform ID #4, 203 Hz |
0x1A | 0x04 | Duration for waveform ID #4, play 4 cycles |
0x1B | 0x00 | Envelope for waveform ID #4, ramp up = no envelope, ramp down = no envelope |
0x1C | 0xFF | Amplitude for waveform ID #5, full-scale, 200 VPP at gain = 3 |
0x1D | 0x0D | Frequency for waveform ID #5, 102 Hz |
0x1E | 0x02 | Duration for waveform ID #5, play 2 cycles |
0x1F | 0x00 | Envelope for waveform ID #5, ramp up = no envelope, ramp down = no envelope |
0x20 | 0x00 | Amplitude for waveform ID #5, 0 V for delay |
0x21 | 0x26 | Frequency for waveform ID #5, 297 Hz |
0x22 | 0x01 | Duration for waveform ID #5, play 1 cycle (3.4 ms delay) |
0x23 | 0x00 | Envelope for waveform ID #5, ramp up = no envelope, ramp down = no envelope |
0x24 | 0xFF | Amplitude for waveform ID #5, full-scale, 200 VPP at gain = 3 |
0x25 | 0x13 | Frequency for waveform ID #5, 148 Hz |
0x26 | 0x02 | Duration for waveform ID #5, play 2 cycles |
0x27 | 0x00 | Envelope for waveform ID #5, ramp up = no envelope, ramp down = no envelope |
0x28 | 0x00 | Amplitude for waveform ID #5, 0 V for delay |
0x29 | 0x26 | Frequency for waveform ID #5, 297 Hz |
0x2A | 0x01 | Duration for waveform ID #5, play 1 cycle (3.4 ms delay) |
0x2B | 0x00 | Envelope for waveform ID #5, ramp up = no envelope, ramp down = no envelope |
0x2C | 0xFF | Amplitude for waveform ID #5, full-scale, 200 VPP at gain = 3 |
0x2D | 0x1A | Frequency for waveform ID #5, 203 Hz |
0x2E | 0x02 | Duration for waveform ID #5, play 2 cycles |
0x2F | 0x00 | Envelope for waveform ID #5, ramp up = no envelope, ramp down = no envelope |
0x30 | 0x00 | Amplitude for waveform ID #5, 0 V for delay |
0x31 | 0x26 | Frequency for waveform ID #5, 297 Hz |
0x32 | 0x01 | Duration for waveform ID #5, play 1 cycle (3.4 ms delay) |
0x33 | 0x00 | Envelope for waveform ID #5, ramp up = no envelope, ramp down = no envelope |
0x34 | 0xFF | Amplitude for waveform ID #5, full-scale, 200 VPP at gain = 3 |
0x35 | 0x26 | Frequency for waveform ID #5, 297 Hz |
0x36 | 0x02 | Duration for waveform ID #5, play 2 cycles |
0x37 | 0x00 | Envelope for waveform ID #5, ramp up = no envelope, ramp down = no envelope |
0x38 | 0xFF | Amplitude for waveform ID #6, full-scale, 200 VPP at gain = 3 |
0x39 | 0x13 | Frequency for waveform ID #6, 148 Hz |
0x3A | 0x06 | Duration for waveform ID #6, play 6 cycles |
0x3B | 0x00 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = no envelope |
0x3C | 0x00 | Amplitude for waveform ID #6, 0 V for delay |
0x3D | 0x0D | Frequency for waveform ID #6, 102 Hz |
0x3E | 0x05 | Duration for waveform ID #6, play 5 cycles (50 ms delay) |
0x3F | 0x00 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = no envelope |
0x40 | 0x80 | Amplitude for waveform ID #6, 100 VPP at gain = 3 |
0x41 | 0x1A | Frequency for waveform ID #6, 203 Hz |
0x42 | 0x06 | Duration for waveform ID #6, play 6 cycles |
0x43 | 0x00 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = no envelope |
0x44 | 0x00 | Amplitude for waveform ID #6, 0 V for delay |
0x45 | 0x0D | Frequency for waveform ID #6, 102 Hz |
0x46 | 0x05 | Duration for waveform ID #6, play 5 cycles (50 ms delay) |
0x47 | 0x00 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = no envelope |
0x48 | 0xBF | Amplitude for waveform ID #6, 150 VPP at gain = 3 |
0x49 | 0x20 | Frequency for waveform ID #6, 250 Hz |
0x4A | 0x06 | Duration for waveform ID #6, play 6 cycles |
0x4B | 0x00 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = no envelope |
0x4C | 0x00 | Amplitude for waveform ID #6, 0 V for delay |
0x4D | 0x0D | Frequency for waveform ID #6, 102 Hz |
0x4E | 0x05 | Duration for waveform ID #6, play 5 cycles (50 ms delay) |
0x4F | 0x00 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = no envelope |
0x50 | 0xFF | Amplitude for waveform ID #6, full-scale, 200 VPP at gain = 3 |
0x51 | 0x26 | Frequency for waveform ID #6, 297 Hz |
0x52 | 0x04 | Duration for waveform ID #6, play 4 cycles |
0x53 | 0x00 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = no envelope |
0x54 | 0x00 | Amplitude for waveform ID #6, 0 V for delay |
0x55 | 0x0D | Frequency for waveform ID #6, 102 Hz |
0x56 | 0x05 | Duration for waveform ID #6, play 5 cycles (50 ms delay) |
0x57 | 0x00 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = no envelope |
0x58 | 0xBF | Amplitude for waveform ID #6,150 VPP at gain = 3 |
0x59 | 0x20 | Frequency for waveform ID #6, 250 Hz |
0x5A | 0x01 | Duration for waveform ID #6, play 1 cycle |
0x5B | 0x08 | Envelope for waveform ID #6, ramp up = no envelope, ramp down = 256 ms |
Control | ||
0xFF | 0x00 | Set page register to control space |
0x02 | 0x01 | Set GO bit (execute waveform sequence) |