I managed to partially solve the problem.
by inserting this c block:
---------------------------------------------------------
// UART1 - PIC18F45K22 - 9600 bps - 4 MHz - 8N1
// Imposta modalità asincrona
TXSTAbits.SYNC = 0; // Asynchronous mode
TXSTAbits.BRGH = 1; // High speed baud rate ...
Search found 3 matches
- Tue Oct 14, 2025 1:51 pm
- Forum: General
- Topic: MODBUS RTU ON PIC 18F45K22
- Replies: 1
- Views: 3128
- Fri Oct 10, 2025 11:26 am
- Forum: Projects - Embedded
- Topic: Modbus RTU Slave Broadcast
- Replies: 3
- Views: 11905
Re: Modbus RTU Slave Broadcast
Good morning Mario,
I made a modbus rtu communication program with a pic series 16, but when I reciprocated it on a series 18f45 K..., the communication didn't work.
Could you show me how you managed to implement the communication ports?
Thanks
Luigi
I made a modbus rtu communication program with a pic series 16, but when I reciprocated it on a series 18f45 K..., the communication didn't work.
Could you show me how you managed to implement the communication ports?
Thanks
Luigi
- Fri Oct 10, 2025 10:11 am
- Forum: General
- Topic: MODBUS RTU ON PIC 18F45K22
- Replies: 1
- Views: 3128
MODBUS RTU ON PIC 18F45K22
GOOD MORNING, I MADE A MODBUS COMMUNICATION PROGRAM OVER RS232 THAT WHEN COMPILED ON THE 16F887 WORKS PERFECTLY.
WHEN I RECOMPILE IT FOR THE PIC18F45K22, THE COMMUNICATION DOESN'T WORK AT ALL.
COMPARED TO THE PROGRAM THAT WORKED ON THE PIC 16F887, I ADDED THE UART PORT INITIALIZATION.
BUT IT DOESN'T ...
WHEN I RECOMPILE IT FOR THE PIC18F45K22, THE COMMUNICATION DOESN'T WORK AT ALL.
COMPARED TO THE PROGRAM THAT WORKED ON THE PIC 16F887, I ADDED THE UART PORT INITIALIZATION.
BUT IT DOESN'T ...