SPI.setClockDivider(divider)

jano2358
Posts: 8
Joined: Mon Jul 02, 2018 12:03 pm

SPI.setClockDivider(divider)

Postby jano2358 » Fri Sep 21, 2018 11:42 am

hi!

Im using the ESP32-Wrover-Kit with the Adafruit screen library and a ADS1220 ADC, the library to this one was made by Protocentral. Connecting the ADS in the same SPI port than the screen and using another pin on CS this works well (because I will need the other pins for other parts of the project).
The ADC clock can go up 8MHz (and still works) and if I leave the frequency set of the function Adafruit_ILI9341.begin() empty it can go up to 40MHz.
I would like to switch this two on demand but when I select with SPI.setClockDivider(SPI_CLOCK_DIV2) I get 8MHz and I can't go further, If instead of SPI_CLOCK_DIV2 (4, 8, 16, 32) I use a number, I don't have a clock on the output after this command.
How can I select a higher frequency for the clock?

Who is online

Users browsing this forum: No registered users and 61 guests