The pin sequence of the development board is compatible with the common 8051 core boards on the market. Some sample codes are written by Keil5-C251. Please see the attachment for details.
Progress: 2022.07.08 V1.0 completed PCB-DFM
2022.07.18 V1.0 has been board tested and the STC32G12K128 works normally
2022.08.13 V1.0 Upload part of the code and complete open source
For more content, please follow Station B. Hello, teacher. My name is Gao.
The STC32G series of microcontrollers is a microcontroller that does not require an external crystal oscillator or external reset. It is a 32-bit 8051 microcontroller that targets super anti-interference, ultra-low price, high speed, and low power consumption. At the same operating frequency, the STC32G series of microcontrollers is more efficient than traditional microcontrollers. The 8051 is about 70 times faster.
The MCU internally integrates a high-precision RC clock (10.3%, +25℃ at normal temperature), -1.38%~+1.42% temperature drift (-4O℃~+85℃), -0.88%~+1.05% temperature drift (-20 ℃~+65℃). A wide range of 4MHz~33MHz can be set during ISP programming, which can completely eliminate the need for expensive external crystal oscillators and external reset circuits (a high-reliability reset circuit has been integrated internally, and a 4-level reset threshold voltage is optional during ISP programming).
There are 4 optional clock sources inside the MCU: internal high-precision IRC clock (frequency can be adjusted during ISP programming), internal 32KHz low-speed IRC, external 4M~33M crystal oscillator or external clock signal, and internal PLL output clock. The user code can freely select the clock source. After the clock source is selected, it can be divided by an 8-bit frequency divider and then provide the clock signal to the CPU and various peripherals (such as timers, serial ports, SPI, etc.).
MCU provides two low-power modes: IDLE mode and STOP mode. In IDLE mode, the MCU stops providing clock to the CPU, the CPU has no clock, and the CPU stops executing instructions, but all peripherals are still working. At this time, the power consumption is about 1.3mA (6MHz operating frequency). STOP mode is the main clock stop oscillation mode, which is the traditional power-down mode/power-out mode/stop mode. At this time, the CPU and all peripherals stop working, and the power consumption can be reduced to less than 1uA.
The MCU provides a wealth of digital peripherals (4 serial ports, 5 timers, 2 sets of 16-bit advanced PWM timers capable of outputting complementary/symmetrical/with dead zone control signals for three-phase motor control, and 12C, SPI, USB, CAN, LIN) interface and analog peripherals (ultra-fast 12-bit ADC, comparator), can meet the design needs of the majority of users.
MCU comes with hardware USB, supports USB download, USB simulation, and can realize the following experiments:
1. Marquee;
2. External interrupt INT0/INT1;
3. Timer;
4. Serial port
5. ADC;
6. Comparator;
7. PWM;
8. FreeRTOS for STC32G12K128 demonstration
ISP download steps:
1. Connect D-/P3.0, D+/P3.1 to the PC-USB port
2. Short-circuit P3.2 and GND, press the P3.2/INT0 button on the board
3. Give Power on the target chip again. Regardless of whether it has been powered on before, press the power switch button on the board to power off, then release it to power on and wait for the "STC USB Writer (HID1)" to be automatically recognized
in the STC-ISP download software.
P3.2 status is irrelevant.
4. Click the "Download/Programming" button in the download software (note: the operation sequence is different from that of serial port download)
Modified with the official "Dragon Subduing Stick":
1. Replace the power-off transistor and anti-reverse diode models. In most cases, manual reset is not required. If there is too much load, you may need to manually press the power-off button;
2. Replace JP1 with an NC resistor. Please short-circuit this pin if you need to use it;
3. Optimize some wiring to reduce interference;
4. Use existing standard library components to reduce SMT costs.
Project pictures
Effect of accessing the expansion board:
The effect of connecting the automatic downloader (no cold start):
Digital tube static display:
LCD1602 displays:
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet