Page 1 of 2
Modbus not working on PIC24FJ512GA606.
Posted: Tue Nov 15, 2022 12:43 pm
by seokgi
Hello?
Modbus not working on PIC24FJ512GA606.
Doesn't work after update. The same program works fine on PIC18F45K40.
Help me Please.
Thank you.
Re: Modbus not working on PIC24FJ512GA606.
Posted: Tue Nov 15, 2022 12:50 pm
by seokgi
The program inside that works with Mobus Incoming works.
Re: Modbus not working on PIC24FJ512GA606.
Posted: Tue Nov 15, 2022 3:12 pm
by BenR
Hello,
Plase can you post your project file. Also have you done a one second flasher test to confirm the device is running at the rate you think it is.
Re: Modbus not working on PIC24FJ512GA606.
Posted: Wed Nov 16, 2022 3:52 am
by seokgi
Uart is well.
Re: Modbus not working on PIC24FJ512GA606.
Posted: Sun Nov 20, 2022 12:46 am
by seokgi
It still doesn't work well.
Please take a look again
Thank you.
Re: Modbus not working on PIC24FJ512GA606.
Posted: Sun Nov 20, 2022 12:51 am
by seokgi
If I take the MAX485 chip off the PIC18F45K40 which works fine and put it on the PIC24FJ512GA606 board it doesn't work. Again, if I take the MAX485 chip off the PIC24FJ512GA606 and attach it to the PIC18f45K40, it works fine.
Re: Modbus not working on PIC24FJ512GA606.
Posted: Mon Nov 21, 2022 1:27 pm
by BenR
Is the voltage difference having an effect? does the Max chip work at 3v3?
Do you have anything you can use to look at the signals either side of the max chip, this is a useful low cost analyser if you don't currently have anything.
https://www.amazon.co.uk/gp/product/B08 ... XLJG&psc=1
Re: Modbus not working on PIC24FJ512GA606.
Posted: Mon Nov 21, 2022 8:45 pm
by RGV250
Hi,
When I was developing my Modbus on ESP32 I used one of these
https://www.ebay.co.uk/itm/195143159538 ... L7EALw_wcB
and the Modbus master / slave from here
https://www.simplymodbus.ca/RTUmaster.htm
Bob
Re: Modbus not working on PIC24FJ512GA606.
Posted: Thu Nov 24, 2022 9:35 am
by seokgi
Thank you.
I have the equipment you mentioned.
I tested it with an oscilloscope and the equipment you mentioned.
I tested both 3.3v and 5v voltages.
I tested two chips, MAX485 and MAX13487.
And the software used MODBUS POLL.
BUS Type RS-232 works fine.
But RS-485 doesn't work.
Thank you for your interest.
Re: Modbus not working on PIC24FJ512GA606.
Posted: Thu Nov 24, 2022 9:56 am
by BenR
Hello,
Are you powering the MAX485 IC from a 5V source, looking at the datasheet it needs 5V for RS485 to function correctly.