Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Is it possible to use CAN as an UART?

Status
Not open for further replies.

MrEd

Advanced Member level 4
Joined
Apr 26, 2001
Messages
108
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Location
the Singularity
Activity points
1,028
CAN as UART?

Hi,
I haven't worked with CAN at all and was wondering if anyone knows if CAN could somehow be setup to send data as an "ordinary" uart? Could I hook CAN up to a RS485 line and send data. Or is it possible to connect a 485 chip to a CAN pin (on a MCU) and send "ordinary" start bit, 8 bit data, stop bit data.

I'd like to be able to alternate between CAN and RS485 on the same pair of wires without sacrificing both the CAN interface and a uart.

Eddie
 

Re: CAN as UART?

Hi,

Due to Can protocol, It seen not possible for me to use the Can controller of a MCU as a UART controller.
The only way I saw a possibility is to control the IO by your software and to make a software UART controller.
Are your IO multiplexed between UART and Can controller ?

Not really efficient.e_DIB
 

CAN as UART?

If the frequence is the slow, U may try to simulate the CAN and UART by the GPIO of the MCU
 

Re: CAN as UART?

The CAN-bus works with differential signals, so it will not work the way you want it.

The question is, if you would like to use the same pin of the uC or use the same wires outside...

If you just want the same pins, you could put latches between the uart-controller and the can-controller, as both get standard logic signals.
But if you have a hardware uart and a hardware can then they will probably be on different io-pins and you can't reconfigure that.

If you want to use the same wire, you should probably take analog switches, so you can choose the active signal on the wire.

But both options will cost extra pins of the uC, no way out.

Just hooking up the signals will result in undefined reactions of the uart and the can-controller. Second you need to terminate your can-wires whereas your uart may not be terminated.

Hope I could help you.
 

Re: CAN as UART?

What you can do is to connect your CAN controller to a SPI driver. SPI is not that simple as UART, but it is certainly easier than CAN.
 

Re: CAN as UART?

CAN bus is hardware conflict processing. Hardware protocol is designed for multipoint connection and private for vehicle.
USART dont conflict because it's used for point to point.
RS-485 is designed for muiltipoint but it's software processor for conflict. Hardware is support for protected driver IC
 

CAN as UART?

if the CAN pins of your microcontroller can function as normal IO (dual functions), then it's easier to use this way and just program "software-based" UART
 

Re: CAN as UART?

Hi,

You can find lots more information on the micrchip web site app note:
**broken link removed**
Micrichip has also a demo board for the can bus, so you can use this as referance for your design:
**broken link removed**

Good luck.
 

Re: CAN as UART?

It is now a days normal for microcontrollers having CAN as well more than one UARTs to multiplex the I/O pins with these so, you may use CAN by enabling one mode at a time and UART by enabling the other mode. But this is not recommended at run time due to the various type of physical busses for CAN and UART.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top