Modbus not working on PIC24FJ512GA606.

For general Flowcode discussion that does not belong in the other sections.
seokgi
Posts: 206
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Modbus not working on PIC24FJ512GA606.

Post 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.

seokgi
Posts: 206
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus not working on PIC24FJ512GA606.

Post by seokgi »

The program inside that works with Mobus Incoming works.

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

Re: Modbus not working on PIC24FJ512GA606.

Post 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.

seokgi
Posts: 206
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus not working on PIC24FJ512GA606.

Post by seokgi »

Uart is well.
Attachments
v0.2_Sensor_Amp_Post.fcfx
(63.76 KiB) Downloaded 491 times

seokgi
Posts: 206
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus not working on PIC24FJ512GA606.

Post by seokgi »

It still doesn't work well.
Please take a look again
Thank you.

seokgi
Posts: 206
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus not working on PIC24FJ512GA606.

Post 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.

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

Re: Modbus not working on PIC24FJ512GA606.

Post 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

RGV250
Posts: 283
Joined: Sat Mar 19, 2022 4:53 pm
Has thanked: 25 times
Been thanked: 32 times

Re: Modbus not working on PIC24FJ512GA606.

Post 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

seokgi
Posts: 206
Joined: Thu Dec 03, 2020 1:43 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Modbus not working on PIC24FJ512GA606.

Post 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.

BenR
Matrix Staff
Posts: 1926
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 503 times
Been thanked: 686 times

Re: Modbus not working on PIC24FJ512GA606.

Post 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.

Post Reply