@@ -41,9 +41,11 @@ Pin GPIO Pin name IRQ ADC Serial Serial TCC/TC TCC/TC
41
41
35 PB03 FLASH_MISO 3 11 - 5/1 6/1 -
42
42
54 PB22 FLASH_MOSI 6 - - 5/2 7/0 -
43
43
55 PB23 FLASH_SCK 7 - - 5/3 7/1 -
44
+ 11 PA11 RX 11 19 0/3 2/3 1/1 0/3
45
+ 10 PA10 TX 10 18 0/2 2/2 1/0 0/2
44
46
12 PA12 MISO 12 - 2/0 4/0 2/0 0/6
45
- 42 PB10 MOSI 10 - - 4/2 5/0 0/4
46
- 43 PB11 SCK 11 - - 4/3 5/1 0/5
47
+ 42 PA12 MOSI 10 - - 4/2 5/0 0/4
48
+ 43 PA13 SCK 11 - - 4/3 5/1 0/5
47
49
23 PA23 SCL 7 - 3/1 5/1 4/1 0/5
48
50
22 PA22 SDA 6 - 3/0 5/0 4/0 0/4
49
51
30 PA30 SWCLK 10 - - 1/2 1/0 -
@@ -127,7 +129,7 @@ Examples for Adafruit ItsyBitsy M0 Express:
127
129
- SPI 1 at pins D11/D12/D13
128
130
- SPI 2 at pins D0/D4/D1
129
131
- SPI 3 at pins D11/D12/D13
130
- - SPI 4 at Pin MOSI/MISO/SCK This is the default SPI device at the MOSI/MISO/SCK labelled pins.
132
+ - SPI 2 at Pin MOSI/MISO/SCK This is the default SPI device at the MOSI/MISO/SCK labelled pins.
131
133
132
134
or other combinations.
133
135
@@ -169,6 +171,8 @@ Pin GPIO Pin name IRQ ADC ADC Serial Serial TC PWM PWM
169
171
22 PA22 D13 6 - - 3/0 5/1 4/0 1/6 0/2
170
172
34 PB02 DOTSTAR_CLK 2 14 - - 5/0 6/0 2/2 -
171
173
35 PB03 DOTSTAR_DATA 9 15 - - 5/1 6/1 - -
174
+ 16 PA16 RX 0 - - 1/0 3/1 2/0 1/0 0/4
175
+ 17 PA17 TX 1 - - 1/1 3/0 2/1 1/1 0/5
172
176
55 PB23 MISO 7 - - 1/3 5/3 7/1 - -
173
177
0 PA00 MOSI 0 - - - 1/0 2/0 - -
174
178
43 PB11 QSPI_CS 12 - - - 4/3 5/1 0/5 1/1
@@ -235,7 +239,7 @@ The I2C devices and signals must be chosen according to the following rules:
235
239
- The SDA signal must be at a Pin with pad numbers 0.
236
240
- The SCL signal must be at a Pin with pad numbers 1.
237
241
238
- Examples for Adafruit ItsyBitsy M0 Express:
242
+ Examples for Adafruit ItsyBitsy M4 Express:
239
243
240
244
- I2C 0 at pins A3/A4
241
245
- I2C 1 at pins D0/D1
@@ -253,7 +257,7 @@ The SPI devices and signals must be chosen according to the following rules:
253
257
- The following pad number pairs are suitable for MOSI/SCK: 0/1 and 3/1.
254
258
- The MISO signal must be at a Pin with a different pad number than MOSI or SCK.
255
259
256
- Examples for Adafruit ItsyBitsy M0 Express:
260
+ Examples for Adafruit ItsyBitsy M4 Express:
257
261
258
262
- SPI 1 at Pin MOSI/MISO/SCK This is the default SPI device at the MOSI/MISO/SCK labelled pins.
259
263
- SPI 3 at pins D13/D11/D12
@@ -296,6 +300,8 @@ Pin GPIO Pin name IRQ ADC ADC Serial Serial TC PWM PWM
296
300
21 PA21 D11 5 - - 5/3 3/3 7/1 1/5 0/1
297
301
22 PA22 D12 6 - - 3/0 5/1 4/0 1/6 0/2
298
302
23 PA23 D13 7 - - 3/1 5/0 4/1 1/7 0/3
303
+ 49 PB17 RX 1 - - 5/1 - 6/1 3/1 0/5
304
+ 48 PB16 TX 0 - - 5/0 - 6/0 3/0 0/4
299
305
54 PB22 MISO 22 - - 1/2 5/2 7/0 - -
300
306
55 PB23 MOSI 7 - - 1/3 5/3 7/1 - -
301
307
35 PB03 NEOPIXEL 9 15 - - 5/1 6/1 - -
@@ -381,6 +387,8 @@ Pin GPIO Pin name IRQ ADC ADC Serial Serial TC PWM PWM
381
387
8 PA08 FLASH_MOSI - 8 2 0/0 2/1 0/0 0/0 1/4
382
388
42 PB10 FLASH_SCK 10 - - - 4/2 5/0 0/4 1/0
383
389
10 PA10 FLASH_WP 10 10 - 0/2 2/2 1/0 0/2 1/6
390
+ 23 PA23 RX 7 - - 3/1 5/0 4/1 1/7 0/3
391
+ 22 PA22 TX 6 - - 3/0 5/1 4/0 1/6 0/2
384
392
14 PA14 MISO 14 - - 2/2 4/2 3/0 2/0 1/2
385
393
12 PA12 MOSI 12 - - 2/0 4/1 2/0 0/6 1/2
386
394
54 PB22 NEOPIXEL 22 - - 1/2 5/2 7/0 - -
@@ -429,6 +437,13 @@ Pin GPIO Pin name IRQ ADC Serial Serial TCC/TC TCC/TC
429
437
5 PA05 A9_D9 5 5 - 0/1 0/1 -
430
438
6 PA06 A10_D10 6 6 - 0/2 1/0 -
431
439
18 PA18 RX_LED 2 - 1/2 3/2 3/0 0/2
440
+ 41 PB09 RX 9 3 - 4/1 4/1 -
441
+ 40 PB08 TX 8 2 - 4/0 4/0 -
442
+ 8 PA08 SDA - 16 0/0 2/0 0/0 1/2
443
+ 9 PA09 SCL 9 17 0/1 2/1 0/1 1/3
444
+ 6 PA06 MOSI 6 6 - 0/2 1/0 -
445
+ 5 PA05 MISO 5 5 - 0/1 0/1 -
446
+ 7 PA07 SCK 7 7 - 0/3 1/1 -
432
447
30 PA30 SWCLK 10 - - 1/2 1/0 -
433
448
31 PA31 SWDIO 11 - - 1/3 1/1 -
434
449
19 PA19 TX_LED 3 - 1/3 3/3 3/1 0/3
@@ -503,6 +518,8 @@ Pin GPIO Pin name IRQ ADC Serial Serial TCC/TC TCC/TC
503
518
43 PB11 SCK 11 - - 4/3 5/1 0/5
504
519
23 PA23 SCL 7 - 3/1 5/1 4/1 0/5
505
520
22 PA22 SDA 6 - 3/0 5/0 4/0 0/4
521
+ 11 PA11 RX 11 19 0/3 2/3 1/1 0/3
522
+ 10 PA10 TX 10 18 0/2 2/2 1/0 0/2
506
523
30 PA30 SWCLK 10 - - 1/2 1/0 -
507
524
31 PA31 SWDIO 11 - - 1/3 1/1 -
508
525
24 PA24 USB_DM 12 - 3/2 5/2 5/0 1/2
@@ -518,9 +535,9 @@ Adafruit ItsyBitsy M0 Express :ref:`samd21_pinout_table`.
518
535
519
536
The default devices at the board are:
520
537
521
- - UART 5 at pins PB23/PB22 , labelled RX/TX
538
+ - UART 2 at pins PA11/PA10 , labelled RX/TX
522
539
- I2C 3 at pins PA22/PA23, labelled SDA/SCL
523
- - SPI 4 at pins PA10 /PA12/PA11 , labelled MOSI, MISO and SCK
540
+ - SPI 4 at pins PB10 /PA12/PB11 , labelled MOSI, MISO and SCK
524
541
- DAC output on pin PA02, labelled A0
525
542
526
543
Adafruit Trinket M0 pin assignment table
@@ -536,6 +553,13 @@ Pin GPIO Pin name IRQ ADC Serial Serial TCC/TC TCC/TC
536
553
6 PA06 D4 6 6 - 0/2 1/0 -
537
554
1 PA01 DOTSTAR_CLK 1 - - 1/1 2/1 -
538
555
0 PA00 DOTSTAR_DATA 0 - - 1/0 2/0 -
556
+ 7 PA07 RX 7 7 - 0/3 1/1 -
557
+ 6 PA06 TX 6 6 - 0/2 1/0 -
558
+ 8 PA08 SDA - 16 0/0 2/0 0/0 1/2
559
+ 9 PA09 SCL 9 17 0/1 2/1 0/1 1/3
560
+ 6 PA06 MOSI 6 6 - 0/2 1/0 -
561
+ 9 PA09 MISO 9 17 0/1 2/1 0/1 1/3
562
+ 7 PA07 SCK 7 7 - 0/3 1/1 -
539
563
10 PA10 LED 10 18 0/2 2/2 1/0 0/2
540
564
30 PA30 SWCLK 10 - - 1/2 1/0 -
541
565
31 PA31 SWDIO 11 - - 1/3 1/1 -
@@ -716,8 +740,10 @@ Pin GPIO Pin name IRQ ADC ADC Serial Serial TC PWM PWM
716
740
34 PB02 DOTSTAR_CLK 2 14 - - 5/0 6/0 2/2 -
717
741
35 PB03 DOTSTAR_DATA 9 15 - - 5/1 6/1 - -
718
742
15 PA15 LED 15 - - 2/3 4/3 3/1 2/1 1/3
719
- 55 PB23 MISO 7 - - 1/3 5/3 7/1 - -
720
- 54 PB22 MOSI 22 - - 1/2 5/2 7/0 - -
743
+ 16 PA16 RX 0 - - 1/0 3/1 2/0 1/0 0/4
744
+ 17 PA17 TX 1 - - 1/1 3/0 2/1 1/1 0/5
745
+ 55 PB23 MOSI 7 - - 1/3 5/3 7/1 - -
746
+ 54 PB22 MISO 22 - - 1/2 5/2 7/0 - -
721
747
43 PB11 QSPI_CS 12 - - - 4/3 5/1 0/5 1/1
722
748
8 PA08 QSPI_D0 - 8 2 0/0 2/1 0/0 0/0 1/4
723
749
9 PA09 QSPI_D1 9 9 3 0/1 2/0 0/1 0/1 1/5
@@ -893,6 +919,8 @@ Pin GPIO Pin name IRQ ADC ADC Serial Serial TC PWM PWM
893
919
11 PA11 FLASH_MISO 11 11 - 0/3 2/3 1/1 0/3 1/7
894
920
8 PA08 FLASH_MOSI - 8 2 0/0 2/1 0/0 0/0 1/4
895
921
9 PA09 FLASH_SCK 9 9 3 0/1 2/0 0/1 0/1 1/5
922
+ 13 PA13 RX 13 - - 2/1 4/0 2/1 0/7 1/3
923
+ 12 PA12 TX 12 - - 2/0 4/1 2/0 0/6 1/2
896
924
43 PB11 MISO 12 - - - 4/3 5/1 0/5 1/1
897
925
44 PB12 MOSI 12 - - 4/0 - 4/0 3/0 0/0
898
926
55 PB23 RXD 7 - - 1/3 5/3 7/1 - -
@@ -931,7 +959,7 @@ Adafruit ItsyBitsy M4 Express :ref:`samd51_pinout_table`.
931
959
The default devices at the board are:
932
960
933
961
- UART 2 at pins PA13/PA12, labelled RXD/TXD
934
- - I2C 5 at pins PA22/PA23, labelled SDA/SCL
962
+ - I2C 3 at pins PA22/PA23, labelled SDA/SCL
935
963
- SPI 4 at pins PB12/PB11/PB13, labelled MOSI, MISO and SCK
936
964
- DAC output on pins PA02 and PA05, labelled A0 and A4
937
965
@@ -1163,22 +1191,22 @@ The tables shown above were created with small a Python script running on the ta
1163
1191
else:
1164
1192
return "zzzzzzz%03d" % i[0]
1165
1193
1166
- def table(num=127, sort=True):
1167
- pintbl = []
1168
- inv_bd = {v: k for k, v in Pin.board.__dict__.items()}
1169
- for i in range(num):
1170
- try:
1171
- p = Pin(i)
1172
- pi = pininfo(p)
1173
- if p in inv_bd.keys():
1174
- name = inv_bd[p]
1175
- else:
1176
- name = ""
1177
- pintbl.append((i, name, pininfo(i)))
1178
- except:
1179
- pass
1180
- # print("not defined")
1194
+ def pinnum(p):
1195
+ return (ord(p[1]) - ord("A")) * 32 + int(p[2:])
1181
1196
1197
+ def table(num = 127, sort=True):
1198
+ pintbl = []
1199
+ pinlist = []
1200
+ for name in Pin.board.__dict__.keys():
1201
+ p = Pin(name)
1202
+ pi = pininfo(p)
1203
+ pintbl.append((pinnum(pi[0]), name, pi))
1204
+ pinlist.append(p)
1205
+ for pc in Pin.cpu.__dict__.keys():
1206
+ p = Pin(pc)
1207
+ pi = pininfo(p)
1208
+ if not p in pinlist:
1209
+ pintbl.append((pinnum(pi[0]), "", pi))
1182
1210
if sort:
1183
1211
pintbl.sort(key=tblkey)
1184
1212
for item in pintbl:
0 commit comments