How many GPIO pins is the Blue Pill supposed to have?
-
- Posts: 14
- Joined: Sat Sep 17, 2022 4:12 pm
How many GPIO pins is the Blue Pill supposed to have?
When I count all the GPIO pins that are broken-out, I find only 35 GPIO pins but I see multiple source online say that there are 37. Are some of them not broken-out? Thanks.
PD0 and PD1 are used for external 8MHz crystal.
Go to full postRe: How many GPIO pins is the Blue Pill supposed to have?
things like PC13 goes to the LED, 2 pins goes to USB, some of them are at the swd header
another 1 or 2 pins is used at the 32 khz crystal
and possibly some may not be broken out
mainly, for gpios they need to have PAxx ... Pyxx naming
for more pins, 'usual' solutions are:
- get a bigger chip/board e.g RE, RG suffix series, VE, VG suffix series, or even ZE, ZG series
- use 'io extenders' chips
- use shift registers e.g. 74hc595
https://www.nexperia.com/products/analo ... CT595.html
- use multiplexers
- use buses - this is the most interesting, e.g. 74hc245?
https://www.nexperia.com/products/analo ... CT245.html
(74hc245 are 'cheap', i'd think mainly because it is widely stocked, often 'abused' as 'buffers'
https://www.aliexpress.com/wholesale?ca ... xt=74hc245
(e.g. share 8 pins between a few 74hc245, I think they can be 'tristated', in that way maybe you can 'enable' banks of 8 pins of 74hc245 by controlling the tristate), but of course this is more troublesome and not always possible.
buses are 'hard' as you need to arbitrate the bus access, e.g. round robin etc, more or less multiplexing.
i found something even more exoteric
74hc573 octal latch
https://www.nexperia.com/products/analo ... CT573.html
that makes it output with memory
another 1 or 2 pins is used at the 32 khz crystal
and possibly some may not be broken out
mainly, for gpios they need to have PAxx ... Pyxx naming
for more pins, 'usual' solutions are:
- get a bigger chip/board e.g RE, RG suffix series, VE, VG suffix series, or even ZE, ZG series
- use 'io extenders' chips
- use shift registers e.g. 74hc595
https://www.nexperia.com/products/analo ... CT595.html
- use multiplexers
- use buses - this is the most interesting, e.g. 74hc245?
https://www.nexperia.com/products/analo ... CT245.html
(74hc245 are 'cheap', i'd think mainly because it is widely stocked, often 'abused' as 'buffers'
https://www.aliexpress.com/wholesale?ca ... xt=74hc245
(e.g. share 8 pins between a few 74hc245, I think they can be 'tristated', in that way maybe you can 'enable' banks of 8 pins of 74hc245 by controlling the tristate), but of course this is more troublesome and not always possible.
buses are 'hard' as you need to arbitrate the bus access, e.g. round robin etc, more or less multiplexing.
i found something even more exoteric
74hc573 octal latch
https://www.nexperia.com/products/analo ... CT573.html
that makes it output with memory
Re: How many GPIO pins is the Blue Pill supposed to have?
Or you can use another mcu as a slave. You get to design our own protocol.
Re: How many GPIO pins is the Blue Pill supposed to have?
PD0 and PD1 are used for external 8MHz crystal.