toothache

Simple calculator

 
Overview
  • Hardware description
  1. Use stc89c52 as the main control chip, 1602 for display, 36 buttons and 3 LED lights, and use micro-usb5V for power supply.
  2. PCB design uses plug-in components, and soldering is very simple.
  3. Since the circuit is relatively simple, a perforated board is used here for verification. Although the PCB has not been verified, there should be no problem.
  • Software description
  1. The program will use notation and operator precedence rules to complete complex operations in a small RAM space.
  2. The program implements mixed operations such as trigonometric functions (sin/cos/tan/sec/csc/cot), square roots, factorials, addition, subtraction, multiplication and division to meet basic mathematical operation requirements.
  3. The implementation of the program uses the idea of ​​modularity, so new functions can be easily added, and other developers can make changes as needed.
  4. Since the program has been structurally optimized, it still requires at least 8K of flash space, which almost fills up the chip memory. Some functions cannot be added, such as the inability to check the correctness of calculations. If you need code in this area, you can discuss it with me. Here is one A relatively clever solution, but it has not been proven.
  • Engineering indicators

The program has been verified. Since it uses the float data type, the effective number is 7 digits. It can automatically switch between normal and exponential display modes according to different situations, which is very convenient.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-07-09 00:41:44

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号