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.

drv2667 - internal waveform memory

Other Parts Discussed in Thread: DRV2667

can someone help me with the internal waveform memory of the drv2667. i

would like to save and play rectangular waveforms, ramps, etc..

however, the example from the datasheet shows only how to store the given frequencies in the internal memory. 

or is it not possible to store waveforms that are not sinusoidal?

ps: i dont wanna use the fifo, and analog in, because i have multiple drivers which should play the waveform at the same time or at different times, and the waveform is only started from the microcontroller

  • Hi, Andreas:

    there is a section of "DIRECT PLAYBACK FROM RAM" in data sheet.

    You can use this mode for your project.

    as each byte is programmable, it can support a large variety of waveforms.

    Important notice for this format:

    1) this mode data are played at 8kHz data rate

    2) Full scale : 0x7f; Middle Scale: 0x00; Negative Scale:0x80

    3) total RAM size is 7 pages : page 1 ~ page 7

  • thanks for your reply, but the answer was not so helpful at the moment.

    i know that this driver has a direct playback from 2kb ram, with "8" pages, 8khz datarate, and different modes.

    data rate and different modes were already tested with fifo mode.

    the problem now is only to know how to use the 2kb ram, because examples do not show how to build its own waveform, the given examples in the datasheet are only in mode 3 and not mode 2

    what i need to know is how to use this mode, are the next steps correct?
    1. take device out of standby mode 
    2. set gain ?
    3. end of sequence (no waveform id)

    change to page 1
    1. set header size (start upper & lower, stop upper & lower, repeat count)
    2. write my waveform from start to end into memory ???
        for example simple rectangle with no negative voltage 0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F 

    change to ctrl. space
    1. set go bit


      



  • Hi, Andreas:

    sorry for missing the point in my previous answer.

    I would like to seperate the use into three categories.

    1. Initializse

       1) wakeup device

       2) 1 ms delay maybe needed

       3) set gain

       4) change to page 1

       5) write header into page 1

           headersize, first waveform start, first waveform end, first waveform repeat count .......

           care must be taken for not exceeding the limit (waveform count should be no more than 51)

       6) change to page 2

       7) write waveform data into page 2

           for example : your rectangular waveform : 0x7f, 0x7f, 0x00, 0x00, 0x7f, 0x7f...

           care must be taken for write across page boundaries. The RAM location in 0xPFF is only writable with I2C multiple write protocols

       8) change to page 0

       9) suspend the device

     

    2. start output waveform

         1) wakeup device

         2) 1ms delay maybe needed

         3) set the waveforms indexes into the sequencer registers (0x03 ~ 0x0a)

             notice : the playback will automatically stop by ZERO index or end of sequence

         4) set GO bit to start the playback

     

    3. Stop the waveform playback

        1) clear the GO bit

        2) suspend the device

  • hey thanks, i think i got it.

    but a further question, waveforms which can be created now (seen in figures of the datasheet),

    will still be available after writing into the memory? so i cannot destroy the sinusoidal waveform?

  • Hi, Andreas:

    the on-chip RAM data except page 0 are randam. So there is no sinusoidal waveform in the RAM until we write into it.

    the sinusoidal waves in the data sheet is for demostration purpose, and not actualy embedded/integrated into the on-chip RAM..

  • Hi mr.Peter Li,
    we need your help. we want to generate the Envelope style or Amplitude modulated waveform with Carrier frequency or sinusoidal frequency of 2500Hz or 4000Hz ..with an envelope period of 25ms. and we want it to repeat continously for certain period of time. now we came to know that the waveform sequencer limits the output frequency max of 1992Hz (7.1825 x255) and envelope minimum ramp up + down = 64ms..so it wont much help full for us. now we want to use the internal memory.is there any userguide..and wave form value generator tool .and also please let us know,if this type of waveform can be generated or not. if possible kindly provide any psuedo code of I2C or any I2C library available..Thank u
  • Hi,

    we do have a tool to help on waveform generation:
    here is the link:
    www.ti.com/.../haptics-console

    please use RAM Manager -> DRV2667 to start the waveform design.
    also choose mode 2 for your waveforms.

    Thanks.
  • Hi,Thank you very much,,i will look in to it and get back for future clarifications.Thank u very much sir

  • Hi Mr.Peter,

    i have tried to use the RAM manager..unfortunatly i dont understand how to generate Amplitude modulated waveform of 2500Khz carrier + 50Hz modulating sine wave. i can see that software can generate sine waves of frequqncy with ramps..mostly looks like mode 3 functions,i was unable to generate AM signal or some custom pattern..please help me generate it.Thank u

  • Hi,

    sorry, I don't know how to generate this "2500KHz carrier + 50Hz modulating " sine wave.
  • Hi,

    is any one Else who knows how to generate an AM wave with 2500khz+50hz sine
    using RAM mode of drv2667

    Thanks

  • Hi,

    i found some way to manually generate the wavetable to generate the AM.but could please give me some code references which can help me figure out proper direct play procedure..and also is it possible to increase the sampling rate from 8Khz to higher rate..if it is fixed is there any similar part with higher sampling rate?please help me we are running out of time

    Thank u

  • Hi,

    the sample rate is fixed at 8KHz.

    for direct play, how many bytes is the wavetable?

    if we can save it into the DRV2667 internal memory, the play procedure is very simple.

    here is the play procedure for waveforms inside internal memory:

     register write (0x02, 0x00) //out of standby

     register write(0x03, xxx) // waveform index

     register write(0x04, 0x00) //end of sequencer

     register write(0x02, 0x01) //play

    if the wavetable is bigger and we cannot save it into DRV2667 internal memory, we need to use FIFO playback mode.

    play procedure for FIFO playback:

     register write (0x02, 0x00) //out of standby

    while( loop )

      register write (0x0b, data[x])

  • Hi thank you

    at present,the wave table is 20ms around 160bytes,.may be we may increase it to 100ms -around 800bytes. we may use repeat cycles. please provide us some code snippets to store data,and play the same again and again ..totally we may need to continously play for 30 min.so there will so many loopings using some externel timer ..

  • Hi,

    I would recommend to split this waveform into several smaller ones. the size of each one should be smaller than 255 bytes.
    we can use waveform sequencer and waveform loop to get 30 minutes vibration.

    about how to program the DRV2667 onchip RAM, there are examples in the data sheet.