TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 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 (136735 times)
  2. FAT32 Library (69950 times)
  3. Network Ethernet Library (55941 times)
  4. USB Device Library (46266 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41170 times)
  7. GSM click (28983 times)
  8. PID Library (26413 times)
  9. mikroSDK (26360 times)
  10. microSD click (25376 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: 5083 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

Generic Linked List

0

This small project demonstrates how to use my generic linked list structure. Included in this project is a very small LED scanner, each LED is a node in the linked list.

[Learn More]

LED Faders

0

This project demonstrates my fading structure and functions. You can create multiple faders on any I/O port you specify. Faders can be either individual pins or a mask of multiple pins. You specify the speed of fade, direction (in or out) and what options you want.

[Learn More]

Racing Start Lights for Slot Racers

0

Adds external start lights for any slot racing set.

[Learn More]