To write data to the RAM:
Write(0x31,0x40)) //sets HptRamEn to enable haptic RAM programming mode
Write(0x28,0x00) //Write the RAM address for sample 0.
Write(0x29,DAT0) //Write MSB of haptic pattern
Write(0x2A,DAT1) //Write middle byte of haptic pattern
Write(0x2B,DAT2) //Write LSB of haptic pattern
*Repeat steps 2-5 to write the consecutive data word.
To read data from the RAM:
Write(0x33,0x00) // To start a haptic pattern that is stored in RAM, the sample 0 address of the pattern must be
written to HptPatRAMAddr (register 0x33) before triggering a vibration
Read(0x28,0x00) //Read the RAM address for sample 0.
Read(0x29,DAT0) //Read MSB of haptic pattern
Read(0x2A,DAT1) //Read middle byte of haptic pattern
Read(0x2B,DAT2) //Read LSB of haptic pattern