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

Thread: MK66FX1M0 (Teensy 3.6) all IO pins possible?

  1. #1

    MK66FX1M0 (Teensy 3.6) all IO pins possible?

    Hi, I am developing hardware where I will replicate the Teensy 3.6 schematic and was wondering if it is possible to utilize all 100 MK66 IO pins. I see the Teensy 3.6 schematic uses IO pins 0..57, but I see the MK66 itself actually has a total of 100 pins. Does anybody know how I can possibly use all 100 of these pins in the Arduino development environment?
    Thanks.
    Tim

  2. #2
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    580
    You have to modify the core library to add the additional pins.

  3. #3
    Thanks for the quick reply. Could you possibly point me to which file(s) would need to be modified? Would it be core_pins.h? Has anybody successfully done this?
    Thanks!
    Tim

  4. #4
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    580
    It's been a while, but if I remember correctly, core_pins.h and pins_teensy.c are both needed to be modified to use the additional pins for GPIO. For other functions, like analog input, you would need to add the additional pins to the appropriate libraries. I recall that adding analog input seemed straightforward.

    I successfully did the GPIO work for a customer project; although, I was using a CMake build system rather than Arduino IDE. I considered making a "compute module" version of Teensy 3.6, and tested that I could modify the core library to support the additional pins through Arduino IDE. Some discussion is here:
    https://forum.pjrc.com/threads/53225...-quot-Feedback

    And here:
    https://forum.pjrc.com/threads/54114...-Pin-Numbering

  5. #5
    Appreciate it. It will be a while before I make the attempt, but I will try to remember to post back here once I get it working.
    Tim

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    7,692
    It has been awhile but @brtaylor's links but you would need to for sure do things like core_pins.h and pins_teensy.c

    And probably be able to add the extra pin numbers.

    But depending on what it is you are wanting to do that may only be the start.

    For example if some of these pins do Analog and you wish to use them as such. You may want to add them to the analog code..
    analog.c ... Unless of course you wish to use ADC library than may need to change it as well.

    Then there is Uarts, SPI, Wire, ... Some of these you can change directly in the core files. Like our SPI library has tables which you can add the extra pins for which are valid for MISO, MOSI, SCK, CS... to the tables within SPI. But that may not fix all sketches and libraries, as many still do their own code that checks is the MOSI pin x or y...

    But it is all doable. All sort of along the work that it is taking to distinguish between T4 and T4.1

  7. #7
    Thanks @KurtE. Fortunately my only need would be for driving/reading low/high to control other circuitry on my hardware. I would not need to use it for SPI/UART/I2C/CAN etc, so that would make it at least a little bit simpler.
    Tim

Posting Permissions

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