# Adafruit CH552 QT Py

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/129/843/medium800thumb/adafruit_products_5960-00.jpg?1715002862)

What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with a throwback processor - an 8-bit 8051! This tiny core is a big change from something like the&nbsp;[ESP32-S3 QT Py with two 240MHz 32-bit cores](https://www.adafruit.com/product/5700), but there are lots of folks interested in the [CH552](https://www.wch-ic.com/products/CH552.html) and, given the smol size, it is a nice matchup for a smol board.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/844/medium800/adafruit_products_5960-04.jpg?1715003063)

[The CH552 is an 'enhanced' E8051 core microcontroller](https://www.wch-ic.com/products/CH552.html), compatible with the MCS51 instruction set but with 8~15 times faster instruction execution speed. You can run this core at 16MHz and 3.3V logic, and it's got built-in 16K program FLASH memory and, 256-byte internal RAM plus 1K-byte internal xRAM (xRAM supports DMA.

It's also got some cute tricks up its sleeve, like 4 built-in ADC channels, capacitive touch support, 3 timers / PWM channels, hardware UART, SPI, and a full-speed USB device controller. The last one means it can act like a native USB device such as CDC serial or mouse/keyboard HID.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/845/medium800/adafruit_products_5960-02.jpg?1715003120)

If you're interested in playing with this chip, we've wrapped it up in a QT Py format. The pinout and shape is [Seeed Xiao](https://wiki.seeedstudio.com/Seeeduino-XIAO/) compatible, with castellated pads so you can solder it flat to a PCB. It comes with [our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C port that can be used with [any of our STEMMA QT sensors and accessories](https://www.adafruit.com/category/620). We also added an RGB NeoPixel and both a reset button and 'bootloader enter' button.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/846/medium800/adafruit_products_5960-03.jpg?1715003193)

 **Please note! This is a minimal 8-bit microcontroller, and it definitely does _not_ run CircuitPython or Micropython. It also doesn't _really_ run Arduino.** [There's an Arduino 'board support package'](https://github.com/DeqingSun/ch55xduino) we recommend, but the compiler is for C not C++, which means you _cannot use any Arduino libraries_. It's very very bare-bones and for [hacking/experimenting with this '40 cent chip'](https://hackaday.com/2023/03/03/all-the-usb-you-can-do-with-a-ch552/).

- It is the same size, form-factor, and pinout as the Seeed Xiao.
- **USB Type C connector** - [If you have only Micro B cables, this adapter will come in handy](https://www.adafruit.com/product/4299)!
- **CH552 8-bit 8051&nbsp;** microcontroller core with 3.3V power/logic. Internal 16 MHz oscillator.
- Native USB
- **Built in RGB NeoPixel LED**
- **10 GPIO pins:**
  - 4x 8-bit analog inputs on A0, A1, A2, and A3
  - 3 x PWM outputs
  - I2C port with STEMMA QT plug-n-play connector
  - Hardware UART
  - Hardware SPI
  - 4 x Capacitive Touch with no additional components required, on A0-A3 pins

- 3.3V regulator with [**600mA peak output**](https://www.diodes.com/assets/Datasheets/AP2112.pdf)
- **Reset switch and bootloader** for starting your project code over or entering USB ROM bootloader mode
- **Really really small**

# Adafruit CH552 QT Py

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/129/854/medium800/adafruit_products_double.jpg?1715008746)

Warning: This QT Py does not run CircuitPython or MicroPython and cannot use any Arduino libraries because its compiler is for C, not C++.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/863/medium800/adafruit_products_Artboard_1-100.jpg?1715092655)

PrettyPins PDF [on GitHub](https://github.com/adafruit/Adafruit-CH552-QT-Py-PCB/blob/main/Adafruit%20CH552%20QT%20Py%20PrettyPins.pdf).

## Power
- **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](https://www.diodes.com/assets/Datasheets/AP2112.pdf), 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.&nbsp;

![adafruit_products_power.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/856/medium640/adafruit_products_power.jpg?1715024741)

## CH552 Chip
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

![adafruit_products_8051.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/857/medium640/adafruit_products_8051.jpg?1715024754)

## Logic Pins
There are ten GPIO pins broken out to pins. There is hardware I2C, UART, and SPI.&nbsp;**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.

![adafruit_products_logic.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/858/medium640/adafruit_products_logic.jpg?1715024768)

### 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&nbsp;_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 **M** icrocontroller **I** n / **S** ensor **O** ut pin. It's connected to P1.6.
- **MO** - This is the SPI **M** icrocontroller **O** ut / **S** ensor **I** n pin. **Note that this pin is shared with A2!&nbsp;** This pin can do capacitive touch and is one of the four ADC inputs. It's connected to P1.5.

Warning: 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:

```cpp
#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
```

## STEMMA QT Connector
This **JST SH 4-pin [STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connector** is located at the back of the board. It allows you to connect to&nbsp;[various breakouts and sensors with **STEMMA QT** connectors](https://www.adafruit.com/category/1018) or to other things using&nbsp;[assorted associated accessories](https://www.adafruit.com/?q=JST%20SH%204). 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](https://www.adafruit.com/product/4528).

![adafruit_products_stemma.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/859/medium640/adafruit_products_stemma.jpg?1715024788)

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'](https://github.com/DeqingSun/ch55xduino) we recommend, but the compiler is for C not C++.

## NeoPixel LED
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.

![adafruit_products_neo.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/860/medium640/adafruit_products_neo.jpg?1715024802)

## Buttons
- **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.

![adafruit_products_buttons.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/861/medium640/adafruit_products_buttons.jpg?1715024816)

# Adafruit CH552 QT Py

## Arduino IDE Setup

You've seen the warnings that you definitely can't use this QT Py with CircuitPython or MicroPython and that technically it doesn't work with Arduino either. What you _can_ do though is use the [ch55xduino board support package](https://github.com/DeqingSun/ch55xduino) to write code in the Arduino IDE to compile with its C compiler.

## Install Arduino IDE

The first thing you will need to do is to download the latest release of the Arduino IDE. You will need to&nbsp;be using&nbsp; **version 1.8** &nbsp;or higher for this guide.

[Arduino IDE Download](http://www.arduino.cc/en/Main/Software)
## Install the ch55xduino Board Support Package

After you have downloaded and installed **the latest version of Arduino IDE** , you will need to start the IDE and navigate to the **Preferences** menu. You can access it from the **File** menu in _Windows_ or _Linux_, or the **Arduino** menu on _OS X_.

![arduino](https://cdn-learn.adafruit.com/assets/assets/000/101/639/original/esp32_s2_arduino_ide_setup_flora_prefs.png?1618870383 )

A dialog will pop up just like the one shown below.

![preference](https://cdn-learn.adafruit.com/assets/assets/000/101/640/original/esp32_s2_arduino_ide_setup_flora_Screen_Shot_2015-05-07_at_9.07.21_AM.png?1618870405 )

We will be adding a URL to the new **Additional Boards Manager URLs** option. The list of URLs is comma separated, and _you will only have to add each URL once._ New Adafruit boards and updates to existing boards will automatically be picked up by the Board Manager each time it is opened. The URLs point to index files that the Board Manager uses to build the list of available & installed boards.

To find the most up to date list of URLs you can add, you can visit the list of [third party board URLs on the Arduino IDE wiki](https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls#list-of-3rd-party-boards-support-urls). We will only need to add one URL to the IDE in this example, but _ **you can add multiple URLS by separating them with commas** _. Copy and paste the link below into the **Additional Boards Manager URLs** option in the Arduino IDE preferences.

```html
https://raw.githubusercontent.com/DeqingSun/ch55xduino/ch55xduino/package_ch55xduino_mcs51_index.json
```

![](https://cdn-learn.adafruit.com/assets/assets/000/129/864/medium800/adafruit_products_0_bsp.png?1715100236)

If you have multiple boards you want to support, say ESP8266 and Adafruit, have both URLs in the text box separated by a comma (,)

Once done click **OK** to save the new preference settings.

## Install with the Board Manager

The next step is to actually install the Board Support Package (BSP). Go to the&nbsp; **Tools → Board → Board Manager** submenu. A dialog should come up with various BSPs. Search for **ch55xduino**.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/865/medium800/adafruit_products_1_bsp.png?1715100696)

Click the **Install** button and wait for it to finish. Once it is finished, you can close the dialog.

## Code Upload Options

In the **Tools → Board** submenu you should see **CH55x Boards** and in that dropdown it should contain the CH55x boards.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/866/medium800/adafruit_products_2_bsp.jpg?1715100843)

Under **Board** , select **CH552 Board**. Under **Clock Source** , select **16 MHz (internal), 3.3V or 5V**. Under **Bootloader pin** , select **P3.6 (D+) pull-up**. These settings will work with the CH552 QT Py. Now you can try uploading some code examples to the board.

Danger: 
If you're not able to upload to the board, you may need to 'manually' put it into bootloader mode. Check this page https://learn.adafruit.com/adafruit-ch552-qt-py/bootloader-mode

# Adafruit CH552 QT Py

## Blink

Blinking an LED is a great way to determine that you have your hardware and software ducks in a row. In this example, you'll breadboard an LED to the **MISO** pin (P1.6/`16`), upload the example code and see your LED blink on and off every second.

### Diffused 10mm LED Pack - 5 LEDs each in 5 Colors - 25 Pack

[Diffused 10mm LED Pack - 5 LEDs each in 5 Colors - 25 Pack](https://www.adafruit.com/product/4204)
Need some chunky indicators? We are big fans of these diffused LEDs. They are fairly bright, so they can be seen in daytime, and from any angle. They go easily into a breadboard and will add that extra zing to your project.

Now you can get a pack of 25 with 5 different...

In Stock
[Buy Now](https://www.adafruit.com/product/4204)
[Related Guides to the Product](https://learn.adafruit.com/products/4204/guides)
![scattered pile of multi colored unlit LEDs ](https://cdn-shop.adafruit.com/640x480/4204-00.jpg)

## Wiring
- **Board GND** to **LED cathode (black wire)**
- **Board MISO** to **LED anode (red wire)**

![adafruit_products_blink_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/893/medium640/adafruit_products_blink_bb.jpg?1715178781)

## Blink Example
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/QT_Py_CH552_Examples/Blink_QTPyCH552/Blink_QTPyCH552.ino

Confirm that your upload settings match the settings listed here under **Tools** :

- Board: CH552 Board
- USB Settings: Default CDC
- Upload method: USB
- Clock Source: 16 MHz (internal), 3.3V or 5V
- Bootloader pin: P3.6 (D+) pull-up

For the port, select the COM port that matches your QT Py. It will not be labeled like you may be used to with other boards in the Arduino IDE.

![adafruit_products_bspForUploadCDC.png](https://cdn-learn.adafruit.com/assets/assets/000/129/869/medium640/adafruit_products_bspForUploadCDC.png?1715110188)

You can confirm that you have the correct port selected by selecting **Get Board Info** from the Tools menu. This will open the **Board Info** window. The CH552 QT Py VID is&nbsp; **1209** and the PID is **C550**.

![adafruit_products_boardInfo.png](https://cdn-learn.adafruit.com/assets/assets/000/129/870/medium640/adafruit_products_boardInfo.png?1715110387)

Upload the sketch to your board. You should see the LED blink on and off every second.&nbsp;

![adafruit_products_blink.gif](https://cdn-learn.adafruit.com/assets/assets/000/129/908/medium640thumb/adafruit_products_blink.jpg?1715196572)

Danger: If you're not able to upload to the board, you may need to 'manually' put it into bootloader mode. Check this page https://learn.adafruit.com/adafruit-ch552-qt-py/bootloader-mode

# Adafruit CH552 QT Py

## Analog In

You can use one of the ADC pins on the QT Py as an analog input. In this example, you'll connect a potentiometer to pin **A3** , upload the example code to the board and use the Serial Monitor or Serial Plotter to see the signal on the pin fluctuate as you turn the potentiometer.

### Potentiometer with Built In Knob - 10K ohm

[Potentiometer with Built In Knob - 10K ohm](https://www.adafruit.com/product/4133)
_Oh say can you see_  
_By the knob's early light..._

Sorry - we thought that was clever. &nbsp;And while it wasn't really, this potentiometer definitely is! We've seen these in miniature synthesizers. They're bigger than a trim-pot but smaller than a...

In Stock
[Buy Now](https://www.adafruit.com/product/4133)
[Related Guides to the Product](https://learn.adafruit.com/products/4133/guides)
![Potentiometer with Built In Knob](https://cdn-shop.adafruit.com/640x480/4133-03.jpg)

## Wiring
- **Board GND** to **potentiometer GND (black wire)**
- **Board A3** to **potentiometer wiper (yellow wire)**
- **Board 3V** to **potentiometer positive (red wire)**

![adafruit_products_analogIn.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/894/medium640/adafruit_products_analogIn.jpg?1715178796)

## Analog In Example
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/QT_Py_CH552_Examples/analogIn_QTPyCH552/analogIn_QTPyCH552.ino

Confirm that your upload settings match the settings listed here under **Tools** :

- Board: CH552 Board
- USB Settings: Default CDC
- Upload method: USB
- Clock Source: 16 MHz (internal), 3.3V or 5V
- Bootloader pin: P3.6 (D+) pull-up

For the port, select the COM port that matches your QT Py. It will not be labeled like you may be used to with other boards in the Arduino IDE.

![adafruit_products_bspForUploadCDC.png](https://cdn-learn.adafruit.com/assets/assets/000/129/872/medium640/adafruit_products_bspForUploadCDC.png?1715111331)

You can confirm that you have the correct port selected by selecting **Get Board Info** from the Tools menu. This will open the **Board Info** window. The CH552 QT Py VID is&nbsp; **1209** and the PID is **C550**.

![adafruit_products_boardInfo.png](https://cdn-learn.adafruit.com/assets/assets/000/129/871/medium640/adafruit_products_boardInfo.png?1715111314)

Upload the sketch to your board. Open the Serial Monitor ( **Tools -\> Serial Monitor** ) at 115200 baud. As you turn the potentiometer, you'll see the voltage reading on pin **A3** change.

![adafruit_products_serial.gif](https://cdn-learn.adafruit.com/assets/assets/000/129/909/medium640thumb/adafruit_products_serial.jpg?1715268306)

For a more visual representation, you can open the Serial Plotter ( **Tools -\> Serial Plotter** ) at 115200 baud. As you turn the potentiometer, the plotter will smoothly plot the voltage reading.

![adafruit_products_plotterLonger.gif](https://cdn-learn.adafruit.com/assets/assets/000/129/911/medium640thumb/adafruit_products_plotterLonger.jpg?1715268404)

# Adafruit CH552 QT Py

## I2C

You can't use your favorite Arduino libraries with this board, but that doesn't mean you can't use your favorite I2C sensor. In this example, you'll connect an AHT20 temperature and humidity sensor the QT Py. Then, you'll upload the example code and open the Serial Monitor to see the temperature and humidity data print out.

### Adafruit AHT20 - Temperature & Humidity Sensor Breakout Board

[Adafruit AHT20 - Temperature & Humidity Sensor Breakout Board](https://www.adafruit.com/product/4566)
The AHT20 is a nice but inexpensive temperature and humidity sensor [from the same folks that brought us the DHT22](https://www.adafruit.com/product/385). You can take sensor readings as often as you like, and it uses standard I2C so its super easy to use with any Arduino or...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4566)
[Related Guides to the Product](https://learn.adafruit.com/products/4566/guides)
![Angled Shot of the Adafruit AHT20 Temp+Hum Sensor - Assembled PCB](https://cdn-shop.adafruit.com/640x480/4566-04.jpg)

### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)
![Angled shot of STEMMA QT / Qwiic JST SH 4-pin Cable.](https://cdn-shop.adafruit.com/640x480/4210-00.jpg)

## Wiring

You can connect the AHT20 sensor to the STEMMA QT port on the QT Py with a STEMMA QT cable.

- **Board STEMMA GND** to **sensor GND (black wire)**
- **Board STEMMA 3.3V** to **sensor 3.3V (red wire)**
- **Board STEMMA SCL** to **sensor SCL (yellow wire)**
- **Board STEMMA SDA** to **sensor SDA (blue wire)**

![adafruit_products_i2c_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/895/medium640/adafruit_products_i2c_bb.jpg?1715178810)

## AHT20 I2C Example
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/QT_Py_CH552_Examples/I2C_AHT20_QTPyCH552/I2C_AHT20_QTPyCH552.ino

Confirm that your upload settings match the settings listed here under **Tools** :

- Board: CH552 Board
- USB Settings: Default CDC
- Upload method: USB
- Clock Source: 16 MHz (internal), 3.3V or 5V
- Bootloader pin: P3.6 (D+) pull-up

For the port, select the COM port that matches your QT Py. It will not be labeled like you may be used to with other boards in the Arduino IDE.

![adafruit_products_bspForUploadCDC.png](https://cdn-learn.adafruit.com/assets/assets/000/129/873/medium640/adafruit_products_bspForUploadCDC.png?1715111701)

You can confirm that you have the correct port selected by selecting **Get Board Info** from the Tools menu. This will open the **Board Info** window. The CH552 QT Py VID is&nbsp; **1209** and the PID is **C550**.

![adafruit_products_boardInfo.png](https://cdn-learn.adafruit.com/assets/assets/000/129/874/medium640/adafruit_products_boardInfo.png?1715111720)

Upload the sketch to your board. Open the Serial Monitor ( **Tools -\> Serial Monitor** ) at 115200 baud. You'll see the temperature and humidity data print out.

![adafruit_products_i2cSerial.png](https://cdn-learn.adafruit.com/assets/assets/000/129/875/medium640/adafruit_products_i2cSerial.png?1715111772)

# Adafruit CH552 QT Py

## Capacitive Touch

The CH552 has capacitive touch support on a few pins ( **A0, A1, A2/MOSI, A3, MISO** and **SCK** ) without needing any external components. In this example, you'll upload the sketch to your board and use the Serial Monitor to monitor the touch input on pin **A0**.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/897/medium800/adafruit_products_a0.jpg?1715180005)

## Capacitive Touch Example
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/QT_Py_CH552_Examples/CapTouch_QTPyCH552/CapTouch_QTPyCH552.ino

Confirm that your upload settings match the settings listed here under **Tools** :

- Board: CH552 Board
- USB Settings: Default CDC
- Upload method: USB
- Clock Source: 16 MHz (internal), 3.3V or 5V
- Bootloader pin: P3.6 (D+) pull-up

For the port, select the COM port that matches your QT Py. It will not be labeled like you may be used to with other boards in the Arduino IDE.

![adafruit_products_bspForUploadCDC.png](https://cdn-learn.adafruit.com/assets/assets/000/129/880/medium640/adafruit_products_bspForUploadCDC.png?1715114149)

You can confirm that you have the correct port selected by selecting **Get Board Info** from the Tools menu. This will open the **Board Info** window. The CH552 QT Py VID is&nbsp; **1209** and the PID is **C550**.

![adafruit_products_boardInfo.png](https://cdn-learn.adafruit.com/assets/assets/000/129/881/medium640/adafruit_products_boardInfo.png?1715114168)

Upload the sketch to your board. Open the Serial Monitor ( **Tools -\> Serial Monitor** ) at 115200 baud. As you touch pin **A0** , you'll see a print out to the monitor. The `count` will increase by `1` with every touch.

![adafruit_products_capTouchSerial.png](https://cdn-learn.adafruit.com/assets/assets/000/129/882/medium640/adafruit_products_capTouchSerial.png?1715114291)

# Adafruit CH552 QT Py

## NeoPixel

You can't use Arduino libraries with the CH552, so does that mean you can't use ever-so-colorful, always magical NeoPixels? Nope, you absolutely can! In this example, you'll upload the sketch to have the onboard NeoPixel (pin P1.0/`10`) perform a rainbow swirl.

![](https://cdn-learn.adafruit.com/assets/assets/000/129/906/medium800thumb/adafruit_products_neopixel.jpg?1715196551)

## NeoPixel Example
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/QT_Py_CH552_Examples/Neopixel_QTPyCH552/Neopixel_QTPyCH552.ino

Confirm that your upload settings match the settings listed here under **Tools** :

- Board: CH552 Board
- USB Settings: Default CDC
- Upload method: USB
- Clock Source: 16 MHz (internal), 3.3V or 5V
- Bootloader pin: P3.6 (D+) pull-up

For the port, select the COM port that matches your QT Py. It will not be labeled like you may be used to with other boards in the Arduino IDE.

![adafruit_products_bspForUploadCDC.png](https://cdn-learn.adafruit.com/assets/assets/000/129/883/medium640/adafruit_products_bspForUploadCDC.png?1715114553)

You can confirm that you have the correct port selected by selecting **Get Board Info** from the Tools menu. This will open the **Board Info** window. The CH552 QT Py VID is&nbsp; **1209** and the PID is **C550**.

![adafruit_products_boardInfo.png](https://cdn-learn.adafruit.com/assets/assets/000/129/884/medium640/adafruit_products_boardInfo.png?1715114567)

Upload the sketch to your board. You'll see the NeoPixel begin swirling thru the colors of the rainbow. This is the same demo that ships on the boards.

![adafruit_products_neopixel.gif](https://cdn-learn.adafruit.com/assets/assets/000/129/907/medium640thumb/adafruit_products_neopixel.jpg?1715196560)

# Adafruit CH552 QT Py

## Manual Bootloader

Uploading directly to the QT Py USB port is very convenient. However, if you find that your COM port disappears or you're working on [HID device code](https://github.com/DeqingSun/ch55xduino/tree/ch55xduino/ch55xduino/ch55x/libraries/Generic_Examples/examples/05.USB), then you may need to utilize uploading code in bootloader mode.

You can get your QT Py CH552 into bootloader mode by unplugging the USB port, holding down the&nbsp; **Boot** button and plugging the USB cable back in. There is a catch though: **the chip does not stay in bootloader mode for very long.** You only have a few seconds to talk to the bootloader. As a result, timing is everything.

Bootloader mode is the only way you can reprogram the chip after uploading HID code that is compiled with the `USER CODE` USB settings. It's also needed if bad code is uploaded that makes the COM port unreachable.

Info: The CH552 does not stay in bootloader mode for very long. You only have a few seconds to talk to the bootloader.

## Blink to the Rescue

Blinking an LED is not only a great place to start with new hardware, it's also a great reset point; like a save state. You'll upload the blink example to the QT Py in bootloader mode.

After opening the sketch in the Arduino IDE, click on the **Verify checkmark** to compile the code. This will save some time when uploading the code to the board.

![adafruit_products_verify.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/885/medium640/adafruit_products_verify.jpg?1715121721)

Next, unplug the USB cable from the QT Py. Press and hold the&nbsp; **Boot** button but _ **do not plug the board back in yet.** _

![adafruit_products_bootRed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/887/medium640/adafruit_products_bootRed.jpg?1715121836)

Begin the upload process **without the QT Py plugged in** by clicking the **Upload button** in the Arduino IDE. You'll see the progress at the bottom of the IDE window.&nbsp;

When you see `Compiling libraries...` and `Compiling core...` in the progress output, plug in the QT Py while still holding down the&nbsp; **Boot** button.

![adafruit_products_uploadBlinkOutput.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/888/medium640/adafruit_products_uploadBlinkOutput.jpg?1715122099)

If you're successful, you'll see the `Reset OK` message in red at the bottom of the window. If you connect an LED to the **MISO** pin, you should see it blinking.&nbsp;

![adafruit_products_blinkUpload.png](https://cdn-learn.adafruit.com/assets/assets/000/129/889/medium640/adafruit_products_blinkUpload.png?1715122206)

After this process, you should see your CDC Serial COM port return as a Port option in the Arduino IDE. Using this method you can iterate when working on HID device code without worrying about losing the CDC Serial port.

## Linux Troubleshooting Steps

If you are on Linux and find that these instructions don't work for you, try these additional steps. In the terminal enter:

```terminal
cd /etc/udev/rules.d
sudo touch 99.ch55xbl.rules
sudo vi 99.ch55xbl.rules
```

In the rules file, copy and paste the following into the file:

```xml
# CH55x bootloader
# copy to /etc/udev/rules.d/

SUBSYSTEM=="usb", ATTRS{idVendor}=="4348", ATTRS{idProduct}=="55e0", MODE="0666"
```

Then, save changes and reboot your system. This should allow access to the QT Py.

## Windows Troubleshooting Steps

- Windows 10 and 11 may not automatically load a working driver for the CH552 bootloader,  
Installing the [CH375 driver](https://www.wch-ic.com/downloads/CH372DRV_EXE.html) is the recommended option
  - works with ch55xduino&nbsp;
  - works with WCHISPStudio&nbsp;

- &nbsp;Note:
  - Zadigs libusub-win32 also works with ch55xduino, but does not play nice with WCHISPStudio

contributed by forum user @rybec [full thread](https://forums.adafruit.com/viewtopic.php?t=215824)

# Adafruit CH552 QT Py

## Downloads

## Files

- [CH552 Product Page](https://www.wch-ic.com/products/CH552.html)
- [CH552 Datasheet](https://cdn-learn.adafruit.com/assets/assets/000/129/847/original/CH552DS1.PDF?1715004485)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-CH552-QT-Py-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20CH552%20QT%20Py.fzpz)
- [PrettyPins pinout PDF on GitHub](https://github.com/adafruit/Adafruit-CH552-QT-Py-PCB/blob/main/Adafruit%20CH552%20QT%20Py%20PrettyPins.pdf)
- [PrettyPins pinout SVG on GitHub](https://github.com/adafruit/Adafruit-CH552-QT-Py-PCB/blob/main/Adafruit%20CH552%20QT%20Py%20PrettyPins.svg)

## Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/129/848/medium800/adafruit_products_schem.png?1715004515)

![](https://cdn-learn.adafruit.com/assets/assets/000/129/849/medium800/adafruit_products_fab.png?1715004521 dimensions are in inches)


## Primary Products

### Adafruit CH552 QT Py - 8051 Dev Board with STEMMA QT

[Adafruit CH552 QT Py - 8051 Dev Board with STEMMA QT](https://www.adafruit.com/product/5960)
What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with a throwback processor - an 8-bit 8051! This tiny core is a big change from something like the the [ESP32-S3 QT Py with two 240MHz 32-bit cores](https://www.adafruit.com/product/5700), but there's lots of...

In Stock
[Buy Now](https://www.adafruit.com/product/5960)
[Related Guides to the Product](https://learn.adafruit.com/products/5960/guides)

## Related Guides

- [Adafruit MLX90640 IR Thermal Camera](https://learn.adafruit.com/adafruit-mlx90640-ir-thermal-camera.md)
- [Adafruit Bluefruit LE Shield](https://learn.adafruit.com/adafruit-bluefruit-le-shield.md)
- [Adafruit LTR-329 and LTR-303 Light Sensors](https://learn.adafruit.com/adafruit-ltr-329-ltr-303.md)
- [Adafruit Audio FX Sound Board](https://learn.adafruit.com/adafruit-audio-fx-sound-board.md)
- [Adafruit AS7331 UV / UVA / UVB / UVC Sensor](https://learn.adafruit.com/adafruit-as7331-uv-uva-uvb-uvc-sensor.md)
- [CircuitPython Trombone Champ Controller](https://learn.adafruit.com/circuitpython-trombone-champ-controller.md)
- [Adafruit PC Joystick to seesaw I2C Adapter](https://learn.adafruit.com/adafruit-pc-joystick-to-seesaw-i2c-adapter.md)
- [Adafruit 2.8" and 3.2" Color TFT Touchscreen Breakout v2](https://learn.adafruit.com/adafruit-2-8-and-3-2-color-tft-touchscreen-breakout-v2.md)
- [Adafruit GA1A12S202 Log-scale Analog Light Sensor](https://learn.adafruit.com/adafruit-ga1a12s202-log-scale-analog-light-sensor.md)
- [Adafruit PCA9546 4-Channel I2C Multiplexer](https://learn.adafruit.com/adafruit-pca9546-4-channel-i2c-multiplexer.md)
- [Adafruit USB Type C Power Delivery Switchable Breakout](https://learn.adafruit.com/adafruit-usb-type-c-power-delivery-switchable-breakout.md)
- [Madison's NeoClock - A PIC + KiCAD + NeoPixel adventure](https://learn.adafruit.com/madisons-neoclock-a-pic-kicad-neopixel-adventure.md)
- [reef-pi Guide 2: Power Controller](https://learn.adafruit.com/reef-pi-power-controller.md)
- [3D-Printed Bionic Eye](https://learn.adafruit.com/3d-printed-bionic-eye.md)
- [Moana Glowing Heart of Te Fiti Necklace](https://learn.adafruit.com/moana-glowing-heart-of-te-fiti-necklace.md)
