Pages: [1]   Go Down
Author Topic: Serial to Serial connection on an ATMega  (Read 1228 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to access a USB 3.3v UART port on my samsung captivate.  see here: http://forum.xda-developers.com/showthread.php?t=1018862

Anyways, I need to make sure I'm doing this right.   Basically, I want to talk directly to it using my computer. The problem is all I get is garbage through the other end while other people are getting real data.  How can I go about emulating a USB UART device with the Arduino?  As far as hardware goes it should be able to handle it.  Every time I search for UART, i get the serial() command used in various contexts.

Here is my code
Code:
void setup() {
  // initialize both serial ports:
  Serial.begin(115200);
  Serial1.begin(115200);
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.print(inByte, BYTE);
  }
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.print(inByte, BYTE);     
   
  }
}
Can someone help me communicate with my ATMega to my UART connection?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it's working!

http://youtu.be/GGrFAU1sig8
Logged

Pages: [1]   Go Up
Jump to: