ZHCSEY6E March 2013 – January 2023 DRV2667
PRODUCTION DATA
The following programming example shows how to initialize the device and send a simple Mode 3 (Waveform Synthesis Playback mode) transaction. If the number of cycles is short (< 10), the effect is a click, and if the number of cycles is long (> 10) the effect is a buzz alert.
I2C ADDRESS | I2C DATA | DESCRIPTION |
---|---|---|
Control | ||
0x02 | 0x00 | Take device out of standby mode |
0x01 | 0x00 | Set to lowest gain, 50 VPP maximum |
0x03 | 0x01 | Set sequencer to play waveform ID #1 |
0x04 | 0x00 | End of sequence |
Header | ||
0xFF | 0x01 | Set memory to page 1 |
0x00 | 0x05 | Header size –1 |
0x01 | 0x80 | Start address upper byte, also indicates Mode 3 |
0x02 | 0x06 | Start address lower byte |
0x03 | 0x00 | Stop address upper byte |
0x04 | 0x09 | Stop address lower byte |
0x05 | 0x01 | Repeat count, play waveform once |
Data | ||
0x06 | 0xFF | Amplitude for waveform ID #1, full-scale, 50 VPP at gain = 0 |
0x07 | 0x19 | Frequency for waveform ID #1, 195 Hz |
0x08 | 0x05 | Duration for waveform ID #1, play 5 cycles |
0x09 | 0x00 | Envelope for waveform ID #1, ramp up = no envelope, ramp down = no envelope |
Control | ||
0xFF | 0x00 | Set page register to control space |
0x02 | 0x01 | Set GO bit (execute waveform sequence) |