MODBUS IN EMBEDDED SYSTEMS
www.micro-tech.com.pl
Microtech provides services in the areas of:
  
+ Programming microprocessors systems
 
+ Telemetry
 
+ Industrial Automation 
 
+ Embedded Systems
Projects :
Visual Basic
Two VB projects : 
Modbus Master RTU & Modbus Master TCP/IP
Zilog eZ80 Acclaim
Embedded Modbus TCP/IP embedded server based on  eZ80F91 Acclaim microcontroller
Microchip PIC
Modbus RTU slave based on Microchip PIC16F87X microcontroller (C and Basic
version).
Java NetBeans
Modbus Scanner - a program that detects the communication parameters of a Modbus RTU slave. The program runs under both Windows and Linux.
ZiLOG eZ80 Acclaim Modbus TCP/IP
 Modbus TCP / IP Server is based on  eZ80F91 Acclaim Zilog microcontroller.
The program was written with  Zilog ZDS II 4.8.0, ZTP 1.4.0 and RZK 1.1.
The server supports the following  modbus TCP / IP functions : 01 Read Coil Status, 02 Read Input Status,
03 Read Holding Registers, 04 Read Input Registers,
05 Force Single Coil, 06 Preset Single Register,
15 (0F Hex) Force Multiple Coils, 16 (10 Hex) Preset Multiple Regs
Modbus TCP / IP Server resources:
250 Holding Registers, 32Input Registers,
32 Digital Inputs - 8 first is connected to Port B,
 32 Coils - the first 16 connected to the matrix of LED (1-8 anode, cathode 9-16) in the EZ80F910200ZCO.

The server is trying to obtain  the TCP / IP address from DHCP. If it fails the server address is set to 192.168.1.1. 
The status and the error messages are sent to the console UART (57000.8, N, 1).

The server listens on port 502 for modbus clients.
Each client creates its own communication thread, so some clients may be connected to the server at the same time. Each of the threads before writing/reading data that is waiting for a semaphore to block write/read operations in other threads.
The microcontroller is also an HTTP server with applet that enables read/write data using implemented  Modbus TCP/IP protocol. 
Program was tested on a Zilog  EZ80F910200ZCO kit.
Download Modbus TCP/IP server project