Sign in to follow this  
benediktsch

Logic levels from HardwareSerial

Recommended Posts

Hello together,

I was trying to get three HardwareSerials working on the DUO Board. When I was watching at the signals with my Logic Analyzer only the second UART seems to work fine.
But as you can see in the attached image it seems like the first UART (Channel 0) is also sending data, but on a Logic Level of something around 0.35Volts. So why isn't this working like the second one, but going from low to high instead of from high to low and has such a low logic level? I also tried initalizing the Serials like in the given example withe the Wishbone Slot inserted, but I guess this got outdated in v2.0.

Edit: In the schematic the TX RX are: SerialRed : RX = Arduino_0 ; TX = Arduino_1
                                                            SerialGreen : RX = Arduino_2; TX = Arduino_3
                                                            SerialBlue : RX = Arduino_4; TX = Arduino_5

I also tried using other PINs than the ones above but everywhere seems to be the same issue.

This is my Code:

HardwareSerial SerialRed(2);
HardwareSerial SerialGreen(3);
HardwareSerial SerialBlue(4);

void setup() {

  Serial.begin(115200);
  delay(50);
  SerialRed.begin(57600);
  delay(50);
  SerialGreen.begin(57600);
  delay(50);
  SerialBlue.begin(57600);

}

void loop()
{
  SerialSendData(TData);
  delay(1000);
}

void SerialSendData(uint8_t TData[3072]) {
  SerialRed.write(startsequence);
  for (int i = 0; i < 1024; i++) {
    SerialRed.write(TData[i]);
  }
  Serial.println("Red transmit");
  SerialGreen.write(startsequence);
  for (int i = 1024; i < 2048; i++) {
    SerialGreen.write(TData[i]);
  }
  Serial.println("Green transmit");
  SerialBlue.write(startsequence);
  for (int i = 2048; i < 3072; i++) {
    SerialBlue.write(TData[i]);
  }
  Serial.println("Blue transmit");
  SerialRed.write(setFrame);
  SerialGreen.write(setFrame);
  SerialBlue.write(setFrame);
}

 

LLPP.JPG

llPPP.JPG

Share this post


Link to post
Share on other sites

Another Problem I found is, that the UART is dropping bytes in the beginning or at the end of a transmission randomly. Even thou everything is transmitted from the other Papilio Board. I just read data in my loop and print it, after it was transferred, so I don't really think I can make the program any shorter.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this