I am going to do the lottery tonight :) - 5 mins in and I have read AX5043 register values - so the journey starts....
Is it possible that you tested the boards you sent me with some other software?
See image and code below
- Code:
// ***********************************************************************************************
// Name: SPI_readRegs_003
// Date: 10 May 2022
// Brief: Crude SPI test - read write
// Author: Jonathan Askey
// ***********************************************************************************************
/* SPI connections
* Uno/Nano AX5043
* MOSI 11 17
* MISO 12 16
* SCK 13 15
* SS 10 14
* 3.3v 23
* GND 6
*/
#include <SPI.h>
uint8_t slaveSelectPin=10; // CS Chip Select
uint8_t regAddr;
uint8_t regVal;
void setup() {
digitalWrite(slaveSelectPin, HIGH);
pinMode(slaveSelectPin, OUTPUT); // set the SS pin as an output
SPI.begin(); // initialize the SPI library
SPI.beginTransaction(SPISettings(14000000, MSBFIRST, SPI_MODE0));
Serial.begin(9600);
}
void loop() {
digitalWrite(10, LOW); // set the SS pin to LOW
for (uint8_t regAddr = 1; regAddr <= 0x0F; regAddr++)
{
SPI.transfer(regAddr & 0x7F); // send address + r/w bit
regVal = SPI.transfer(0);
Serial.print(regAddr, HEX);
Serial.print(" - ");
Serial.print(regVal,HEX);
Serial.print(" - ");
Serial.println(regVal,BIN);
}
digitalWrite(10, HIGH); // set the SS pin HIGH
}
Regards
Jonathan _._
Tue Oct 29, 2024 4:46 pm by tsenecal
» RC Drift Gyro for pitch control
Sun Oct 20, 2024 2:04 pm by geofrancis
» WW2 mini sub build
Thu Oct 17, 2024 2:34 pm by geofrancis
» sonar data link
Mon Oct 14, 2024 4:31 pm by geofrancis
» Robbe Seawolf V2
Sat Oct 12, 2024 3:52 pm by geofrancis
» ExpressLRS - 868/915 Mhz equipment
Fri Oct 11, 2024 8:58 pm by Marylandradiosailor
» Flight controllers as sub levelers
Fri Oct 11, 2024 8:14 pm by geofrancis
» 868/915 Mhz as a viable frequency for submarines.
Thu Oct 10, 2024 3:21 am by tsenecal
» Microgyro pitch controller corrosion
Wed Oct 02, 2024 11:32 am by geofrancis