MicroMod Beta Testing

...
Wire and Wire1 show the correct pins. Wire lib was changed to match what Sparkfun is using. Sow on a normal T4 pins 24/25 are wire2 but for the Micromod its Wire1 same holds true for Serial2 and Serial4 - pins are swapped between T4 and Micromod.
...

may have made the same comment at Beta time ... the left 'pins' segment is noted as SCL and the right SCL1 over i2c and i2c1 QWIIC connectors ...

Suggestion was to have appropriate 'WIRE' and 'WIRE1' labels near the qwiic's to call them out ...

Looked again everywhere it seems ATP should be - a few places it shouldn't be ... one place not checked it where it IS :(
 
That's a really awesome looking carrier board :)

I see you used a TPS2055A current limit chip. Is there a 100uF or larger capacitor?
 
may have made the same comment at Beta time ... the left 'pins' segment is noted as SCL and the right SCL1 over i2c and i2c1 QWIIC connectors ...

Suggestion was to have appropriate 'WIRE' and 'WIRE1' labels near the qwiic's to call them out ...

Looked again everywhere it seems ATP should be - a few places it shouldn't be ... one place not checked it where it IS :(

Yeah you made me look - looks like the QWIC connectors are labeled I2C and I2C1 :) Changing it to Wire and Wire1 is Sparkfuns call but doubt they will change it at this point since all their boards are probably like that:(
 
@mjs513 - just a note - your 'card image' might plop "WIRE" and "WIRE1" tags in that area - indeed SFun has their chosen naming that fits the space.

@KurtE - indeed that carrier board looks awesome.
 
@mjs513 - just a note - your 'card image' might plop "WIRE" and "WIRE1" tags in that area - indeed SFun has their chosen naming that fits the space.

@KurtE - indeed that carrier board looks awesome.

Will update that just for reference - not sure how many folks it will help but at least it helps us remember what is what.

EDIT: Decided to do it now before I forgot:
Picture1.jpg
 
Will update that just for reference - not sure how many folks it will help but at least it helps us remember what is what.

EDIT: Decided to do it now before I forgot:
View attachment 25533
This is extremely useful. I find myself moving back and forth between Kurts MM pin mapping and the MM ATP documentation to figure out which Teensy pin is mapped to what ATP pin.
 
Thanks -- glad you are finding it useful. For the reason you mentioned was the reason we put it together way back when we were testing.
 
So is there a best practice recommendation for Micromod with external power and having USB plugged in at the same time, and can run on one or the other, but not both.

I typically cut the Vin=VusbOut on the T4.1 and feed both VusbOut and +5V into a schottky diode-OR to Vin.

See https://forum.pjrc.com/attachment.php?attachmentid=23779&d=1613861232

I see now we're 3.3V to the MicroMod and don't think a diode drop is a good idea here. It's unclear how to proceed so that I can run of a AC/DC supply to generate 3.3V, but also be able to jack into the USB connector with or without AC power to do a firmware update.

My first thought was to make 3.3V off my 12VDC rail (switching regulator), then also have a 3.3V LDO from the USB 5V rail with a AP7361C, but use some logic with the enable pin so it only enables when 3.3V is not present.
 
So is there a best practice recommendation for Micromod with external power and having USB plugged in at the same time, and can run on one or the other, but not both.

...

Not sure anyone in Beta tried to run on external power. The USB-C power supply is more than normal.

Is there a particular board in use? If Sparkfun? Check their docs - they may have accounted for it with a trace to cut or diodes already?
 
So is there a best practice recommendation for Micromod with external power and having USB plugged in at the same time, and can run on one or the other, but not both.

I typically cut the Vin=VusbOut on the T4.1 and feed both VusbOut and +5V into a schottky diode-OR to Vin.

See https://forum.pjrc.com/attachment.php?attachmentid=23779&d=1613861232

I see now we're 3.3V to the MicroMod and don't think a diode drop is a good idea here. It's unclear how to proceed so that I can run of a AC/DC supply to generate 3.3V, but also be able to jack into the USB connector with or without AC power to do a firmware update.

My first thought was to make 3.3V off my 12VDC rail (switching regulator), then also have a 3.3V LDO from the USB 5V rail with a AP7361C, but use some logic with the enable pin so it only enables when 3.3V is not present.

Are you using a Sparkfun MM carrier board or a custom board?
 
As others have mentioned, it would help to know which board.

Also have your read the Sparkfun documentation..

Example the ATP board:
https://learn.sparkfun.com/tutorials/micromod-all-the-pins-atp-carrier-board
There is a whole section on that page that discusses power.

Thanks for the responses everyone. I'm respinning a custom board to replace T4.1 with MM.

I have 50W 48VDC stepping down to 12VDC (quarter brick), then I typically make 5V/1A for T4.1, but Micromod wants 3.3V, so I'll change regulator part # for 3.3V.

I've read the docs, they mention cutting the board for external power, battery. But they don't offer a "either/or" solution for power. If 48V present, I need to jack into laptop for update. If 48V is off, still need to jack into laptop for update.

The 2 diode solution was quick & easy, never had an issue.

Now thinking something like 2 of these might be needed - http://www.aosmd.com/res/data_sheets/AOZ13987DI-02.pdf
 
With my own MMOD board that I am playing with... Need to update as screwed up a few things.

I still had a DC/DC converter down from Servo voltage down to 5V, as I still want 5V for things like USB Host... So you could probably still do that and use your same 2 diode solution.

I then have the 3.3v VR coming off of the +5v. Using a different package than the one Sparkfun uses. (as everyone was out of those).

But again only doing this for my own fun!
 
With my own MMOD board that I am playing with... Need to update as screwed up a few things.

I still had a DC/DC converter down from Servo voltage down to 5V, as I still want 5V for things like USB Host... So you could probably still do that and use your same 2 diode solution.

I then have the 3.3v VR coming off of the +5v. Using a different package than the one Sparkfun uses. (as everyone was out of those).

But again only doing this for my own fun!

Good to know that works, and very simple. I'll look at that approach, as I'm probably over-thinking it.
 
Note sure in this case by term: reference designs...

But All of the Sparkfun boards Eagle design files are up on github.
I believe there are Eagle design files up on Github

Again if you look at the product page: https://www.sparkfun.com/products/16885
And look under the documents tab you will see things like Eagle files

Also there are documents mentioned there like: Designing with MicroMod
 
What is even more confusing is their “Input and Display” carrier pins. I need a Rosetta Stone for the pins… I can't figure out the pins assignments when running a T41 targeted sketch (ILI9341_T4.h game_of_life.ino) particularly for the display.
 
I can't figure out the pins assignments when running a T41 targeted sketch (ILI9341_T4.h game_of_life.ino) particularly for the display.

I'm working on a demo program to show how to use all the features on the "Input and Display" carrier board. It took some digging to find all the info on it.

For the display, CS is pin 4 and DC is pin 5. And you have to put a "<>.invertDisplay(true);" in to get the right colors.
 
I'm working on a demo program to show how to use all the features on the "Input and Display" carrier board. It took some digging to find all the info on it.

For the display, CS is pin 4 and DC is pin 5. And you have to put a "<>.invertDisplay(true);" in to get the right colors.

Cool - will look for a share, I got one of those long ago ( $$$ ) and powered it maybe once for a quick test - but with no reason to use it and no exhaustive demo it got ignored. It doesn't expose many general purpose pins so it wasn't handy in the Beta for general testing.
 
Display board - I did not get one... For same reasons... Felt expensive for what it was and...

Three ways I would checkout how the pin numbers map:

a) I added pages to my excel document up on my github under project teensy documents... That have pages like:
screenshot.jpg

b) I think it was maybe user @luni (Github luni64) who had a table of the mappings... Don't remember if it was #defines, or enum... And/or if a name space was created.

c) I just run a quick and dirty test program that tells me which pin I either connected to 3.3v or gnd... There is one that @defragster and I played with earlier... not sure if he has a more up to date one...
Code:
void setup() {
  Serial.begin(115200);
  while (!Serial && millis() < 4000 );
  Serial.println("Compile Time:: " __FILE__ " " __DATE__ " " __TIME__);
  Serial.printf("Num Digital Pins: %d\n", NUM_DIGITAL_PINS);

  testForShorts();
  
}

uint32_t cnt = 0;
void loop() {
  cnt++;
    allPinTest( cnt );
}

uint32_t pinLast[NUM_DIGITAL_PINS];
void allPinTest( uint32_t cnt ) {
  uint32_t ii, SET;
  Serial.print("PULLDOWN Start Vals:\n  ");
  SET = 0;
  Serial.print("PULLDOWN :: TEST to 3.3V\n  ");
  for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
    pinMode( ii, INPUT_PULLDOWN );
    delayMicroseconds( 5 );
    pinLast[ii] = digitalReadFast( ii );
    if (pinLast[ii]) {
      Serial.print("\nd#=");
      Serial.print( ii );
      Serial.print( " val=" );
    }
    Serial.print( pinLast[ii] );
    Serial.print(',');
  }
  Serial.println();
  Serial.println();
  while ( 1 ) {
    uint32_t jj, dd = 0, cc = 0, ee=4;
    cc = 0;
    for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
      jj = digitalReadFast( ii );
      if ( jj != pinLast[ii] ) {
        dd = 1;
        cc++;
        pinLast[ii] = jj;
        Serial.print("d#=");
        Serial.print( ii );
        if ( pinLast[ii] ) Serial.print( "\t" );
        Serial.print( " val=" );
        Serial.print( pinLast[ii] );
        Serial.print(',');
      }
      if ( cc > 1 && ee ) {
        Serial.println(">>> MULTI CHANGE !!");
        ee--;
      }
      if ( Serial.available() ) {
        while ( Serial.available() ) Serial.read();
        if ( 0 == SET ) {
          SET = 1;
          Serial.print("PULLUP :: TEST TO GND\n  ");
        }
        else {
          SET = 0;
          Serial.print("PULLDOWN :: TEST to 3.3V\n  ");
        }
        for ( ii = 0; ii < NUM_DIGITAL_PINS; ii++) {
          if ( 0 == SET )
            pinMode( ii, INPUT_PULLDOWN );
          else
            pinMode( ii, INPUT_PULLUP );
          delayMicroseconds( 20 );
          pinLast[ii] = digitalReadFast( ii );
          if (SET != pinLast[ii]) {
            Serial.print("d#=");
            Serial.print( ii );
            Serial.print( " val=" );
            Serial.println( pinLast[ii] );
          }
        }
      }
    }
    if ( dd ) {
      dd = 0;
      Serial.println();
      delay( 50 );
    }
  }
}

void testForShorts() {
  uint32_t ii;
  Serial.print("Quick Test for Shorts to adjacent pin");
  Serial.println("First pull pins down and see if the next one follows");
  for ( ii = 0; ii < NUM_DIGITAL_PINS-1; ii++) {
    pinMode( ii+1, INPUT_PULLDOWN );
    pinMode( ii, OUTPUT);
    digitalWrite(ii, HIGH);
    delayMicroseconds( 5 );
    if (digitalRead(ii+1)) {
      Serial.printf("%d:%d ", ii, ii+1);
    }
  }
  Serial.println("\n Now try Pull up and see if setting low follow");
  for ( ii = 0; ii < NUM_DIGITAL_PINS-1; ii++) {
    pinMode( ii+1, INPUT_PULLUP );
    pinMode( ii, OUTPUT);
    digitalWrite(ii, LOW);
    delayMicroseconds( 5 );
    if (!digitalRead(ii+1)) {
      Serial.printf("%d:%d ", ii, ii+1);
    }
  }
  Serial.println();  
}
So if you hit enter it will alternate between checking pins for going high or low, by setting all of the pins with PU or PD... It also tries to detect if multiple pins change...
 
@FrankB - made edits to support MMod and turn off HardFault define: View attachment 24263 (too late here to do PR or edit)

Using (with #ifdef edits to support ARDUINO_TEENSY_MICROMOD above) :: github.com/FrankBoesing/T4_PowerButton
This quick edit to power.ino changes it to RESET when the power button is pressed : in added ZIP above as added examples reset.ino
Code:
#include "T4_PowerButton.h"

void myCallback(void) {
  digitalWriteFast( 13, 1);
[B]  Serial.print(" RESTART Teensy ...");
  delay(100);
  SCB_AIRCR = 0x05FA0004;
  delay(100);[/B]
}

void setup() {
  Serial.begin(115200);
  while (!Serial && millis() < 4000 );

  if (arm_power_button_pressed()) {
    Serial.println("Restart after power down");
  } else {
    Serial.println("First power on");
  }

  pinMode(13, OUTPUT);
  set_arm_power_button_callback(&myCallback); //Start callback
}

void loop() {
  digitalWriteFast( 13, !digitalReadFast(13));
  delay(100);
}

I can't seem to get this working with the attached ZIP file or the git lib: https://github.com/FrankBoesing/T4_PowerButton

The git library tells me the board is not supported. I think ARDUINO_TEENSYMM is not defined?
 
Sorry I have not played much with this library... So hopefully Frank or Tim will take a look.

I do see one issue:
Currently in header file there is:
Code:
#if !defined(ARDUINO_TEENSY40) && !defined(ARDUINO_TEENSY41) && !defined(ARDUINO_TEENSYMM)
Should probably be:
Code:
#if !defined(ARDUINO_TEENSY40) && !defined(ARDUINO_TEENSY41) && !defined(ARDUINO_TEENSY_MICROMOD)

This is from the defines in boards.txt

Edit: Note the power example does not build for me on either T4.1 nor MMOD with current Teensyduino beta build...
 
Back
Top