Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to communicate with CP2102 USB to UART Bridge? #53

Open
metanav opened this issue Jan 18, 2024 · 1 comment
Open

How to communicate with CP2102 USB to UART Bridge? #53

metanav opened this issue Jan 18, 2024 · 1 comment

Comments

@metanav
Copy link

metanav commented Jan 18, 2024

Hi,

I am trying to connect a Silabs CP2102 USB to UART Bridge but I do not know how to use this library to connect and send/recieve data. Any minimal example or hints would be appreciated.

Thanks!

@ceilingduster
Copy link

ceilingduster commented Apr 21, 2024

+1 I've found it difficult to make it work on my CP2104 USB to UART Bridge. It detects, but not able to read or write any further and lacking documentation to figure it out. Any example would be appreciated as well.

Here is the code I am using:

#include <elapsedMillis.h>
#define USBHOST_OTHER
#include <Arduino_USBHostMbed5.h>

REDIRECT_STDOUT_TO(Serial)

USBHostSerial userial;

void setup() {
  Serial.begin(115200);
  while (!Serial) {}

  Serial.println("Starting Serial test...");

  // Enable the USBHost
  pinMode(PA_15, OUTPUT);
  digitalWrite(PA_15, HIGH);

  elapsedMillis em;
  while (!userial.connect()) {
    if (em > 5000 ) {
      Serial.println("No USB Serial device connected");
      em = 0;
    }
    delay(500);
  }
  Serial.println("Serial connected");
}

void loop() {
  // print characters received
  while (userial.available()) {
    Serial.write(userial.getc());
  }

  delay(1000);
}

On run, it just spams "No USB host Serial device connected" regardless of any serial dongle that I have tried (FTDI or Silicon labs chip).

I have other code here -> https://github.com/ceilingduster/ambe3k_experiments/tree/main/arduino_sketches

The device I am using is an AMBE 3000 USB vocoder (https://github.com/ceilingduster/ambe3k_experiments/blob/main/AMBE-3000R_manual.pdf)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants