Charon I - Converter FW

Digital inputs/outputs + RS-232 (TTL)

Default loaded FW for easy-to-use serial port and 8x I/O pins to the TCP/IP and UDP/IP protocols, support for NVT control according to RFC2217. It has 8 digital Input/Output pins and an RS-232 serial line, which can be accessed via a computer network. Two modules on one network can enable a virtual connection between the two interfaces, using the ethernet network.

Charon I with the Converter FW is the ideal embedded tool if you require digital outputs, or need to read digital inputs on your server. Additionally, you can read any data from your RS-232 line, for example data from a bar code reader, display, etc.

The product can not only be a TCP server, but also can act like a TCP client. This means, when your digital input value changes, IO Controller connects to the server via TCP/IP and sends a 7-byte information packet about the input change.

For easier implementation of the IO Controller into your system, we have created routines for MS Visual Basic, Delphi, Borland C++, JAVA, PHP and others..

Regarding RS-232, the product is fully compatible with the HW Virtual Serial Port, which means you can use it with any RS-232 software for Windows 2000 or higher.

 

 

Features

  • Very fast implementation into your system, no programming required, just setting of the paramethers.
  • Serial RS-232 line (RxD, TxD, CTS, RTS) - adjustable communication speed 300..115.200 Bd with HW or SW handshake.
  • Ethernet Network - RJ45 (10BASE-T - IEEE 802.3)
  • One 8. bit port has shared Inputs and outputs. You can specify whis pins are transmitted as Inputs by the Triggering range.
    The output is Open Colector - pull up type = when you want to use it like input, you have to write log. 1 (H) to this pin.
  • Network modes :
    • UDP - just RS-232 data transfer
    • TCP/IP Server - PC connects to the I/O Controller, reads inputs, sets outputs, or sends data through RS-232 and disconnects.
    • TCP/IP Client/Server - Same as the "Server" mode, but if there is a longer than 10ms change on inputs, I/O Controller opens a server connection and reports input change via the NVT.
  • Outputs are controlled over the standard NVT protocol (Network Virtual Terminal).
  • MS Visual Basic, Delphi, Borland C++, JAVA, PHP and other routine libraries.
  • Basic security through the predefined IP address range, or you can use the 128-bit TEA coding algorithm.

 

Specifications

 

Digital TTL I/O Pins  
+ Output type 8 bit (8051 P1 port) TTL port
+ Input Parameters Input Low Voltage - 0.5 .. + 0,9 [V]
Input High Voltage + 3.5V .. + 5,5 [V]
+ Output Parameters Output Low Voltage max 1.0 V / 3,5 mA,
Output Low Voltage max 5 V / 0,05 mA
+ Power up init value Power up init value is on the output up to 1ms after power-up
+ Inputs Sampling period 10 ms
+ SW control digital outputs are controlled over NVT protocol through TCP/IP
 
Serial port  
+ Data bits 7 or 8
+ Stop bits 1 or 2
+ Parity None / Odd / Even / Mark / Space
+ Baud rates 50 .. 115.2 kBd - whole range, step = 50 Bd
+ Data flow control XON/XOFF, CTS/RTS, None
+ Interface RxD,TxD,RTS,CTS,GND module pins
 
Ethernet port  
+ Interface RJ45 (10BASE-T) - external signal transformer required
+ Compatibility Ethernet: Version 2.0/IEEE 802.3
+ Supported protocols IP: ARP, TCP + NVT (Network Virtual Terminal)
+ TCP connection closing Data - timeout 50s  (with support of NVT - ACK/NOP)
 
Environmental conditions  
+ Operating temperature -5 .. +70 °C
+ Storage temperature -20 to 85 °C
+ Humidity (non-condensing) 5 to 95 %
 
Physical parameters  
+ Power supply requirements 5V / Typically 60 mA DC
 
Functional parameters  
Device SETUP configuration possibilities  - RS-232 Setup over any RS-232 terminal
 - TCP/IP Setup over any Telnet or TCP Client terminal
 - UDP Config - only basic network paramethers with using the Hercules SETUP utility
LED diagnostic LINK led indicate LINK & Activity.
 

The I/O pins interfacing

P1 - 8 I/O pins
Normally, there is one 8. bit I/O port shared for the inputs and outputs. The P1 is a standard I/O port with open collector and 50k pull-up resistor. If the pin is set to 1, it should be used as an input pin.

More than 8 I/O pins
If you need 8 separated digital inputs and 8 outputs, you can use our special firmware and multiply the inputs/outputs with SHIFT registers (74595 and 74165 for example). You can see scheme of the SHIFT registers connection on the Charon I & II Development Board. This way you can connect up to 64 digital inputs or outputs, controlled via TCP/IP over the NVT protocol. TCP connection by an input change can only be initiated by the lowest 8 bits. Other bit's state can only be detected by an NVT question from the opposite side. If you are interested and you need this FW, please contact us...

 

Charon I Development Kit - First steps

Quick introduction to the Charon I application module with “Ethernet – RS-232/485 converter” firmware. This chapter describes how to connect the module to the Ethernet and debug your first application in several minutes.

 

Getting started with the Charon I module

You can use any serial terminal or TELNET program for setting up the module. However, we recommend downloading the „Ethernet Converter SETUP“ software from this location.

You can also use a HyperTerminal, but because of some problems, we don’t recommend this. It’s better to use Tera Term Pro, which you can use as a RS-232 link terminal and for Telnet relation too. .

Insert the Charon I module into the development kit Charon I DK as described on the board.

Power supply

The development kit is powered by DC 9-15V, 150mA using the standard 2.1 coaxial power connector. The shielding is connected to GND, as you can see on the picture.

Connecting the RS232 and Ethernet

Use a direct (prolonging) serial cable with Cannon 9 Connectors. If there is no free Cannon9 serial port, you have to use some 9/25 reduction.

The pin wiring on the Charon I DK board is in the table. The second table describes the PC serial port wiring.

 

Note: Newer Charon I DK versions are supplied also with a Cannon 9 MALE. Here you must use the included Lap Link cable. The Development Kit serial port has the same wiring as a PC.


The Ethernet connection

HUB, Switch, Bridge : Direct TP cable (called PATCH cable)
PC or any other device: Twisted cable (The connectors have different wire colours and switched TX and RX wires.)

How to set up the kit and SW?

Check out, if the following jumpers are set as written bellow before connecting power:

  • PSEN jumper – Disconnected
  • LED ENABLE jumper – Connected
  • SETUP (T0) – Connected
  • INT0 – any position

Run the terminal program (for example Tera Term) with the port parameters: 9600Bd, no parity, 8 data bits, a 1 stop bit (9600 8N1). Switch the HW (RTS/CTS) or SW (XON/XOFF) control off (Flow : NONE).

You can use our „Hercules Setup Utility“ too (use the “Serial” tab and in the port parameters choose “SETUP mode”).

 

Connecting the power supply

Connect the power supply connector – The green LED is lit. In the opened serial terminal, there must be the first page of DK’s setup displayed. Press enter to end the commands listing, and to display the „WEB51>“ command line.
The displayed list shows you a letter in front of each setup command, which you have to use for changing the right parameter. For example, if you would like to change the IP address, just write „I192.168.6.15“ to the command line and press <enter>. If you just press the Enter key, the whole list is displayed once more. After pressing Enter, the value is stored into EEPROM immediately, there is noo need to save configuration.

Notes :

  • HELP Type ? behind the command for help. „I?“z or „&B?“z
  • The backspace will work, if the terminal is set up well.
  • All the setup parameters are described in our green starting guide “RS-232 Ethernet Converter”, which you can download from www.Hwgroup.cz as a PDF document. The datasheet has no information about the serial terminal, because of the information is only for this type of firmware. There is also a Final application (SNMP I/O thermometer and Web51 Home Control with HTML page controlling).

If you have set at least the basic parameters (such as IP, MASK, Gateway and serial port speed), disconnect the SETUP jumper on the development board and reset by pushing the on board button or typing “R: Reboot” in the Terminal Setup.

Working with network

If you have everything connected and set properly, the module will not respond to the serial link terminal, but there will be a response to PING at the set IP address.

Run some TELNET application, which is connected to the IP address and port. You can also use our „Hercules Setup Utility“ - the TCP tab (do not forget to set the port, 23 is a default value) as a TELNET client.

If the TELNET application connects properly, everything written to the telnet relation is sent to the serial port and everything written to the RS232 serial port is sent to the telnet.

  • If you are not sending any data, the module ends the connection automatically after 50 sec.
  • If there is the OUT IP address set up in the module, the module tries to send incoming data from RS 232 serial port to this address as a client. If you are using a server running under Windows, use port 1024 or higher.
  • In the passive mode, the data are stored to the internal buffer, which you can read after Telnet connection is established, if you don’t use the “E: Erase buffer ” command, or if you don’t erase the buffer on connection.
 

Network Virtual Terminal

Before using the NVT, please make sure that you have ENABLED the Network Virtual Terminal. If the NVT is not active, all the NVT commands are ignored and sent to serial port as data!

NVT can be enabled:

  • in the RS-232 Setup using the “V1” command
  • in the TCP Setup using the “V1” command
  • In the UDP Config wit checking the checkbox, you can see on the picture.

 

With the NVT enabled, you can control the whole module using almost all standard RFC2217 NVT commands. (Changing the baud rate, setting up the 9th bit through TCP/IP connection and so on). You can also directly control the I/O pins P1.0-P1.7.

With NVT enabled, a new SETUP (RS-232 and TCP/IP) menu appears. There you can set for example the starting value of the I/O port after reset using a “#A” command. (Note: The LED is lit only if there is log 0 on the output pin and LED ENABLE jumper is connected).

Run SETUP mode, set “V1” a “#A254” and RESET the kit. Because of decimal value 254, only one LED, connected to P1.0 will be lit.

Are You There

Open a RAW connection with the module’s IP address and NVT support (for example using a Putty program, or our „Ethernet Converter SETUP“), and send a double byte sequence „FF F6“ hex. Use ALT+T in TeraTerm program (menu “Control” > “Are You There”). The Charon module will respond with “<WEB51 HW 6.0 SW 2.4 SN 00954C #01>”. This is a standard device response, which can be controlled via NVT. There are last 3 bytes of module’s MAC address are displayed after the “SN” letters. The MAC address is used to identify the module.

Direct I/O pins Control (LED diodes)

Write the “FF FA 2C 33 AA F0 FF” sequence to the opened raw TCP/IP connection. The P1 port value will be set to the AAh value. If the sequence is displayed in the RS232 serial terminal (so the data from TCP/IP went through the module to the serial port) you are not using the raw mode.

The LEDs can be controlled from Test mode tab in our „Ethernet Converter SETUP“ as shown on the previous picture.

 

 

 

 

Virtual serial port (VSP)

The Virtual serial port driver for Windows is a software tool, which adds a virtual Comm port to your Windows OS (COM5 for example) and all the data from this port are re-directed to the other TCP/IP.The Virtual Serial Port is mostly used for connecting some RS-232 serial device though the USB or Ethernet. HW Virtual Serial Port is free TCP/IP Windows virtual serial port.

It's designed for Windows 2000 and XP. The virtual driver should work as a Client or Server. In the Server mode it closes the connection if there is inactivity through serial port (great for the GPRS applications for example, where you have to pay for every kb).

  • It's a functional, unlimited Virtual Serial Port driver for any TCP/IP device free of charge!
  • Works on Windows 2000, XP
  • This version doesn't work with Win NT 4.0.
  • If your device supports RFC 2217 (NVT) you can use the remote serial port control (change the baudrate, parity, stop bits..)
  • This driver works as the "TCP client" - typical usage, but it can be used as the "TCP server".
  • Problems can be easy debuged with using comunication record to the LOG file.
  • You can create more Virtual Serial Ports on one computer (COM5, COM6, COM7 for example) with running the VSP.EXE from the command line with parameters.
  • It can startup with the Windows and hide from the taskbar.
  • It's FREEWARE you can use and share this software free without any limitations! We'll be pleasured if you put our icon to your webpage.

 

Device functions listing

This is short listing only,you can find the detail function description in the printed version of the manual for the Charon I module.
Basic network functions
I: Address Assign IP address
J: Port Assign incomming IP port
M: Mask Define local network mask
G: Gateway Define local network GateWay
 
IP Address access restrictions
W: Address Define IP address value to enable device's access
N: Mask Define IP address mask to enable device's access
 
Client or Client/Server mode settings
S: Send to IP Define opposite IP address when device opening TCP connection as the TCP Client.
U: Port Define opposite IP incomming port
 
IP comunication settings
T: IP mode TCP / UDP mode
V: Network Virtual Terminal On / Off - NVT support (RFC854, NVT description)
K: Keep connection On / Off - When On and NVT=On sending every 8 seconds NVT NOP command to the TCP connection = timeout prolongation
E: Erase buffer on Erase serial port incoming buffer when: NONE / Close TCP/IP connection / Open TCP/IP connection / Open & Close TCP/IP connection
 
Serial port parameters
&B: Speed Serial port baudrate 300 .. 115.200 Bd - step 50 Bd
&D: Data bits 7 / 8 bits in one serial port frame
&P: Parity None / Odd / Even / Mark / Space
&V: Variable parity On / Off - 9. bit synchronous transmition support
&S: Stop bits 1 / 2
&C: Flow Control NONE / RTS/CTS / Xon/Xoff
&R: RS485/RS422 control RTS = High [+8V] / RTS = Low [-8V]
TxRTS HW echo ON / TxRTS HW echo OFF - for RS-485 mode
&T: Serial Line Timeout

0 = Auto / 1..254 chars
Define max. intercharacter gap for Serial -> TCP/IP packetiser

&G: Char. Transmit Delay 0 = none / 1..254 ms - Insert intercharacter delay to the TCP/IP -> Serial (serial port outgoing data stream).
&H: Tx Control FULL duplex / HALF duplex - (recommended for the RS-485)
&M: Serial buffer size Medium Rx / Medium Tx = (50% / 50% of infernal buffer size)
Low Rx / High Tx = (30% / 70% of infernal buffer size)
High Rx / Low Tx = (70% / 30% of infernal buffer size)
&O: Buffer SpaceCompresion Off / On / Transparent (internal compres space characters only)
 
Security parameters
%A: TCP autorisation On / Off - it's with every openning TCP connection
%K: TEA key Set 16 bytes of the TEA key ( key = TEA "pasword" )
%S: TCP/IP setup Off / On - it's remote TCP/IP Setup on the TCP port 99
 
Other  
D: Load/Save Settings
from/to Flash
D0 - Load configuration from User setting
D1 - Load default factory configuration
D2 - Save User setting configuration
R: Reboot Reboot the device (to reload parameters changed from the TCP Setup required).
  
I/O Control Setup
Defines parallel port behaviour, visible only with the IP mode = TCP and NVT = On
#T: Trigger AND mask Define input range scaned and transmited if value changes
#A: Power Up INIT Define start-up output value
#B: Power Up AND mask OUT = ((opposite device's inputs AND #B) OR #C) XOR #D)
#C: Power Up OR mask
#D: Power Up XOR mask
#X: KEEP mask OUT = (( previous value AND #X) OR (opposite device's inputs AND #Y) OR #Z ) XOR #W)
#Y: AND mask
#Z: OR mask
#W: XOR mask
 
UDP mode serial packetiser settings
Defines serial port filter behaviour, visible and function only with the IP mode = UDP
*L: Trigger Length 0 .. 4 defines start and stop serial packetiser trigger length
*P: Post Trigger Length 0 .. 251 defines how many bytes following after stop condition
*S: Start Trigger Pattern Defines 0 .. 4 bytes of the start trigger value
*M: Start Trigger Mask Defines 0 .. 4 bytes of the start trigger mask
*X: Stop Trigger Pattern Defines 0 .. 4 bytes of the stop trigger value
*Y: Stop Trigger Mask Defines 0 .. 4 bytes of the stop trigger mask
*E: Max. Start-Stop Length 0 .. 254 = max. serial packet lenght in between start and stop conditions

 


 

Sample Codes, Code library & Examples

Borland C++ Comunication Example
When implementing your own PC software, you can refer to our easy Borland C++ Builder software Client terminal example. There are easy NVT commands implemented too.

Other sample source code

For easier implementation of the device into your system, we have created example routines for:


 

Hercules SETUP Utility

For product testing and application debuging we have developed a free utility "Hercules SETUP". In the "Test mode" it supports NVT commands, you can send commands directly in HEXa format etc..

In general the Hercules is :

  • Serial port terminal,
  • TCP Client terminal,
  • TCP Server terminal,
  • UDP terminal,
  • UDP Config for our device only (HW group)
  • Test mode - TCP/IP NVT commands and TEA authorization supporting terminal. I/O Controller functions support.

It's our recommended utility for SETUP and testing of all devices. You can download the latest version from the Internet, or you'll find it on our CD.

More Hercules SW details..

  

FAQ & Support

Question: Can the binary inputs and outputs be used along with the serial port??
Answer: YES, but both are controlled using one TCP/IP connection and can be used only with NVT enabled

Question: Will this FW work with the Virtual Serial Port under Windows?
Answer: YES, the Converter FW for Charon I fully supports all the HW VSP functions over TCP/IP. If you enable NVT (using RS-232 Setup, UDP Config, or TCP setup), it supports full RFC2217.

Question: Can you setup the parameters via network?
Answer: YES, you can use the following ways :

  • RS-232 Setup (Common serial terminal on RS-232 - 9600 8N1 - activated by closing the SETUP pin.) - Here you can setup everything, including parameters, which disable the network setup.
  • UDP Config (using the UDP Config tab in the Hercules Setup Utility) can be used only on local network segment, and can define only the basic network parameters.
  • TCP Setup (using terminal on port 99). Using Telnet client, you can setup almost anything, as in the RS-232 setup

You can find more information in the Charon I module manual or here in chapter first steps.

Question: What is the announced support of RS-485?
Answer: The HW handshake output pin (RTS) can work as the RS-485 outer driver flow control, the module itself supports serial port HALF DUPLEX mode. When using UDP, you can very effectively filter RS-485 data sent to the Ethernet network.

Question: How can you secure the device from unathorized access??
Answer: The most effective way is to use a predefined IP address and port range. Out of this range, nor access, neither PING is allowed. Second way is to use TEA authorisation. You can of course secure the TCP setup also.

Question: Is there any other way to control the binary inputs, than using NVT or UDPP?
Answer: NO, NVT is the only way to control the binary inputs and outputs. But we have prepared several examples and detailed NVT description. The examples are in Borland C++, Delphi, Visual Basic, JAVA and PHP. Check our Support & Download page.

Question: If the TCP connection is closed (timeout 50s) and a digital input changes, does this mean the server will miss the change of the state?
Answer: No, if there is an opened TCP connection and specified inputs (#T in the setup files) receive a change of state for longer than 20ms, the NVT command '7B' is sent to an opened TCP/IP connection.
If the connection is closed, and client/server mode is enabled (active), the device will establish a TCP connection with the server as the TCP client, and send the NVT command '7B' to the TCP/IP connection.

Question:  Are there source codes available for this FW?
Answer:  NO, the program is written in ASM and can be very hard to understand, if you need any custom modification, contact us...

Question: Does thi FW support WWW interface (HTTP server)?
Answer:  NO, this FW does not contain any WWW interface, the setup using terminal access is very simple.


Ordering

Available now! You can order Charon I module only or complete Charon I DK (click for details).

We have a minimum of 20 pcs in stock all the time. It can be shipped via FedEx next day all over the world. Download the Orderform, fill it and fax to our fax number. If you'll pay by CC, you can have samples on your table in up to 5 days!

We accept payement by Credit Cards or Wire Transfer, check our prices in the PriceList .

Or try to contact your nearest distributor of our products - International Distributors .  

 

 


Related products

  • PortBox
    The RS232/485 - ETHERNET converter with the Server or Client/Server mode, TCP/IP or UDP/IP protocols, remote virtual serial port control over RFC2217 and more..
  • HW Virtual Serial Port
    Virtual serial port driver for PortStore, PortBox and Converter firmware on Charon. HW VSP required WIN2000 and higher.  
  • PortStore
    RS232 Flash buffer of 512 kB or 2048 kB for accessing data over the Ethernet. Designed for remote access to the data stored from a serial port over a network via TCP/IP. Data transmition from RS232 over a larger distance requires conversion to the RS422 line and installation of four-wire cable. The Flash 512 kB device, designed for accessing billing data from phone exchanges is described below.
  • Ethernet I/O Controller
    I/O Controller is a box that can be connected to an Ethernet network. It has 8 digital inputs, 8 digital outputs and an RS-232 serial line, which can be accessed via a computer network. Two boxes on one network can enable a virtual connection between the two interfaces, using the ethernet network.
     
  • Charon 2 module
    Low-cost embbedded module based on the AVR ATmega MCU. It's full HW compatible with the free Ethernut project (www.Ethernut.de - Ethernut is an Open Source Hardware and Software Project for building Embedded Ethernet Devices).
    You can design Charon 2 into you application, use RTOS and TCP/IP stack from the Ethernut project and start work on our examples. Original Ethernut Project as well as Charon 2 module are well documented..