Hello folks
I'm trying to build a RS485 library and I'm testint it now.I'm using Visual Basic to inject some packets on the RS485 BUS and debug the outuput using a Saleae Logic Analiser.
I only have one function on the main loop for now but I should expect to see the answer from the microcontroller when is ID is called on the BUS right after he received the message and then answer back.It works most of the time but looking on the Saleae Software sometimes he ignores some stream packects and don't give the answer.For now I just have one slave on the BUS.
Here is the output from the software.
Channel 0 is connect to the RX atmega328 pin and the channel 1 is connect to TX Pin.Channel 3 is connect to the Pin 2 and 3 from the MAX485(when is low is on receive mode, when is High on seend Mode)
I don´t figure out why is a gap in some answer as I can see on the image
Also here is my code and the library in working on
#include "RS485.h"
RS485 bus;
void setup()
{
Serial.begin(9600);
bus.begin(2,3); //Device address and hardware pin connected to MAX485 enable Pins 2 and 3
bus.rxMode(); //Set de Bus on receive mode
}
void loop()
{
bus.listen();
}