This QT Py does not run CircuitPython or MicroPython and cannot use any Arduino libraries because its compiler is for C, not C++.
PrettyPins PDF on GitHub.
- USB-C port - This is used for both powering and programming the board. You can power it with any USB C cable.
- 3V - This pin is the output from the 3.3V regulator, it can supply 600mA peak.
- GND - This is the common ground for all power and logic.
- 5V - This is 5V out from the USB port.
The CH552 is an 'enhanced' E8051 core microcontroller, compatible with the MCS51 instruction set but with 8 to 15 times faster instruction execution speed. You can run this core at 16MHz and 3.3V logic. It has the following features:
- 16K program FLASH memory
- 256-byte internal RAM
- 1K-byte internal xRAM (xRAM supports DMA)
- 4 built-in ADC channels
- Capacitive touch support
- 2 timers / PWM channels
- UART
- SPI
- Full-speed USB device controller
There are ten GPIO pins broken out to pins. There is hardware I2C, UART, and SPI. Note that A2 and MOSI share the same pin (P1.5).
Four pins are 8-bit analog inputs (A0, A1, A2 and A3).
You can do PWM output on four of the pins (A2/MOSI, SDA, RX and TX).
There are five pins (A0, A1, A2/MOSI, A3, MISO and SCK) that can do capacitive touch without any external components needed.
I2C
Note that the CH552 does not have a 'native' I2C peripheral, so in CH55xduino this is bit-banged. However, we will call these the I2C pins
- SCL - This is the I2C clock pin. There is no pull-up on this pin, so for I2C please add an external pull-up if the breakout doesn't have one already. It's connected to P3.3.
- SDA - This is the I2C data pin. There is no pull-up on this pin, so for I2C please add an external pull-up if the breakout doesn't have one already. It's connected to P3.4.
These pins are also connected to the STEMMA QT port.
UART
- RX - This is the UART receive pin. Connect to TX (transmit) pin on your sensor or breakout. It's connected to P3.0.
- TX - This is the UART transmit pin. Connect to RX (receive) pin on your sensor or breakout. It's connected to P3.1.
SPI
- SCK - This is the SPI clock pin. It's connected to P1.7.
- MI - This is the SPI Microcontroller In / Sensor Out pin. It's connected to P1.6.
- MO - This is the SPI Microcontroller Out / Sensor In pin. Note that this pin is shared with A2! This pin can do capacitive touch and is one of the four ADC inputs. It's connected to P1.5.
The A2 pin is the same as MOSI pin.
Accessing Logic Pins with ch55xduino
The pins on the QT Py are accessed in the Arduino IDE by their GPIO number, minus the P and dot (.). For example, pin P1.0 is accessed as 10
. Pin P3.1 is accessed as 31
. Here is a list of all of the available pins on the QT Py as a #define
list that you can include in your programs compiled with the ch55xduino BSP:
#define NEOPIXEL_PIN 10 #define A0 11 #define A1 14 #define A2 15 #define MOSI A2 #define MISO 16 #define SCK 17 #define RX 30 #define TX 31 #define A3 32 #define SCL 33 #define SDA 34
This JST SH 4-pin STEMMA QT connector is located at the back of the board. It allows you to connect to various breakouts and sensors with STEMMA QT connectors or to other things using assorted associated accessories. It works great with any STEMMA QT or Qwiic sensor/device. You can also use it with Grove I2C devices thanks to this handy cable.
However, you can't use this QT Py with any Arduino libraries and it does not run CircuitPython or MicroPython. There's an Arduino 'board support package' we recommend, but the compiler is for C not C++.
Next to the BOOT button, in the center of the board, is the RGB NeoPixel LED. This addressable LED can be controlled with code. It is connected to P1.0.
- Reset button - This button restarts the board and helps enter the bootloader. You can click it once to reset the board without unplugging the USB cable or battery.
- BOOT button - This button is connected to P3.6/D+. To enter bootloader mode, disconnect the QT Py from USB power. Hold down the BOOT button and reconnect USB power.
Text editor powered by tinymce.