CAN4VSCP-RS232

Back to VSCP Modules

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

Download

Got to http://www.grodansparadis.com for up to date info :!:

Firmware

Version 0.0.1

Schematics

Through Hole version

SMD version

Software

version 0.0.1

About

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.

Description

Parameters for the module

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 Canal Driver

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.

cw_setup.jpg

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.

Module connection

Serial connection (RS-232)

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.

CAN connection

The CAN cable can be connected according to this table:

CANH CANL
9-16VDC GND

Firmware updating

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.

  1. Get the uploader.exe file from the download section of this site or from http://www.philpem.dsl.pipex.com/
  2. Make sure no other programs uses the module or the serial port.
  3. Start the uploader program.
  4. Set the bootloader speed to 19200 baud and the com port to the serial port the module is connected to.
  5. Select the hex firmware file you want to load.
  6. Click the upload button. Now turn the power off and then on again on the can4vscp module. The upload process should begin. If not try this step several times.

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.

modules/can4vscp.txt · Last modified: 2011/12/01 14:37 by admin
Public Domain
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0