I am trying to control 3 SPI slaves from one SPI connection using the Arduino add-on for ESP32.
I can see that the 'standard' SPI is using CS0 but it is not clear to me how to set CS1 and CS2 and how to switch between them.
The ESP32 docs talk about spi_bus_add_device( ), but the Arduino esp32_hal_spi files do not call that method.
Any advice on this would be welcome.
How to work with 3 SPI slaves in Arduino ESP32 add-on
-
- Posts: 23
- Joined: Wed Dec 09, 2015 8:11 pm
Re: How to work with 3 SPI slaves in Arduino ESP32 add-on
see https://www.mikronauts.com/raspberry-pi ... and-howto/
I used a 74HC138N to generate eight chip selects from three digital output.
use CS0 as /EN, use three gpio's for the channel select inputs.
I used a 74HC138N to generate eight chip selects from three digital output.
use CS0 as /EN, use three gpio's for the channel select inputs.
drmpf321 wrote: ↑Fri Sep 27, 2019 9:07 amI am trying to control 3 SPI slaves from one SPI connection using the Arduino add-on for ESP32.
I can see that the 'standard' SPI is using CS0 but it is not clear to me how to set CS1 and CS2 and how to switch between them.
The ESP32 docs talk about spi_bus_add_device( ), but the Arduino esp32_hal_spi files do not call that method.
Any advice on this would be welcome.
Re: How to work with 3 SPI slaves in Arduino ESP32 add-on
Thanks for the tip.
I have enough pins for the extra CS.
The ESP32 docs says you can specify 3 CS pins for one SPI channel and then just use 'handles' to preform SPI on each device.
It is not clear how to do this in the ESP32 Arduino addon which does not use SPI handles.
I have enough pins for the extra CS.
The ESP32 docs says you can specify 3 CS pins for one SPI channel and then just use 'handles' to preform SPI on each device.
It is not clear how to do this in the ESP32 Arduino addon which does not use SPI handles.
Who is online
Users browsing this forum: No registered users and 86 guests