elleny

Rotating LED Electronic Clock-V2.0

 
Overview
1. Project Introduction
        Electronic process internship program, choose plug-in devices. Rotating LED electronic clock, using STC8H8K64U microcontroller and DS1302 clock chip, 60 LEDs can change into various patterns. STC8H8K64U microcontroller is the latest microcontroller launched by STC. The most notable feature is that it can be directly simulated and downloaded through the USB interface. Therefore, the rotating LED electronic clock can not only be used as an electronic process internship program for colleges and universities, but also as a development board for learning STC microcontrollers.
         The V1.0 version of the project has been released for more than 2 years and has been welcomed by many friends. The project link: Rotating LED Electronic Clock-Jialichuang EDA Open Source Hardware Platform (oshwhub.com).
 
 
        In response to the suggestions and questions raised by netizens, after careful consideration, the second version was carefully designed and the following changes were made:
        1. The MCU was replaced. The microcontroller STC15W408AS used in the 1.0 version of the project is often out of stock by Lichuang. After a thorough investigation, we chose the STC company's single-chip microcomputer STC8H8K64U-45I-PDIP40. The reason for choosing the direct plug-in package is mainly to facilitate students' welding. Another advantage of the STC8H8K64U single-chip microcomputer is that it can be directly simulated and the program downloaded through the USB port. It is really convenient. This project can be used as a development board for learning single-chip microcomputers and conduct secondary development by yourself.
        2. The temperature sensor has an NTC temperature measuring resistor replaced with a DS18B20 because the DS18B20 has higher accuracy and can be debugged by simulating a single bus.
2. Download and Simulation
       (I) Download through the USB interface
        STC's ISP software supports direct downloading of the sample program in the software to the single-chip microcomputer. The direct download button is shown in the figure below.
 
 
        Before downloading, you still need to perform the following steps: First, use the USB cable to correctly connect the circuit board to the computer, and then open the STC ISP download software. In the above interface, the following points need to be noted: 1. The single-chip microcomputer model must be selected as "STC8H8K64U". 2. The circuit board uses the hardware USB interface to download. Enter the USB download mode, first press and hold the SW4 button (P3.2/INT0) on the circuit board to ground, then press the SW5 power button to power off, then release the SW5 power button, and finally release the SW4 button (P3.2/INT0). Under normal circumstances, the "STC USB WriterHID1" device can be identified, and then the HEX file can be downloaded through USB.
       (II) Emulation through the USB interface
        First open the STC ISP download software, then click the "Add model and header file to Keil Add STC emulator driver to Keil" button in the "Keil Simulation Settings" page in the right function area of ​​the software.
 
     
        After pressing the button, the following screen will appear.
 
 
        Locate the directory to the installation directory of the Keil software, and then confirm that the installation is successful. The following prompt box will pop up.
 
 
        In the relevant directory of Keil, you can see the following files, which means that the driver is correctly installed.
 
 
        Because in the default state, the main control chip is not a simulation chip and does not have simulation function, so if you need to use the simulation function, you also need to set the main control chip as a simulation chip. The steps to make a simulation chip are as follows:
        First, use a USB cable to connect the circuit board to the computer and enter the USB download mode: first press the SW4 button (P3.2/INT0) on the circuit board to ground, then press the SW5 power button to power off, then release the SW5 power button, and finally release the SW4 button (P3.2/INT0).
        Under normal circumstances, the "STC USB WriterHID1" device can be identified. Select "STC8H8K64U" as the microcontroller model. Use the USB port for simulation. Select the IRC frequency for the user program to run. The frequency selected when making the simulation chip must be consistent with the frequency set by the simulated user program to achieve a real running effect. Then click the "Set the selected target microcontroller as a simulation chip" button in the "Keil Simulation Settings" page in the right function area of ​​the software.
 
 
        If the setting is successful, the following screen will appear
 
 
        . At this point, the simulation chip is successfully made. Next, we open a project for simulation
 
 
        and then perform the following project settings:
press the shortcut key "Alt+F7" or select Option for Target Target1 in the menu "Project". Configure the project in the "Option for Target Target1" dialog box. Step 1. Enter the project settings page and select the "Debug" settings page. Step 2. Select the hardware simulation "Use" on the right. Step 3. Select the "STC Monitor 51 Driver" item in the simulation driver drop-down list. Step 4. Click the "Settings" button to enter the interface settings screen. Step 5. Select USB interface simulation.
        Confirm that the simulation settings are completed. The detailed steps are shown in the figure below
 
 
        . After completing all the above work, you can press "Ctrl+F5" in the Keil software to start simulation debugging. If the hardware connection is correct, you will enter a debugging interface similar to the following, and the current simulation driver version number and the current simulation monitoring code firmware version number will be displayed in the command output window, as shown in the figure below. During
 
 
        the simulation debugging process, you can perform multiple operations such as reset, full-speed operation, single-step operation, and setting breakpoints.
 
 
        As shown in the figure above, multiple breakpoints can be set in the program. The maximum number of breakpoints currently allowed is 20 (theoretically, any number can be set, but too many breakpoints will affect the debugging speed).
 
III. Next steps
        1. Change the USB interface to a direct plug-in TYPE-C interface;
        2. Use the DS1307 clock chip and directly use the hardware IIC of the microcontroller to read;
        3. Reserve an external TTL serial port terminal to facilitate serial communication programming;
        4. To be determined------
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 03:20:46
  • Research results on how lucky rar passwords cannot be cracked in seconds
  • LPC4357 Project Progress
  • What is Wi-Fi 6?
  • How does evc load JPG images?
  • Proficient in Linux device driver development
  • Common terms for instruments and meters

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号