This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV2605L: [DRV2605L] About the Waveform Library

Part Number: DRV2605L
Other Parts Discussed in Thread: DRV2605

When I saw the datasheet about Waveform sequencer, 

it described that when I set the bit 7 (Wait bit) for Waveform Sequencer, WAV_FRM_SEQ[6:0] bit will be interpreted as a wait time. It means that each sequence register can implement a delay between sequence waveforms. 

But when I used the DRV2605L sparkfun haptic motor driver library to adjust waveform function as below : 

void SFE_HMD_DRV2605L::Waveform(uint8_t seq, uint8_t wav) {

    writeDRV2605L(WAVESEQ1+seq,wav);

}

Then I made my own code to adjust the delay time... like this way :

SFE_HMD_DRV2605.Waveform(128,1);

SFE_HMD_DRV2605.Waveform(128,123);

SFE_HMD_DRV2605.go();

But it doesn't make any change between the sequence, and there is no change in vibration pattern. 

So, I just want to know the definition of delay time and how to change this. 

Also, if there is any reference to measure the signal of I2C communication between Arduino & DRV2605L by using oscilloscope, please let me know. 

  • Hi Kihun,

    I am not familiar with the sparkfun haptic motor driver library, but I can talk a bit about the delay function.

    the waveform sequencer allows up to 8 delays or waveforms to be fired in series. these delays and waveform instructions live in registers 0x04-0x0B.

    if bit 7 is "1" i.e. 0b1xxxxxxx then the value in bits[6:0] will be interpreted as a delay from 10 to 1270 ms. 

    if bit 7 is 0 i.e. 0b0xxxxxxx then the values in bits[6:0] will be interpreted as an address for a waveform from 1-123. more details can be found in 12.1.2 Waveform Library Effects List

    you can either read back the values in register 0x04 to 0x0b to ensure that it is properly programmed, or you can look at the I2C bus to see if the correct byte is being written

    Regards,

    Arthur