PDA

View Full Version : Adding both CAN and ethernet to a PIC



rasen58
- 26th February 2016, 21:57
Hi, I'm pretty new to microcontrollers, but for a project, I need one microcontroller that can send back data to a server over ethernet while also being able to communicate with multiple other microcontrollers that are controlling their own subunits and which can send sensor or status info back to this ethernet controller.
We're using CAN for the microcontroller communication, and it looks like this one has CAN built in http://ww1.microchip.com/downloads/en/DeviceDoc/39977f.pdf

But as I said, I need it to also have ethernet and it looks like this one has ethernet built in http://ww1.microchip.com/downloads/en/DeviceDoc/39762f.pdf

But I couldn't find any that have both built in, so I was thinking about buying one of the above and then adding the other technology to it. It seems that it would be easier to add ethernet to the existing CAN controller, but I'm still not sure how I would go about doing that.
It seems like the lantronix xport would be a good choice to do this (?), but I'm pretty new to this so I'm not sure.
For the xport, I just have to make it communicate to the PIC controller over serial right?

How feasible do you think adding on the xport to the CAN built in controller would be?

HenrikOlsson
- 27th February 2016, 07:16
Hi,
If PBP is your language, which I suppose it is since you're posting here, then definitely do the Ethernet connectivity with an external module. Doing the UDP and TCP/IP stack(s) in PBP is a major undertaking and very large project in itself. It has been done but I do not know the state of it.

CAN you can do with an integrated peripheral (though PBP doesn't have any high level commands for using it) or you can use your favourite PIC and attach an external CAN controller/tranceiver as well.

Adding an XPort to a PIC with a CAN peripheral, toally feasible.

/Henrik.

Dave
- 28th February 2016, 13:25
Rasen58, I use the XPORT devices for all of my Ethernet connected projests and have never had any problems with them. They are a good choice...