Teensy 3.2 with FTDI Friend (adafruit) not receiving transmits

Status
Not open for further replies.
Hi all,

I've been trying to setup a extra serial connection through hwserial3 to a adafruit FTDI friend serial to usb adapter. When the teensy transmits data from pin 8 it's never received by the serial adapter, though data can be received from the serial adapteron pin 7.

When I try to loopback on the FTDI Friend I receive data. When I run this code on the teensy it shows nothing:

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

void loop() {
delay(500);
if (Serial3.available()) {
Serial3.write("test");
delay(100);
int inByte = Serial3.read();
Serial.write(inByte);
}

}

Is my unit defective or am I doing something wrong?


Thanks!


Marco
 
Code:
void setup() {
  Serial.begin(9600);
  Serial3.begin(9600);
}

void loop() {
  delay(500);
  if (Serial3.available()) {
    Serial3.write("test");
    delay(100);
    int inByte = Serial3.read();
    Serial.write(inByte);
}

}

When the program first starts up, how do you expect the line: if (Serial3.available()) {
to be satisfied? I believe you said you tried connecting the TX pin to the RX pin, but nothing has been output to TX...

Maybe move the Serial3.write... outside of this loop... Could maybe just put it in setup?
 
Thank you. After spending hours to figure this out, I found out I chose pin 7 on my breadboard, which is pin 6 on the teensy.. Such a stupid mistake. But thanks for the replies!
 
Now I have this weird problem:

When I connect serial2 over ftdi to usb to computer 1 and the teensy usb to computer 2 my serial is bouncing on computer 1 (i can send data from computer 2 to computer 1, but when computer 1 sends data its bounced back to computer 1 and the teensy never hears the message)

When I connect serial2 and the teensy USB port to the same computer it's working properly.

I think it has something to do with coming from the same power supply, but can someone give me a hint to where to start looking for a solution?
 
Are the ground wires connected properly?

Often these sorts of strange problems turn out to be something depending on a ground path that goes all the way through some other piece of gear to the earth ground of your building's power, and back through some other pieces of gear's grounded power cord. For example "works only when I have the oscilloscope connected".

If you show us photos of how you've actually connected everything, maybe we can see something you've missed? (like the pins 6 vs 7 thing... if you look over the other threads on this forum, we're pretty good as spotting those sorts of things when photos are shared)
 
they have both different grounds, of course it will not work
you need a common ground, only the VCC is not to be shared
 
Isn't it wrong to connect the ground of the FTDI Friend board to the ground of the teensy? And could you tell me why the ground should be common?
No it is absolutely neccessary.
Without common ground - where's your "Circuit" ? Sorry, but this is absolutely basic knowlage, you learn it in school, early.. (at least in Germany)
Perhaps try to connect a lamp (no LED!!) to a battery first..
 
Well, actually, I had it connected at first, but the ftdi board started blinking crazy, so I thought that there was something wrong. That's why the yellow wire is sitting there.

It works now. Is there a reason why the FTDI board starts blinking when the usb cable is not connected and only RX TX and GND are connected to the teensy?
 
Status
Not open for further replies.
Back
Top