AICube Upgraded: Enhanced Support for STC Microcontrollers

Introduction: Summary: The AICube tool has been upgraded to support more STC microcontroller models (such as STC8H8K), simplifying the development process. It allows for the configuration of GPIO, serial ports (baud rate 115200), interrupts, and other modules through a visual interface, enabling one-click generation of Keil projects and automatic compilation. During testing, successful implementations of LED blinking, serial printing, and OLED driving functions were achieved. The tool operates smoothly but requires further integration of third-party driver libraries (such as OLED) to enhance ecosystem completeness, aiming for Arduino-like development convenience. Keywords: AICube, STC microcontroller, Keil project, visual configuration, ecosystem expansion<span>Keywords</span>:AICube,STC

  • AICube: Making STC Microcontroller Development Easier[1]

01AICube Has Been Upgraded

1. AICube

Recently, I heard that AICube has been upgraded. It can now develop more STC microcontrollers. Click on the AICube above the ISP program to see that the supported MCU types have increased to four. Below, I will use it to configure a development project for the STC8H8K microcontroller. Choose the storage directory for the generated project. Select the project type as a single file project. This opens the configuration interface. You can see that it can configure almost all module parameters of the microcontroller. Configure port 5.4 as an output port. This port is connected to an LED. In configuring serial port 1, select a baud rate of 115200 and set the printf function. Choose the serial interrupt function. Now, let’s configure these hardware modules first. Open the visual IO port configuration interface. Click to create the project file, and find that the serial port has not been configured yet. Configure the corresponding port for the serial port. Now, you can generate the software project and automatically open the Keil IDE. You can see that there is a file named main.c. This file contains all the software function code. Compile the project file without any error messages. Everything is so smooth, and it is very easy to use.

AICube Upgraded: Enhanced Support for STC Microcontrollers

2. Download Testing

Using the ISP software, download the generated running code to the STC8H8K microcontroller, and you can see that it can now receive the string sent by the microcontroller through the printf function. In the main loop program, a command to continuously output the string has been added. At the same time, change the state of the P5.4 port. This port is connected to the LED on the circuit board, and you can see the LED blinking. This indicates that the software generated by AICube is working correctly, and strings can be output through printf, and the port can be controlled.

AICube Upgraded: Enhanced Support for STC Microcontrollers
AICube Upgraded: Enhanced Support for STC Microcontrollers

3. Adding OLED

Next, I will add an OLED interface, setting four ports of the microcontroller as output ports. Then, open AICube

and reopen the configuration file from earlier. Next, configure the four ports connected to the OLED as output ports. Regenerate the Keil project file. Reopen the generated project file. You can see that the code I added earlier in the main program is still retained. Now, let’s test the functionality of the new IO.

AICube Upgraded: Enhanced Support for STC Microcontrollers
AICube Upgraded: Enhanced Support for STC Microcontrollers

Now, add the previously written OLED driver program to the project file. In the main loop, refresh the screen and output incrementing numbers. You can see that the OLED functionality is now working properly.

AICube Upgraded: Enhanced Support for STC Microcontrollers

※ More Expectations ※

This article introduces the upgraded AICube software. It allows for the easy generation of the working framework for STC microcontrollers, making software development enjoyable. Here, I also hope that AICube can integrate more external application interface libraries, such as OLED driver code, just like the Arduino ecosystem, making software development as easy and enjoyable as building blocks.

References[1]

AICube: Making STC Microcontroller Development Easier: https://zhuoqing.blog.csdn.net/article/details/147366377?spm=1011.2415.3001.5331

Leave a Comment