Hello,
My name is Innocentio A. Loe, a newcomer to the forum.
I'm a student at Maranatha Christian University in Indonesia.
Currently, I'm working on a project which is using TPIC8101 as an engine knock detector.
I'm using MSP430G2553 for the microprocessor. The SPI transmission works just fine (I checked the SIMO and SCLK signals using oscilloscope).
I've tried to use the settings provided in the TPIC8101_Training PDF (7,3 kHz resonant frequency). I only change the INT/HOLD periods. At first I thought that my system works fine, since the output looks like this :
My problem is that the output signal doesn't change on those frequencies or other after I programmed the bandpass filter resonant frequency to e.g. 16 kHz (0x3F) or 1.22 kHz (0x00). I've also checked the output signal using ADC10 module, and found out that the max value (1024) is always at 7.3 kHz frequency, then goes down on lower or higher frequencies.
These are my SPI settings :
//Data is captured on first SCLK edge, changed on the following edge
//The inactive state is low
//SPI Master mode
//SPI Synchronous mode
//MSB is transmitted first
These are the codes I've used to program the TPIC8101 :
set_tpic(); //sets CS and INTHOLD pin low
spi(0x42); //sets the prescaler - 5 MHz clock, SDO active
reset_tpic(); //sets CS and INTHOLD pin high
delay_ms(50);
set_tpic();
spi(0xE0); //selects channel 1 as input
reset_tpic();
delay_ms(100);
set_tpic();
spi(0x2A); //sets the resonant frequency - 7.27KHz
reset_tpic();
delay_ms(100);
set_tpic();
spi(0x22); //sets the internal gain - 0.381
reset_tpic();
delay_ms(100);
set_tpic();
spi(0xCA); //sets the integration time - 100 uS
reset_tpic();
delay_ms(100);
while(1)
{
int_hold(1000,1500); //A function that that switches INT/HOLD pin states for a microsecond-based period
}
I would very much appreciate any help on this subject.
Best regards,
Innocentio A. Loe
MCU