chipKIT® Development Platform

Inspired by Arduino™

UART port 2 on UNO32 Problems

Created Mon, 12 Aug 2013 22:26:28 +0000 by gmi109


gmi109

Mon, 12 Aug 2013 22:26:28 +0000

I am having some issues trying to use the second serial port on my uno32. Basically my setup is this: I have one regular Arduino UNO sending a serial integer, this is hooked up to a logic level converter to get the 5v down to 3v, and finally it is connected to pins 39 and 40 on the uno32. The sketch on the Arduino is like this:

int test=5;


void setup(){
  Serial.begin(9600);
}

void loop(){
  Serial.write(test);
  delay(750);
}

and the sketch on the uno32 is like this:

void setup(){
  Serial.begin(9600);
  Serial1.begin(9600);
  pinMode(13, OUTPUT);
}

void loop(){
  digitalWrite(13, HIGH);
  //Serial.println("Test");
  delay(35);
  digitalWrite(13,LOW);
  if (Serial1.available() > 0){
    int data=Serial1.read();
    digitalWrite(13,HIGH);
    Serial.print(data);
    delay(150);
    digitalWrite(13,LOW);
  }
  delay(10);
}

Every time I try to make this work, the Uno32 just freezes. Whenever I tried this using UART port 1 on the UNO32, this seemed to work fine. But now that I'm trying to use port 2, it freezes every time the RX line is connected. I've tried waiting until the UNO32 has booted and gone past the setup(), but it still freezes as soon as I plug the receive wire in. Any suggestions on what might be wrong? Do I have a faulty Uno32?


caroper

Tue, 13 Aug 2013 15:12:07 +0000

Take a look at this thread, it sounds like you have a smiler issue: [url]http://chipkit.org/forum/viewtopic.php?f=6&t=2481[/url]

Digilent posted a fix.

Cheers Chris


gmi109

Tue, 13 Aug 2013 20:16:10 +0000

Take a look at this thread, it sounds like you have a smiler issue: [url]http://chipkit.org/forum/viewtopic.php?f=6&t=2481[/url] Digilent posted a fix. Cheers Chris

Thanks so much for the help! I feel kind of dumb for not being able to find that, but thanks!