Circuit Python on Teensy 4, 4.1 and soon MicroMod.

KurtE

Senior Member+
Just thought I would mention, that @mjs513 and myself have been playing around with MicroPython on the Teensy4 and 4.1 and thought it might be
interesting to also have it run on the MicroMod Teensy,

So we started to add support for it. We now have a version working on the Micromod, which I now have an active PR back to CircuitPython to support it.

Currently it is in my Fork of the CircuitPython, branch: teensyMM

In the current version of it, I setup the boards object with the pin names centered around Teensy pin numbers, but I also added in Micromod pin numbers geared around
the names on the ATP board.

We have also been started to keep a few test sketches (https://github.com/KurtE/circuitPython_sketches) as we go along. Like I created on sort of like the High Low test, which has helped me to see how the mappings are

currently working:
Code:
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:

Setting all pins to PULL up - so test by jumpering pins to GND
A Python version of the Pin High/Low test
Simple keyboard interface
	Empty line, will toggle between IO pins Pulled UP and Pulled Down
	p - print pin table out showing all pin names for pin
	. - will toggle printing progress dots on or off
p
*** Serial input *** p

Enum pin list
Physical Pins	Logical Names
D10 	 D10 MM_CS
D11 	 D11 MM_COPI MOSI
D12 	 D12 MISO MM_CIPO
D14 	 D14 A0 MM_A0 TX3
D15 	 D15 A1 MM_A1 RX3
D16 	 D16 A2 MM_RX2 RX2
D17 	 D17 A3 MM_TX2 TX2
D18 	 D18 A4 MM_SDA SDA SDA0
D19 	 D19 A5 MM_SCL SCL SCL0
D1 	 D1 MM_TX TX TX1
D13 	 D13 MM_SCK SCK
D2 	 D2 MM_PWM1
D0 	 D0 MM_RX RX RX1
D3 	 D3 MM_PWM0
D4 	 D4 MM_D0
D5 	 D5 MM_D1
D32 	 D32 MM_G9
D33 	 D33 MM_G10
D23 	 D23 A9 MM_MCLK
D22 	 D22 A8 MM_BATT_VIN3
D21 	 D21 A7 MM_I2S_CLK RX5
D20 	 D20 A6 MM_I2S_FS TX5
D34 	 D34 DAT1 MM_DAT1
D27 	 D27 A13 MM_G11
D26 	 D26 A12 MM_G8
D25 	 D25 A11 MM_SDA1 RX6
D24 	 D24 A10 MM_SCL1 TX6
D36 	 D36 CLK MM_SCK1
D29 	 D29 MM_I2C_INT TX7
D28 	 D28 MM_33V_EN RX7
D37 	 D37 CMD MM_COPI1
D30 	 D30 MM_CAN_RX
D31 	 D31 MM_CAN_TX
D35 	 D35 DAT0 MM_CIPO1 MM_DAT0
D38 	 D38 DAT3 MM_CS1 MM_DAT3
D45 	 D45 BUS5 MM_G5
D44 	 D44 BUS4 MM_G4
D39 	 D39 DAT2 MM_DAT2
D6 	 D6 MM_G6
D41 	 D41 BUS1 MM_G1
D40 	 D40 BUS0 MM_G0
D43 	 D43 BUS3 MM_G3
D42 	 D42 BUS2 MM_G2
D7 	 D7 MM_I2S_SDO RX4
D8 	 D8 MM_I2S_SDI TX4
D9 	 D9 MM_G7
LOW: D14 A0 MM_A0 TX3
HIGH: D14 A0 MM_A0 TX3
LOW: D15 A1 MM_A1 RX3
HIGH: D15 A1 MM_A1 RX3
LOW: D3 MM_PWM0
HIGH: D3 MM_PWM0
LOW: D2 MM_PWM1
HIGH: D2 MM_PWM1
LOW: D41 BUS1 MM_G1
HIGH: D41 BUS1 MM_G1

I have also played with the UART code, currently in the beta build and the source build there is an issue for Serial2.

Also @mjs513 has also been doing testing on I2C and SPI...

Not sure who all might be interested in this, but it is giving me an excuse to be able to do some coding in python ;)
 
Been playing, WIP to add some more board names for the Serial ports, like TX2, RX2...
Current images off of my MM branch, plus updates for names in t4 and 41
plus hack to make UART4 work (Serial2 on t4...)

Now to setup to issue PR to add those symbols...
 

Attachments

  • CircuitPython_images_t4x.zip
    1.4 MB · Views: 24
@KurtE - Great Stuff!! Just downloaded and will try it out. Been playing with dual serial which is also working well.

Going through all of my old boards and testing serial comms through a T4.1 USB host port. Just finished reviving my Chumby Hacker board. Still have a lot of the original software for it so I was able to create a new SD card for it and get it up and running again.

Chumby Hacker board->T4.1 USB host port->USB host serial sketch->USB host port on laptop->Minicom. Worked the same as it would connected directly to the laptop USB host port:)

Have a lot of other old hardware to go through and revive. It's something to do till things happen on the Teensy front:)
 
Back
Top