MicroMod Beta Testing

There is a lot of capability built into this board! I started making a KiCAD symbol, matched back to the Teensy 4.1 pin numbers, and labeled the additionally functionality. I realize this is what Kurt had in the excel table, but it was easier for me to visualize on the schematic. So we get: 2 SPI buses, all 3 CAN buses, 6 UARTs, 3 I2C, and a heap of Analog input and PWM output depending on how the pins are configured.

View attachment 25193

Note, I'm a robotics guy so the audio functionality was ignored. Also, the USB pin numbers might be incorrect, the Sparkfun schematic and hookup guide had some discrepancies.

Just an FYI - There are 3 SPI busses and 4 Wire objects and I think 7 Uarts... Again the Excel document where they all are. But for example some are on the SDIO pins...
 
The question came up on Twitter... whether RMII for ethernet is possible. Certainly the pins we use on Teensy 4.1 aren't routed.

But it might be possible to bring out RMII for the 2nd ethernet controller, using these pins.

Code:
 RMII    NXP Pin        Schematic       M.2 Pin
 ----    -------        ---------       -------
 RX0     SD_B0_03       34/DAT1           66
 RX1     SD_B0_04       38/DAT2           68
 RXEN    SD_B0_05       39/DAT3           70
 RXER    B1_00          AUD_IN/8          54
 TX0     B0_12          GPIO/32           65
 TX1     EMC_31         I2C_INT/29        16
 TXEN    EMC_32         GPIO/28/3.3V_EN    4
 CLK     SD_B0_01       36/CLK            60
 MDC     B0_00          CS/10             55
 MDIO    B0_01          CIPO/12           61

Whether this is ever even attempted by anyone remains an open question. Just thought I'd put it here, in case anyone is wondering or asks.
 
Just an FYI - There are 3 SPI busses and 4 Wire objects and I think 7 Uarts... Again the Excel document where they all are. But for example some are on the SDIO pins...

Thanks! I missed that MMOD Pin 4 was a UART. For MMOD Pin 40 and Pin 42, your spreadsheet has those as I2C buses, but when I look at the Teensy 4.1 pinout for Pins 40 and 41 (the corresponding Teensy pins), they only show up as analog input.
 
Last edited:
Note on MMOD Pins 40-45 are totally different (i.e. unique) than pins 40... on T4 and T4.1... They are unique to the MMOD.
They have the advantage that it filled in GPIO2(GPIO6) as well as FlexIO2
So for example on GPIO2 You ahve pins 0-12, 16-17, Which also corresponds to same FlexIO pins as you can see in the readme...
https://github.com/KurtE/FlexIO_t4
 
Note on MMOD Pins 40-45 are totally different (i.e. unique) than pins 40... on T4 and T4.1... They are unique to the MMOD.
They have the advantage that it filled in GPIO2(GPIO6) as well as FlexIO2
So for example on GPIO2 You ahve pins 0-12, 16-17, Which also corresponds to same FlexIO pins as you can see in the readme...
https://github.com/KurtE/FlexIO_t4

On your spreadsheet, I think MMOD Pin 17 and Pin 19 are swapped.
 
It has arrived. Its tiny.

IMG_6705.jpg
 
@defragster - @KurtE

Played a bit more with our camera stuff and think I got the issue with having to power off/on fixed - at least its not happening to me since I made the change but you seem to find stuff. I pushed the change up to github if you want to play some more.

Basically had to fix the reset command and then used it in out init function so it does a reset to load the default registers first then our selected config. Seems to have worked.

I also added in the flip/mirror commands into the sketch - that may fix your mirror problem.
 
Afternoon all
Had a little fun this morning with the video and YouTube so I add a short video of the example sketch for the micromod and camera:

 
@defragster - @KurtE

Played a bit more with our camera stuff and think I got the issue with having to power off/on fixed - at least its not happening to me since I made the change but you seem to find stuff. I pushed the change up to github if you want to play some more.

Basically had to fix the reset command and then used it in out init function so it does a reset to load the default registers first then our selected config. Seems to have worked.

I also added in the flip/mirror commands into the sketch - that may fix your mirror problem.

Got the updated: github.com/mjs513/TMM-HB01B0-Camera/blob/main/TMM-HM01B0/examples/HM01B0_ML_example/HM01B0_ML_example.ino and saw no troubles on a couple of restarts! { until my display wires came loose :( }

Going to rewire better with the ILI9341 as it may be better than the #ifdef TFT_ST7789 I haven't seen in some time.

Video of the MMod w/HM01B0 camera looks the same here - except the hand and desk are different :)

You forgot an important person in the credits :: @mjs513 :)

Mirror wasn't a problem - just kept seeing it change it seems when USE_SPARKFUN came and went between updates and missed any note about it being understood.


FOR THOSE GETTING a new Teensy MicroMod :
Code:
'BOOT' is the Program Button
and holding 'RESET' is Power Off/On

As noted the USB connector is USB-C

And SparkFun uses Push/Push SD card sockets with spring release not the Push/Pull type.

The HM01B0 camera was a good project to exercise the T_MM - using Display, SD, and the CAM pins - only extension was the i2c SSD1306 at times - otherwise the T_MM is just another T_4.x with a unique pin set.

And yes the TINY processor board gets big when put onto a carrier - but when the pins provided work on the right carrier it can be smaller overall with less 'hand' wiring.
 
Two Teensy_MMods arrived Monday ... finally put one on the Display Carrier.

The sparkfun.com/tutorials/sparkfun-micromod-input-and-display-carrier-board-hookup-guide almost useless ???

Nothing demo'ing the buttons and LEDS they put an AVR on for reading ... or the SD adapter or the speaker ???

But this seems to work for some display images: SparkFun HyperDisplay 4DLCD-320240
Had assumed the display was a standard ILI9341 - but it is that 4DLCD thing? The page links to more useless Hyper libs not complete or proper for the included display?

Suggests it is like ILI9341 but color inverted? Running the ILI9341_t3 didn't show anything? Maybe the backlight was off ... seeing that now as PWM0 pin
<edit> Needed these changes - opps that is ILI9488- runs okay - but DEMOSAUCE words are shifted:
Code:
// The display uses hardware SPI, plus #9 & #10
#define TFT_CS 4 //10
#define TFT_DC  5 //9


Found this to work : ...\libraries\HyperDisplay_4DLCD-320240_ArduinoLibrary-master\examples\Example1_DisplayTest\Example1_DisplayTest.ino

And this one is sort of cool : \libraries\HyperDisplay_4DLCD-320240_ArduinoLibrary-master\examples\Example3_AdvancedHyperDisplay\Example3_AdvancedHyperDisplay.ino

But needed the below to MAP - didn't #defines get put in to map the SFun pin names somewhere? Maybe that was just in a user library.
Code:
#define PWM_PIN 3 // PWM0             // Pin definitions
#define CS_PIN 4 // D0
#define DC_PIN 5 // D1

Same changes for ILI9341 - colors were okay - until repowered after running 4DLCD, this seems to run graphicsTest okay:
Code:
ILI9341 Test!
Display Power Mode: 0x9C
MADCTL Mode: 0x48
Pixel Format: 0x5
Image Format: 0x0
Self Diagnostic: 0xC0
Benchmark                Time (microseconds)
Screen fill              205450
Text                     9307
Proportional Text        9750
Lines                    70386
Horiz/Vert Lines         17465
Rectangles (outline)     11198
Rectangles (filled)      422026
Circles (filled)         67285
Circles (outline)        48622
Triangles (outline)      16541
Triangles (filled)       146005
Rounded rects (outline)  17821
Rounded rects (filled)   467962
Done!

Hopefully this is the best and complete/correct version of mapping?
On a different note from the HB01B0 camera. Was looking at what @luni did and looking at the pins_arduino.h file and was wondering if it would worth it to add @luni's pinouts to the pins_arduino.h file like this:
Code:
#if defined(ARDUINO_TEENSY_MICROMOD)
    //GPIO ---------------------------------------
    constexpr uint8_t G0  = 40; // GPIO7-04--
    constexpr uint8_t G1  = 41; // GPIO7-05  |
    constexpr uint8_t G2  = 42; // GPIO7-06  |
    constexpr uint8_t G3  = 43; // GPIO7-07  | 8 bit bus G0-G7
    constexpr uint8_t G4  = 44; // GPIO7-08  |
    constexpr uint8_t G5  = 45; // GPIO7-09  |
    constexpr uint8_t G6  = 6;  // GPIO7-10  |
    constexpr uint8_t G7  = 9;  // GPIO7-11--
    constexpr uint8_t G8  = 26; // GPIO6-30
    constexpr uint8_t G9  = 32; // GPIO7-12  & CAM_HSYNC
    constexpr uint8_t G10 = 33; // GPIO9-07  & CAM_VSYNC
    constexpr uint8_t G11 = 27; // GPIO6-31  & A13

[B]    constexpr uint8_t D0  = 4;  // GPIO9-06
    constexpr uint8_t D1  = 5;  // GPIO9-08


    // DAC / PWM ---------------------------------
    constexpr uint8_t PWM0 = 3;[/B]
    constexpr uint8_t PWM1 = 2;

    // UARTs -------------------------------------
    constexpr uint8_t TX1 = 1; // Serial 1
    constexpr uint8_t RX1 = 0;
    //constexpr uint8_t RTS1 = ?; // not in schematic
    //constexpr uint8_t CTS1 = ?; // not in schematic
    constexpr uint8_t TX2 = 17; // Serial 2
    constexpr uint8_t RX2 = 16;

    // I2C ---------------------------------------
    constexpr uint8_t I2CINT = 29;
    constexpr uint8_t SCL1   = A10;
    constexpr uint8_t SDA1   = A11;

    // SPI --------------------------------------
    constexpr uint8_t SCK  = 13;  // & LED_BUILTIN
    constexpr uint8_t CIPO = 12;
    constexpr uint8_t MISO = 12;
    constexpr uint8_t COPI = 11;
    constexpr uint8_t MOSI = 11;
    constexpr uint8_t CS   = 10;

    constexpr uint8_t SCK1  = 36;  // & SDIO_CLK
    constexpr uint8_t CIPO1 = 35;  // & SDIO_DATA0
    constexpr uint8_t MISO1 = 35;  // & SDIO_DATA0
    constexpr uint8_t COPI1 = 37;  // & SDIO_CMD
    constexpr uint8_t MOSI1 = 37;  // & SDIO_CMD
    constexpr uint8_t CS1   = 39;  // & SDIO_DATA3

    // SDI --------------------------------------
    constexpr uint8_t SDIO_CLK   = 36; // & SCK1
    constexpr uint8_t SDIO_CMD   = 37; // & COPI1 / MOSI1
    constexpr uint8_t SDIO_DATA0 = 35; // & CIPO1 / MISO1
    constexpr uint8_t SDIO_DATA1 = 34; 
    constexpr uint8_t SDIO_DATA2 = 38;
    constexpr uint8_t SDIO_DATA3 = 39;  // & SPI CS1

    // CAN --------------------------------------
    constexpr uint8_t CAN_TX = 31;
    constexpr uint8_t CAN_RX = 30;

    // CAMERA -----------------------------------
    constexpr uint8_t CAM_TRIG  = D1;
    constexpr uint8_t CAM_HSYNC = G9;
    constexpr uint8_t CAM_VSYNC = G10;
    constexpr uint8_t CAM_MCLK  = 7;
    constexpr uint8_t CAM_PCLK  = 8;

    // AUDIO -----------------------------------
    constexpr uint8_t AUD_MCLK = 23;        // & A9;
    constexpr uint8_t AUD_OUT   = CAM_MCLK;
    constexpr uint8_t AUD_IN    = CAM_PCLK;
    constexpr uint8_t AUD_LRCLK = A6;
    constexpr uint8_t AUD_BCLK  = A7;

    // Misc
    constexpr uint8_t BATT_VIN = A8;
#endif
 
Last edited:
On a different note from the HB01B0 camera. Was looking at what @luni did and looking at the pins_arduino.h file and was wondering if it would worth it to add @luni's pinouts to the pins_arduino.h

I'm afraid that putting those short/generic names in the global namespace calls for trouble with third party libraries. Might be a good idea to put them in their own namespace. I.e.

Code:
namespace MM  // or another suitable namespace name
{
    //GPIO ---------------------------------------
    constexpr uint8_t G0  = 40; // GPIO7-04--
    constexpr uint8_t G1  = 41; // GPIO7-05  |
    constexpr uint8_t G2  = 42; // GPIO7-06  |
    constexpr uint8_t G3  = 43; // GPIO7-07  | 8 bit bus G0-G7
    constexpr uint8_t G4  = 44; // GPIO7-08  |
    constexpr uint8_t G5  = 45; // GPIO7-09  |
    // ....
}

Users can then decide to use them either fully qualified:
Code:
digitalWriteFast(MM::G3, HIGH);
digitalToggleFast(MM::G0);

or, (if there are no clashes with other libraries) simply pull in the complete namespace:
Code:
using namespace MM;

digitalWriteFast(G3, HIGH);
digitalToggleFast(G0);
 
Two Teensy_MMods arrived Monday ... finally put one on the Display Carrier.

The sparkfun.com/tutorials/sparkfun-micromod-input-and-display-carrier-board-hookup-guide almost useless ???

Nothing demo'ing the buttons and LEDS they put an AVR on for reading ... or the SD adapter or the speaker ???

But this seems to work for some display images: SparkFun HyperDisplay 4DLCD-320240
Had assumed the display was a standard ILI9341 - but it is that 4DLCD thing? The page links to more useless Hyper libs not complete or proper for the included display?

Suggests it is like ILI9341 but color inverted? Running the ILI9341_t3 didn't show anything? Maybe the backlight was off ... seeing that now as PWM0 pin
<edit> Needed these changes - opps that is ILI9488- runs okay - but DEMOSAUCE words are shifted:

Morning @defragster.

Back in post #459 I had tested the display board with the T.MM and
Yeah broke down and tested the Sparkfun Input/Display Carrier board. The display is 9341 compatible. Did get it working with the 9341 library but had to add a command - invert display on, then it worked with what we normally use for the 9341 without the need for 2 extra libraries.

So for the packaged ILI9341_t3 library or @KurtE's ILI9341_t3n you can use:
Code:
tft.invertDisplay(true);
as opposed to editing the init command list as I did in that previous post.

EDIT:
As a quick test I ran the Buddhabrot example using the ILI9341_t3n with just making the changes for cs/dc/rst and the invertDisplay function call (not need to play with BL):
 
Last edited:
Morning all (at least for me):

My two MMod Teensy boards arrived Monday, picked up yesterday... Still have not plugged them in yet... Still just using the beta 1.

Don't have the display board, so can not help there.

I agree with Luni that a different name space for their pin names would be good.

I am sort of waiting to see if the boards I ordered from PCBWay will work or not. As an experiement, I am having them mostly assemble a few of them to play with. I think it is the size of the newer 3.2" ILI9341 display
Also hopefully I have holes setup that it can be screwed on with standoffs to either the 3.2 or 2.8", plus SDIO, USB host, connector for camera matches the OV7670, plus either DXL or LSS servos....
Sort of a kitchen sink!

screenshot.jpg


But should be fun!

Edit: also as it is for my own testing, I can instead plug in some Adafruit displays...
 
@defragster - @luni - @KurtE

'm afraid that putting those short/generic names in the global namespace calls for trouble with third party libraries. Might be a good idea to put them in their own namespace. I.e.

I think we had that discussion when we all first started discussing using the TMM names and came to the same conclusion.
 
I'm afraid that putting those short/generic names in the global namespace calls for trouble with third party libraries. Might be a good idea to put them in their own namespace. I.e.

Code:
namespace MM  // or another suitable namespace name
{
    //GPIO ---------------------------------------
    constexpr uint8_t G0  = 40; // GPIO7-04--
    constexpr uint8_t G1  = 41; // GPIO7-05  |
    constexpr uint8_t G2  = 42; // GPIO7-06  |
    constexpr uint8_t G3  = 43; // GPIO7-07  | 8 bit bus G0-G7
    constexpr uint8_t G4  = 44; // GPIO7-08  |
    constexpr uint8_t G5  = 45; // GPIO7-09  |
    // ....
}

Users can then decide to use them either fully qualified:
Code:
digitalWriteFast(MM::G3, HIGH);
digitalToggleFast(MM::G0);

or, (if there are no clashes with other libraries) simply pull in the complete namespace:
Code:
using namespace MM;

digitalWriteFast(G3, HIGH);
digitalToggleFast(G0);

Note - the @luni :
github.com/luni64/TeensyHelpers/.../src/MicroMod/MicroModT4.h

header file exists with namespace MMT to map SFUN names to Teensy Pins:
Code:
[B]namespace MMT[/B]
{
    //GPIO ---------------------------------------
    constexpr uint8_t G0  = 40; // GPIO7-04--
...
 
@PaulStoffregen - @defragster - @KurtE

I decided to play around again with the Teensy Micromod to Teensy Pinout graphic that I was playing in the beginning - did update for the changes to I2C and Serial (yes I was wrong on SPI). Think this is pretty close - if anything is missing let me know. If I get ambitious maybe I will make it look cleaner:
[Original Image Deleted]

Updated pinout :
Picture1.jpg

EDIT:
Ok already see 3 things I missed A14, and A15.
 
Last edited:
@mjs513 - Nice work! The early map was handy in Beta. Are there ANY unique pins brought to the SWD pins?

Are the lower edge Qwiic ports Wire left and Wire1 right?

I got another of these ATP's with T_MM production order ... even after some desk clearing I still have not found the original ATP ordered for the Beta testing :( It got set aside with the arrival of the PJRC board ,,, maybe tucked in a box ...
 
My partially assembled ones were shipped from PCBWay and should be here maybe Tuesday.
screenshot.jpg
Should be fun. We found a few issues in the assembly, like the 3v VR has a SOT89-5 pattern (U1), but the diptrace pattern is screwy... So they did not install. I will probably clip the part a bit to not short and/or simply use my solder jumper to use 3.3v VR of the Teensy MMOD.

Which also reminds me, I should try to order one of the larger PJRC ILI9341 displays to see if my mounting holes line up properly... (I have holes for hopefully either the 3.2 or the 2.8)

Will be fun!
 
@mjs513 - Nice work! The early map was handy in Beta. Are there ANY unique pins brought to the SWD pins?

Are the lower edge Qwiic ports Wire left and Wire1 right?

I got another of these ATP's with T_MM production order ... even after some desk clearing I still have not found the original ATP ordered for the Beta testing :( It got set aside with the arrival of the PJRC board ,,, maybe tucked in a box ...

Thanks - figured it was time to update it.

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.

I know what you mean - I just found my ATP board that I got during Beta testing - just found it a couple of days ago.
 
My partially assembled ones were shipped from PCBWay and should be here maybe Tuesday.
....
Should be fun. We found a few issues in the assembly, like the 3v VR has a SOT89-5 pattern (U1), but the diptrace pattern is screwy... So they did not install. I will probably clip the part a bit to not short and/or simply use my solder jumper to use 3.3v VR of the Teensy MMOD.

Which also reminds me, I should try to order one of the larger PJRC ILI9341 displays to see if my mounting holes line up properly... (I have holes for hopefully either the 3.2 or the 2.8)

Will be fun!

Should be a lot of fun - can always use the ILI9488 as well :)
 
Back
Top