Search found 3 matches

by Pierre83
Wed Oct 18, 2023 2:53 pm
Forum: ESP32 Arduino
Topic: SPI transferBits(*data, *out, bits) sending strange
Replies: 4
Views: 4378

Re: SPI transferBits(*data, *out, bits) sending strange

Thanks for your answer !

I'm using a Lolin32 Lite clone, may be it's concerned by the content of your answer ?

I'll try with another model of clone :( and tell you if this is the same situation !

Pierre
by Pierre83
Tue Oct 17, 2023 10:44 am
Forum: ESP32 Arduino
Topic: SPI transferBits(*data, *out, bits) sending strange
Replies: 4
Views: 4378

Re: SPI transferBits(*data, *out, bits) sending strange

Hello, It seems that nobody uses is function ????????? It could be usefull when using SPI devices which doesn't use 8bits dialog !!!!!!!!!!! For me, i'm using an MCP3008 ( 10 bits ADC SPI ), and this device could use only 17bits instead of 24 to dialog with it's MCU and using this method could lead ...
by Pierre83
Thu Oct 12, 2023 4:17 pm
Forum: ESP32 Arduino
Topic: SPI transferBits(*data, *out, bits) sending strange
Replies: 4
Views: 4378

SPI transferBits(*data, *out, bits) sending strange

Hello, This code: uint16_t readSPI(uint8_t first, uint16_t last) { CS_LOW_inline(); uint32_t ret = 0; uint32_t *out = &ret; uint32_t data = first << 16; data |= last; SPI.transferBits( data, out, 17); // here is the problem CS_HIGH_inline(); return ret & 0x0FFF; } does not return bits from 16-0 but ...