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

Thread: Accessing "Serial port 2" using the Teensy 3.2 bottom pads.

  1. #1
    Junior Member
    Join Date
    Nov 2014
    Posts
    4

    Accessing "Serial port 2" using the Teensy 3.2 bottom pads.

    Can someone help me?
    I read the “Welcome to Teensy 3.2” reference card (back side) as RX2-TX2 being accessed through pads 26 & 31 respectively.
    Is this correct?
    Is there a unique way to address the pads 26-31 vs. header pins 9-10 for serial port 2? (I need pins 9,10 for digital I/O)
    Thanks, Jeff

  2. #2
    Member
    Join Date
    Aug 2018
    Location
    Brisbane, Australia
    Posts
    30
    Call these methods on Serial2
    Code:
            virtual void setRX(uint8_t pin) {
            virtual void setTX(uint8_t pin, bool opendrain=false) {

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,656
    Indeed - should work when called like this:
    Code:
    	Serial2.begin(9600);
    	Serial2.setRX (26);
    	Serial2.setTX (31);

  4. #4
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,872
    Slight note:
    I believe you can call the functions like setRX before or after the Serial2.begin...

    However if you do it in the order:
    Code:
            Serial2.begin(9600);
    	Serial2.setRX (26);
    	Serial2.setTX (31);
    The Serial2.begin will first setup the default pins to be in Serial mode, and then the two set functions will then set the default pins back to disabled and then set the new pins to Serial mode.

    If you call it in the order:
    Code:
    	Serial2.setRX (26);
    	Serial2.setTX (31);
            Serial2.begin(9600);
    The set functions will just remember which pin you selected and then when you call begin those pins will be setup in Serial mode and the default pins will not be touched.

    But both ways should work

  5. #5
    Junior Member
    Join Date
    Nov 2014
    Posts
    4
    Thank you all for the advise and quick response. Jeff

Posting Permissions

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