Shop OBEX P1 Docs P2 Docs Learn Events
SEROUT/SERIN problems — Parallax Forums

SEROUT/SERIN problems

noobydoobnoobydoob Posts: 14
edited 2014-06-11 15:45 in BASIC Stamp
I am sending serial data from BSP2px to another host controller (Raspberry Pi) via CP2104: http://www.pololu.com/product/1308.

Since CP2104 uses 3.3V, I have a logic level converter on the TX and RX lines: http://www.adafruit.com/products/395. Naturally, the BS2 lines are on the B side, and the RPI on the A side. Vdd (5V) from the BS2 is connected to VCCB and Vdd (3.3V) from the RPI is connected to VCCA.

Whenever I send data from RPI I get the correct data on the BS2, but when the BS2 transmits, the RPI gets the correct character every 3 times.

I start by sending "X" from the RPI, and the BS2 gets this correctly. Then I do SEROUT on the BS2 and send "Y" to the RPI.

The RPI gets either:
1) "Y" (which is correct)
2) The character that was sent from RPI originally, the "X". LOL?
3) "\xbe", whatever that is.

Do I need a pull-up or pull-down resistor somewhere on the CP2104 or the TX or RX lines? Or am I doing something else wrong.

Comments

  • noobydoobnoobydoob Posts: 14
    edited 2014-05-18 01:20
    UPDATE: After eliminating the logic level converter, it seems all is fine. The CP2104 tolerates 5V, so the converter is not really needed.

    The logic level converter is built specifically for this kind of thing, is this not strange?
  • mklrobomklrobo Posts: 420
    edited 2014-06-11 15:45
    cool !:cool: I am trying to get a basic stamp "talk" to an hp calculator, any thoughts? I have tried a logic level converter, but can not get the commands of the calculator to follow through.
    any thoughts?
Sign In or Register to comment.