Can Halp Pt. 1 - Hardware

coltonton
Posts: 2
Joined: Thu Apr 30, 2020 11:07 am

Can Halp Pt. 1 - Hardware

Postby coltonton » Thu Apr 30, 2020 11:36 am

Hello!

First of all I do apologize if this has been answered, and im sure it has been but "CAN" being a pretty commonly used aux Verb is apparently too much for this cite to handle, same goes with "CAN Bus" etc.

i have a couple problems I need sorted out, here though for part one all I have to ask is what pins are tied to the CAN controller? Ive seen a magnitude of things online from peoples "working" projects Ive seen GPIO 4 &5 (pin 24 & 34) just saw one thats GPIO 6 & 7 (28 & 27) and i've even seen people using TX & RX 0 for the transceiver... What pins are they, and it would be preferred to have Espresif documentation as a source, which I already tried to looked over.

I'm designing a PCB, and I'm building in both options for the internal CAN controller, and an external MCP2515, to 1.) have 2 busses and 2.) be able to have an option thats has some documentation and users who have actually used it and can find a pinout for *cough* MCP2515 *cough* I would prefer to use the internal with a transceiver but I'm just having trouble figuring it out. Before that one A comes around YES! i have read the documentation, about 3 times, and its not my first time working with CAN, but is the first time i've worked with it at this basic of a level but thats a question for another time. Usually I can go through code examples, and read stuff and semi figure it out, and start from there, but i am lost, I'm able to look through examples and understand whats going on but i cant put it into practice.... but again... another time... I'm thinking just going the MCP anyway now because there is info on it, plenty of documentation online should get me going, and I wont have to ask on a forum to only be told ReAd tHe DoCumEnTaTioN anD FolLoW The EXaMplEs. But it will be nice to have a second bus that has potential use for me down the road. :D So, whats the CAN BUS pins?

ESP_Sprite
Posts: 9599
Joined: Thu Nov 26, 2015 4:08 am

Re: Can Halp Pt. 1 - Hardware

Postby ESP_Sprite » Thu Apr 30, 2020 2:20 pm

The CAN peripheral is connected to the GPIO matrix. You're seeing this wide variation because you can connect the CAN transceiver to nearly any GPIO (as long as you don't connect an output signal to an input-only GPIO) and configure the ESP32 for that setup in software.

(Note that this goes for a lot of other peripheral pins as well. E.g. I2C also doesn't have a fixed set of pins. Some peripherals, like SPI, do have dedicated pins that give you a tad less latency, but can also use any other pin if you don't care about that.)

coltonton
Posts: 2
Joined: Thu Apr 30, 2020 11:07 am

Re: Can Halp Pt. 1 - Hardware

Postby coltonton » Thu Apr 30, 2020 4:20 pm

Doh.... I'm sorry, I just been all on hardware now, and never really checked the Setup code (Arduino) / payed attention to it, only what the code does... but I see it now... Thank you though for being a good fourms person. I know the newbies coming in asking the "obvious" questions gets tedious. <3 But this is my first time working with any of the ESP products!

Who is online

Users browsing this forum: No registered users and 141 guests