An electronic table has a time temperature alarm. You can use a host computer to change the lower-computer's alarm clock temperature alarm upper and lower limits using a module.

Source: Internet
Author: User

=======================================================================-1 -function =================================================== ========================================================== ===

1 -- Time -- ds1302
2 -- temperature -- DS18B20
3 -- temperature alarm
4 -- Alarm
5 -- the week is automatically changed when the date is modified.
6 -- change the upper and lower limits of the ds1302 time alarm time and temperature alarm of the MCU on the upper and lower computers
7 -- you can use the keyboard to change the upper and lower limits of the ds1302 time alarm time temperature alarm.
8 -- changing the value the time mark will flash to control the switch of the alarm and display the symbol on the first page.
9 -- the critical value of the year, month, day, hour, minute, and second controls the February judgment corresponding to the year of the year.

========================================================== -2-key description ================================================ ========================================================== ========

The 4*4 matrix keyboard shares 4 keys. One is used to select the screen. The other two are the sub-options on the screen. The other two are the values +-(1 2) (3 1) (1) (1 2) the first value in the brackets is the row, and the second is the column. For example, (1 2) indicates the button in the second column of the First row)

.
========================================================== ======- 3-source code and schematic ===================================== ========================================================== =====

Single-Chip Microcomputer with a baud rate of 9600 if normal, you can send a T, then a prompt will be returned for a long time, the specific prompt can be seen in the figure on the following website
Bytes -----------------------------------------------------------------------------------------------------

Http://www.ourdev.cn/bbs/bbs_content.jsp? Bbs_sn = 4375606 & bbs_page_no = 1 & bbs_id = 9999

The first version of code is available on the 5th floor of the above post.
Let's take a look at the PC problem.
Source code:
Click here to download ourdev_595928vea3yt.rar (file size: 341 K) (original file name: final_sensor.rar)
Bytes ------------------------------------------------------------------------------------------------------
Schematic and PCB

Http://www.ourdev.cn/bbs/bbs_content.jsp? Bbs_sn = 3967978 & bbs_page_no = 1 & search_mode = 3 & search_text = qq3720.6062 & bbs_id = 9999

========================================================== = ==============================================


(Original file name: Keil. jpg) Reference Image

Screen 1: (the display time and temperature can be modified on the keyboard and host computer)


(Original file name: 20101107096.jpg) Reference Image

Screen 1: (display time and temperature, which can be modified on the keyboard and on the host computer)


(Original file name: 20101107097.jpg) Reference Image

Screen 2: (the keyboard and PC can be used to modify the display temperature alarm downstream limit)


(Original file name: 20101107098.jpg) Reference Image

Screen 3: (the keyboard and host computer can be used to display and set the alarm clock)


(Original file name: 20101107099.jpg) Reference Image

4*4 keyboards


(Original file name: 20101107100.jpg) Reference Image

Set alarm: (cursor flashing)


(Original file name: 20101107105.jpg) Reference Image

Set Time: (cursor flashing)


(Original file name: 20101107106.jpg) Reference Image

PC command to modify the lower computer subroutine design:


(Original file name: 20101107107.jpg) Reference Image

========================================================== -5-program description = ======================================

During the National Day program, many modules I spent two days writing were directly rewritten by others. I repackaged them and changed some places.
There are too many things to be improved in the program. I hope you can say it. For example, the latency should be replaced by the detection alarm program. The running time of each state machine varies with the key sensitivity.

Source code:
Click here to download ourdev_595928vea3yt.rar (file size: 341 K) (original file name: final_sensor.rar)

The program uses the state machine idea (self-think) in the main function to switch the display on three screens, use simple display, Keyboard Scan, and related volume changes in the sub-functions of the screen function.
Use the queue cache in the receiving function of the host computer, and then determine the processing.

Modularization:


(Original file name: keilfile 1.jpg) Reference Image

Code volume:


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.