Hello! I have a general question using SPI communication on this power sensor called the INA239. The way I configure the SPI communication is shown below:
/* INA239 captures data on falling edge & shifts out data on rising edge.
Therefore we need to use SPI_MODE1.
spi settings from the spi.h online (speedMax in hz, dataOrder, dataMode)
*/
SPISettings INA239_settings(10000000, MSBFIRST, SPI_MODE1);
I have configured the speedMax to be 10Mhz, but the datasheet for the sensor states 1Mhz. Do I need to change the speedMax to be equivalent to the speed mentioned in the datasheet or are these two things two different things?
The Teensy4.1 should be able to get up to 10MHz SPI frequency. Forget breadboard setups at that speed. If you use a breadboard set the frequency to 1MHz.
That seems to be the A/D clock speed.
Page 18: "SPI bit-speed up to 10 Mbit/s"
Max SPI frequency of an Uno is half of it's 16Mhz clock speed, or n/2 of that.
The Uno defaults to 4Mhz.
Don't know about the Teensy. You should be able to find that in the Teensy4.1 specs.
Leo..