Teensy 3.5: How is USB1 accessed?

Status
Not open for further replies.
I'm trying to communicate with a USB dongle using the the USB1 pins (A25, A26). This was chosen so that the USB dongle can communicate separately from the integrated microUSB port. I've been having trouble finding much on the subject on this forum and on google.

I would preferably like to communicate like any other serial port.=, but I can work with whatever is available.
 
Uh oh. I already built a board around it.

Is there a way to bit-bang the pins to be used in a similar fashion? I imagine not, since i would need a negative voltage source.

Update:

It only actually needs to read, so I can probably use some for of SoftwareSerial and use the D+ pin as the RX pin. Does that sound like it will work?

I recommend Paul note this on the sheets that come with the boards, or change the silk screen of the boards themselves to help alleviate the confusion for future customers.
 
Last edited:
No, the pins are analog input only. You can only use analogInput to read them. You cannot use digitialWrite nor digiRead to read or write digital signals to them. And even though the 3.5 is 5v tolerant, the analog only pins must not be fed more than 3.3v.

Unfortunately, it was a cost issue in that the same PCB is used for both the 3.5 and 3.6.
 
How would DigitalRead not work? That would be the important one. All I need to do is read the data.

I suppose it wouldn't be too bad to get a raspberry pi 3.6, but if it is something I can fix today it would be ideal.
 
The pinout reference card does say the pins are analog only and the 5V pin is "no used" on Teensy 3.5.

Both are made with the same physical PCB, so the marks printed on the board are identical.

On Teensy 3.5 those pins simply can not be used for anything other than ADC input. If you really must use one for serial input data, you'll need to do something crazy like perhaps use IntervalTimer to run analogRead() and regular intervals at some multiple of your baud rate (which hopefully is slow enough) and write some code to look for the start bit and take the readings from the center of the next 8 bit times.

Just building another board with a Teensy 3.6 might be quite a bit simpler.
 
How would DigitalRead not work?

Certain pins are analog only. You can't use digitalRead on those pins, but you can use analogRead and then turn the analog reading into HIGH or LOW.

Be sure to put analogReadAveraging(1) and analogReadResolution(8) into setup, to make the analogRead as fast as possible. Sadly, it's still going to be quite a lot slower than digitalRead().
 
OK. so the ultimate option will be to either use a Teensy 3.6 for the final product, or we may use a UART version of the the chip I'm trying to communicate with, and embed it into the board.

Tonight's fix will probably be fairly hackish and will probably be related to the latter of the two options.
 
I just wanted to follow up. We are using the Teensy 3.6 for clients who specifically need the USB zigbee dongle.

Also, despite the fact that I hopped on the site and started dishing out criticisms, the Teensy is absolutely amazing and I thank you for creating it!
 
Status
Not open for further replies.
Back
Top