RS-232 based CAN interface for VSCP.
PCB's and ready made and programmed modules are available at http://www.eurosource.se/catalog
Current Harware Version Through Hole: 0.0.3 Current Harware Version SMD: 0.0.1 Current Firmware version: 0.0.1
Got to http://www.grodansparadis.com for up to date info
This is a very simple interface module for use between a computers RS-232 interface and the VSCP CAN bus. The module is only capable of interfacing the VSCP network and is hardwired for its speed and other VSCP specific parameters. This is because we want to keep the cost for the module as low as possible. If you are looking for a more all-round CAN adapter please look at our sponsors page which lists several companies that make good an reliable devices for general use.
The module comes with a serial boot loader installed which makes it very easy to update the software in the module when the need occurs.
Serial interface: Baudrate fixed at 57600. To use another baudrate a recompile of the firmware is needed. Eight databits. No parity and one stopbit is used.
CAN interface: The interface is fixed at 125 kbps. To use another bus speed a recompile of the firmware is needed. Standard and extended identifiers and Remote frames are supported.
The can4vscpdrv.dll CANAL driver (described here) is included in version 0.1.5 and higher of VSCP and friends package. Before this version is released it is also available at the download section for this module. The driver exports a CANAL interface and can be used directly or from any CANAL enabled software.
The first parameter (1) is the serial port to use (1=COM1, 2=COM2 and so on) and the second parameter is the baudrate for the serial interface. As noted above the baudrate is fixed at 57600 at the moment so the second parameter is actually not used at the moment.
To use the adapter with the VSCP-daemon/CanalWorks you edit the appropriate configuration file. Under Windows you find the file at
/winnt/system32/vscp.conf (for the daemon/service) /winnt/system32/canalworks.conf (for CanalWorks)
and on Linux/Unix
/etc/vscp.conf (for the daemon/service) /etc/canalworks.conf (for CanalWorks)
Edit the (add) the the device section in this file
devicen = can4vscpdrv,"1;57600" ,D:\WINNT\system32\can4vscpdrv.dll,64,64,0
where n is a unique device index (a number below 256) in the list of devices.
In CanalWorks the above configuration can be done also through the device add/edit/delete interface.
The serial signals of the DIN module have this position:
| TX | RX |
|---|---|
| DTR | GND |
Attach the appropriate wires of your RS-232 cable to the correct positions.
The CAN cable can be connected according to this table:
| CANH | CANL |
|---|---|
| 9-16VDC | GND |
Updating the firmware is done through the serial bootloader which is installed by default. This bootloader works at 19200 baud. Use the following process to update the code in the module.
Note 1 that there is no risk with this process as you never can overwrite the bootoader itself. If something goes wrong you can always repeat the process.
Note 2 that if you write or modify the firmware it should be relocated to a position just above the bootloader.
Discussion