2023年3月31日星期五

[Ameba] A1 PICO / RTL8720DN (BW16) and Arduino IDE (EN)

RTL8720DN

Realtek RTL8720DN is a wireless chip that supports both Wifi and Bluetooth, with Wifi supporting dual modes (802.11 a/b/g/n 1x1, 2.4GHz & 5GHz) and low-power BLE 5. The processor core is designed with dual processors, integrating ARM V8M Cortex-M33 (instruction set compatible with Cortex-M4F) and ARM V8M Cortex-M23 (compatible with Cortex-M0+). Wifi and BT share the same set of antennas, making hardware design simpler. The BW16 is a SOC module designed based on the RTL8720DN, which connects commonly used pins and uses a PCB antenna to make development easier.

Summary:
The core consists of KM4 Arm Cortex-M4 core @ 200 MHz and KM0 Arm Cortex-M0 core @ 20 MHz. WiFi supports 2.4G and 5G protocols, with a bandwidth range of 2.412-2.484GHz & 5.180-5.825GHz.

  • It supports HT20/HT40 modes
  • low-power mode
  • Bluetooth 5.0 LE
  • with a bandwidth range of 2.402GHz – 2.480GHz.
  • Operating modes include AP, Station, AP/Client. 
  • WiFi and BT share the same antenna.
  • 1 ADC
  • 2 UART interfaces
  • 1 I2C
  • 1 SPI
  • 4 PWM
  • and all pins can be used as GPIO.

 

To make it more convenient to use the RTL8720DN (BW16), I designed the A1 PICO development board.

Development highlights:

  • Built-in USB 5V self-recovery fuse.
  • Battery connection interface JST 2.00mm.It is not convenient to connect a fixed power source in many applications, so it will be more convenient in applications. If USB 5V is connected at the same time, it will automatically switch to USB as the main power source.
  • Because battery applications are required, I specially selected an LDO with good efficiency to maximize the battery's performance. The default voltage range is 3.6V ~ 4.2V.
  • Pre-installed I2C pull-up resistors.When used in I2C applications, pull-up resistors are always needed, and sometimes they cannot be found temporarily. Now, you only need to connect the short circuit pin.
  • Supporting Auto Flash function is also a major modification this time.


Connection diagram

RTL8720DN,BW16,ESP32


UART Driver

CH9102F
https://www.wch.cn/products/CH9102.html

Circuit diagram

RTL8720DN,BW16,ESP32


Arduino IDE

To get started, you need to install the Ameba board support package (BSP) for the Arduino IDE. Follow these steps:

  1. Open the Arduino IDE and click on File -> Preferences.
  2. In the Additional Boards Manager URLs field, enter the following URL:https://github.com/ambiot/ambd_arduino/raw/master/Arduino_package/package_realtek.com_amebad_index.json
  3. Click OK to save the changes.
  4. Next, open the Boards Manager by clicking on Tools -> Board -> Boards Manager.
  5. Search for "ameba" and select the "Realtek AmebaD Boards" package.
  6. Click on Install to install the BSP.
  7. After installation, select the "Ameba RTL8720DN / BW16" board from the Tools -> Board menu.

You are now ready to program the Ameba board using the Arduino IDE.
Please enable the Auto Upload mode as this development board has the Auto flash feature for automatic uploading.


Demo video

Resources