Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: AltSoftSerial on Teensy 4.1 - What pins should I use?

  1. #1
    Senior Member
    Join Date
    Dec 2016
    Location
    Buena Park ca
    Posts
    129

    AltSoftSerial on Teensy 4.1 - What pins should I use?

    believe it or not I ran out of Ser ports and need a soft serial.

    I heard great things about AltSoftSerial. but there are not specs for T 4.1.
    Does it work on it?
    Thanks

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Location
    Buena Park ca
    Posts
    129
    Also I am trying to use this library on a Arduino Nano,

    Using the same processor like the UNO , thought I could use pins 8RX and 9(TX).

    But it does not receive anything most the time. If I put the oscilloscope probe on Pin 8 I do get some random numbers as being received.
    I am sending stuff from the Serial8 of the Teensy 4.1 at 9600 baud. I am writing simple stuff such as Serial8.write (4);

    How do I use this library on the NANO>?

    Thanks
    mitch

  3. #3
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,969
    I have no idea if it works or not, but one thought might be to use the USB host support, and connect several USB to serial converters to a USB port. If you need more than one, presumably you would need a USB hub or switch also. Something like:

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,755
    AltSoftSerial does not work on Teensy 4.1. The main reason is a belief that 8 serial ports are enough for anyone (kinda like 640K on old PCs....) Likewise, SoftwareSerial when used with non-serial pins has limited support for transmitting, but not receiving. Since there are 8 real serial ports, pretty much no work has gone into SoftwareSerial support on Teensy 4.1.

    Kurt's FlexIO serial library is probably your best path to a 9th serial port on Teensy 4.1.

    I really can't help much with Arduino Nano. I don't have that board. I can tell you I did test AltSoftSerial on Arduino Uno, which is supposed to be essentially the same hardware. AltSoftSerial absolutely does work on the 2 genuine Arduino Uno boards I have (R3 and the original 1st release).

    If your Arduino Nano is actually a cheap Chinese counterfeit, consider the chip is probably a countefeit too, not actually the real AVR chip made by Atmel/Microchip. I've been told the counterfeit AVR chips have many minor differences which don't affect simple programs. If you're seeing a program like AltSoftSerial not work as it should, try testing on known-genuine hardware with a real AVR chip from Atmel/Microchip.

  5. #5
    Senior Member
    Join Date
    Dec 2016
    Location
    Buena Park ca
    Posts
    129
    Great advice, I used a natural port from Teensy for TX.

    On the Nano side I could not make AltSoft work so I tried the NeoSWSerial library and it works. Not saying that Alt Soft is not good... but did not receive. Maybe I have a cheap clone...

    I would use a Teensy for RX too, but my application requires some 5V logic level outputs...

    Thanks
    Mitch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •