Search found 7 matches

by kgschlosser
Tue Jan 30, 2024 1:33 am
Forum: ESP-IDF
Topic: simple spi with multiple devices
Replies: 10
Views: 9641

Re: simple spi with multiple devices

As the thread title states... "simple spi with multiple devices." The key words in that being SIMPLE So perhaps you need to go back to school and learn how to read instead of incorrectly criticizing my answer and as far as your bench test is concerned. maybe using different hardware instead of somet...
by kgschlosser
Mon Jan 29, 2024 10:43 pm
Forum: ESP-IDF
Topic: Questions/issues with the esp_lcd component
Replies: 1
Views: 578

Questions/issues with the esp_lcd component

Let me give you some background as to what I am trying to do. I am currently working on creating LCD drivers for MicroPython. I have decided that the best way to go about doing this is to have what I am calling "bus" drivers written in C code and actual display drivers written in Python. Since many ...
by kgschlosser
Wed Oct 20, 2021 2:07 am
Forum: ESP-IDF
Topic: simple spi with multiple devices
Replies: 10
Views: 9641

Re: simple spi with multiple devices

and yes you can use an SD card reader and also the CAN interface on the same bus. You are going to have to have a cable select pin set up for each device and when you want that device to listen you turn off the select pin for that device. When finished turn it back on. errr I think it's off is selec...
by kgschlosser
Wed Oct 20, 2021 2:04 am
Forum: ESP-IDF
Topic: simple spi with multiple devices
Replies: 10
Views: 9641

Re: simple spi with multiple devices

dmaxben wrote:
Mon Oct 18, 2021 11:16 pm
My application requires two separate CAN busses. The ESP32 only has one CAN controller built in, thats why my design also has an MCP2515.
well that would make sense.
by kgschlosser
Sun Oct 17, 2021 4:25 am
Forum: ESP-IDF
Topic: simple spi with multiple devices
Replies: 10
Views: 9641

Re: simple spi with multiple devices

Im curious about this too. Id like to use an SD card and an MCP2515 CAN controller on the same SPI bus...hopefully its possible...? why are you using an SPI can interface when there is a can interface built into the ESP32?? Look up TWAI in the esp-idf documentation. You need a transceiver like the ...
by kgschlosser
Thu Oct 14, 2021 12:44 am
Forum: Sample Code
Topic: CAN bit timing calculator
Replies: 1
Views: 31705

Re: CAN bit timing calculator

here is an updated version of the code above. I had incorrect values being returned on occasion and it was because of how the compiler was handling setting a structure to an array. I tried using memcpy and had the same results. So instead of filling a structure and then placing it into the array I h...
by kgschlosser
Mon Oct 11, 2021 1:54 pm
Forum: Sample Code
Topic: CAN bit timing calculator
Replies: 1
Views: 31705

CAN bit timing calculator

I am sure there are some of you that will find this code extremely helpful. It calculates the closest match for any bitrate supplied to it. There are adjustments to control the number of returned results. read the comments in the code. It is exceedingly quick and has a small memory footprint for wha...