OK - I know this might be a wacky idea
I want a simple way to extend RS232 over longer distances - and I have spent days looking at a lot of different options canbus, spi, i2c , rs485 - whatever. I need simple communications (read slow - 10 kbit would be nice) over long distances (100m +) - but for various reasons, none of those is going to work for me - for example the MCP2515 canbus controller requires high speed SPI and my microcontroller cannot handle that.
So Microchip sells a nice chip - a CAN transceiver, handles 3.3v IO and has a 5v CAN bus lines - MCP2562 - it's pretty simple, has Vcc VDD, Tx & Rx (3.3v) and CANH and CANL (5v) and a pin that puts the chip into standby mode.
Since the main function of the chip is to take 3.3v Tx/Rx signals and convert them into CAN signals out on the bus, why couldnt I send my 3.3v microcontroller RS232 signals to/from this chip down a properly terminated canbus and to another MCP2562 where I have another microcontroller read the resulting 3.3v signals coming off the transceiver there ?
(Assume all I want to do is Tx to one single micrcontroller for now)
Is there any way this would work ?
And is the following 'feature' of the chip going to be a problem ? I don't quite understand how long the chip will wait to decide a PDD condition exists ? i.e. say I put the chip into standby - I dont want to do anything for a while, now I have a message I want to Tx, I take the chip off standby, how long do I have to begin Tx'ing and what should I keep the Tx pin voltage level at while I wait (0v or 3.3v ?)
MCP2562 datasheet attached
I want a simple way to extend RS232 over longer distances - and I have spent days looking at a lot of different options canbus, spi, i2c , rs485 - whatever. I need simple communications (read slow - 10 kbit would be nice) over long distances (100m +) - but for various reasons, none of those is going to work for me - for example the MCP2515 canbus controller requires high speed SPI and my microcontroller cannot handle that.
So Microchip sells a nice chip - a CAN transceiver, handles 3.3v IO and has a 5v CAN bus lines - MCP2562 - it's pretty simple, has Vcc VDD, Tx & Rx (3.3v) and CANH and CANL (5v) and a pin that puts the chip into standby mode.
Since the main function of the chip is to take 3.3v Tx/Rx signals and convert them into CAN signals out on the bus, why couldnt I send my 3.3v microcontroller RS232 signals to/from this chip down a properly terminated canbus and to another MCP2562 where I have another microcontroller read the resulting 3.3v signals coming off the transceiver there ?
(Assume all I want to do is Tx to one single micrcontroller for now)
Is there any way this would work ?
And is the following 'feature' of the chip going to be a problem ? I don't quite understand how long the chip will wait to decide a PDD condition exists ? i.e. say I put the chip into standby - I dont want to do anything for a while, now I have a message I want to Tx, I take the chip off standby, how long do I have to begin Tx'ing and what should I keep the Tx pin voltage level at while I wait (0v or 3.3v ?)
MCP2562 datasheet attached
1.5 Permanent Dominant Detection
The MCP2561/2 device prevents two conditions:
• Permanent dominant condition on T
XD
• Permanent dominant condition on the bus
In Normal mode, if the MCP2561/2 detects an
extended Low state on the T
XD input, it will disable the
CANH and CANL output drivers in order to prevent the
corruption of data on the CAN bus. The drivers will
remain disabled until T
XD goes High.
In Standby mode, if the MCP2561/2 detects an
extended dominant condition on the bus, it will set the
R
XD pin to Recessive state. This allows the attached
controller to go to Low-Power mode until the dominant
issue is corrected. R
XD is latched High until a
Recessive state is detected on the bus, and the
wake-up function is enabled again.
Both conditions have a time-out of 1.25 ms (typical).
This implies a maximum bit time of 69.44 μs
(14.4 kHz), allowing up to 18 consecutive dominant bits
on the bus.
Attachments
-
659.3 KB Views: 16