Serial communication via RS-485 problems

Hi

I am using 2 arduinos and 2 RS-485's to try and get a 'master' & 'slave' relationship working between them (master -> UNO, slave -> Mega). I've had it working previously, but now nothing is working. I'll post the wiring schematic as well as the programs i'm using. If you see any issues, help me out please :grin:

MEGA2.ino (1.08 KB)

UNO2.ino (477 Bytes)

additional info I just found out. I switched the programs, and uploaded the master program to the arduino mega. The TX led goes off in intervals, but once the TX pin is wired up to the DI pin on breadboard, it doesn't light up and doesn't send 'ping'. But when not wired up, it works...

I looked at UNO2.ino and it is set up for Ethernet, that should not work. RS484 knows nor understands anything about a MAC address. With the master and slave simply tie the master to enable transmission all the time and the slave to receive only until you get it working and need to acknowledge a transmission. I gave up on trying to control the transmit and receive direction and did it in hardware. I could not figure out when the transmission was complete so I could turn it around to send a ACK, The ACK was part of the protocol I was using. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil