TOP Contributors

  1. MIKROE (2657 codes)
  2. Alcides Ramos (354 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136901 times)
  2. FAT32 Library (70034 times)
  3. Network Ethernet Library (56005 times)
  4. USB Device Library (46308 times)
  5. Network WiFi Library (41934 times)
  6. FT800 Library (41234 times)
  7. GSM click (29022 times)
  8. PID Library (26434 times)
  9. mikroSDK (26401 times)
  10. microSD click (25387 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Example

Serial Modbus Master

Rating:

4

Author: Simon Platten

Last Updated: 2014-09-17

Package Version: 1.0.0.0

Example: 1.0.0.0

Category: Communication

Downloaded: 5089 times

Followed by: 1 user

License: MIT license  

This project demonstrates a Modbus Master implementation, it has been developed and tested for a P18F45K22 using an EasyPic v7 for testing and written in mikcroC.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Serial Modbus Master" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Serial Modbus Master" changes.

Do you want to report abuse regarding "Serial Modbus Master".

  • Information
  • Comments (3)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

Example Blog

Modbus Slave Simulator Configuration

Modbus Slave Simulator Configuration

How to configure the Calta Computer Systems Limited modbus simulation tool as a slave project for use with this modbus master.

View full image
Modbus Slave Simulator responding to Master

Modbus Slave Simulator responding to Master

Screen show shows responses to Master implementation.

View full image

02/08/2012 Uploaded version 1.00.  In this demo the master has been set-up to request the following I/O from a single slave:

Discrete outputs (Coils) x 8 starting at 1
Discrete inputs (Status Inputs) x 8 starting at 1
Holding Registers (16 bit analogue registers) x 2 starting at 1
Input Registers (16 bit analogue input registers) x 1 starting at 1

Supported functions:
01 Read coils
02 Read status inputs
03 Read holding registers
04 Read input registers
05 Force single coil
06 Preset single register
15 Force multiple coils
16 Preset multiple registers

To simulate the write operations, PORT D has been configured as input with buttons 1 to 4 performing the following:

Button 1, writes to a single coil to address 1 (Function 05)
Button 2, writes to 7 coils, starting at address 1 (Function 15), the value written is b111101
Button 3, writes to a single holding register to address 1 (Function 06), value 0xcaca
Button 4, writes to 2 holding registers, starting at address 1 (Function 16), values 0x04d2 and 0x162e.

Summary of usage:
RAM used 1480 bytes 97.7%
ROM used 7454 bytes 22.7%

For Modbus Slave embedded implementation:

http://www.libstock.com/projects/view/355/modbus-slave

ALSO FROM THIS AUTHOR

Serial Modbus Slave

15

This project demonstrates a set of functions and structures for implementing an RTU modbus slave on the serial port.

[Learn More]

WiFi HTTP Demo Example v2.3

5

This is a variation on the MikroElektronika WiFi HTTP Demo project. I posted only because 'dejan.odabasic' of the mikroElektronika team suggested sharing it.

[Learn More]

Racing Start Lights for Slot Racers

0

Adds external start lights for any slot racing set.

[Learn More]