i have some questions.
I want to use the TX1 and RX1 Pins regarding Serial1.
What else i have to do?
I studied some sketches where Serial1 is used. I defined the port pin's like it is made in the sketches.
But i can't receive incoming data. My Oscope is showing incoming data. TTL voltage level is given.
Should i connect a pullup-resistor outside. 10k's?
I'm realizing a modbus like system with those Max485 modules from A..m..n.
I had a running system with 3 China NANO v3. I changed 2 NANO V3 for 2 NANO Everys.
I connected the Serial1 Pins and modified the sketch.
The NANO V3 can send data and is getting data from the 2 NANO Everys.
But the 2 Everys can not receive any data.
But like i wrote above TTL level is given.
The sketch is OK, i say. if (Serial1.available() then
Does someone have any idea? What did i miss?
Any help will be appreciated.
You don't need (nor want) pullup resistors for the serial ports. It would be nice to see the sketch. As a test of Serial1 you could try the SerialPassthrough built-in example and connect D0 and D1 (TX1 and RX1) together for a loopback. What you type in the Serial Monitor should echo back to the Serial Monitor. That would show you if data can indeed be received by Serial1.
Thank you almytom.
I tried like you've suggested and yes the RX1 input is ok.
So how can i improve my setup?
With those RS485 modules from Ama...n
attached it doesn't want to work anymore in the recycling line.
Excepting the Nano V3 over SoftSerial.
This one works well.
It could be a problem with the direction control signal. Make sure DE and RE on the RS485 converter are both connected to whatever pin you are using for direction control. I don't know what you are using for software drivers. They would generally have to be different for the Nano Every because the ATmega4809 has USARTs of a different design. I have successfully demonstrated RS485 communication on a Nano Every but I use my own driver software so that the direction control is done by the microcontroller itself (XDIR pin of the USART). The converter board I used, labeled "HW-97", is basically just a MAX485 IC.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.