i am trying to bit bang 14 bits grey code. my output is not steadyuint16_t readbits(uint16_t dataPin, uint16_t clockPin) { uint16_t value =0; for (int i = 0; i <14; ++i) { value <<= 1; HAL_GPIO_WritePin(GPIOC, clockPin, GPIO_PIN_RESET); delay_...
I made a test code in arduino to read SSI. How can I make the shiftin function work correctly in the stm32 controllers? . In the stm32cubeIDE I can't manage to make it work like in the arduino ide.In the shiftin function the variables: data_pin, cloc...
it worked ! i missed one falling edge, because ssi word starts when de clock goes low and then up. Than i need the 14 bit data burst.with your answer and Ozone i made the following function: it reads 4 pins at the same clockvoid CLK_and_reading(uint1...
yes that is a great option. Can i generate a kind of clock with it? and yes i agree to avoid HAL_ functions, this is blocking in code>? on internet i cant find a good example for doing this.the delay_us(); void delay_init (){ HAL_TIM_Base_Start(&htim...