Qi9j0

Electronic wooden fish

 
Overview
As a microcontroller enthusiast, I often encounter compilation errors, so I've decided to contribute to the microcontroller community through simple typing.
The solution uses an SG90 servo motor and an STC8H1K08 microcontroller, featuring automatic and manual modes, a menu function, real-time fine-tuning of the servo motor's angle, and EEPROM power-off memory .
A short press of the rotary encoder switches between manual and automatic modes, while a long press enters the menu. The first step adjusts the automatic timer, the second adjusts the angle value on the left side of the servo motor, and the third adjusts the angle value on the right side. The data can be adjusted by turning the knob left and right, and a long press exits the automatic mode. The automatic timer range is 0-99 seconds. The servo motor angle range is 0-200 degrees.
 
The code is written in 51C language and includes a system adjustment menu—it's quite fun.
//The source code and PCB layout for the above projects are publicly available. Search for the username "Qiqi Loves Microcontrollers" on the "LCSC Open Source Hardware Platform".//Microcontroller model: STC8G1K08 1. When programming, be sure to select built-in IRC=30MHz. 2. Set the reset pin to the IO port. 3. Uncheck the option to erase the user EEPROM area when downloading the user program
. /*No technical support provided, just sharing for fun. This is an open-source blogger's work; it is for use only and not for commercial purposes. Questions can be discussed in the comments section below. Designer of this solution: Qiqi 
Douyin: The Cutest Qiqi in the Universe Kuaishou ID: Qiqi Loves Microcontrollers Bilibili: Qiqi Loves Microcontrollers QQ: 1715755109 (For custom microcontroller programs and PCB designs, add as a friend and indicate your purpose; paid design, serious inquiries only). QQ Group: 499067314 (Welcome all microcontroller enthusiasts to join the group; group files are available for free download.) */
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-28 15:58:32

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号