| includes | ||
| src | ||
| unused | ||
| .gitignore | ||
| Makefile | ||
| README.md | ||
fdr1-modbus-slave
Firmware Modbus RTU esclave pour encodeur incrémental, conçu pour tourner sur la carte FDR1 v1.00.
Le PIC lit la position du codeur QEI et la met à disposition d'un maître Modbus RTU (OpenPLC ou autre) via liaison série RS232/RS485.
Matériel requis
- Carte FDR1 v1.00
- Microcontrôleur PIC18F4431
- Quartz 8 MHz (HSPLL x4 → Fosc = 32 MHz)
- Encodeur incrémental raccordé au périphérique QEI
- Liaison série RS232 (RS485 à venir)
Configuration Modbus RTU
| Paramètre | Valeur |
|---|---|
| Adresse esclave | 183 |
| Vitesse | 115200 bps |
| Format | 8N1 |
| Function code | FC03 |
Registres
| Adresse | Nom | Type | Accès | Description |
|---|---|---|---|---|
0x1700 |
HR0 | UINT16 | R | Position QEI |
Build & Flash
Prérequis
- XC8 (dans le PATH)
- MPLABX v6.20 avec DFP PIC18Fxxxx installé
- PICkit3
Compilation
make
Flashage
make flash
Nettoyage
make clean
Licence
Copyright (c) 2026, FDR1 Project
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the FDR1 Project.
- Neither the name of the FDR1 Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.