Clock + temperature + Remote control settings, integrated clock example

Source: Internet
Author: User

Clock + temperature + Remote control settings, integrated clock example
The second-hand Single-Chip Microcomputer Development Board was developed in June 30. Today, a comprehensive clock example is provided, including code and simulation.
Make a summary.

Press the independent keyboard K1 and the EQ of the infrared remote control as the setting key.
Press the independent keyboard K2 and the infrared remote control vol + as the plus key.
Press the independent keyboard K3 and the infrared remote control vol-to reduce the key.

Touch the temperature sensor by hand. When the temperature exceeds 34 ℃, light up the LED lamp and simulate the start of the device.

The program has many details not optimized, mainly learning,
Lcd1602 display, independent scanning, infrared remote control, ds1302 clock chip, DS18B20 temperature sensor.

Comprehensive real-time clock application, source code and simulation download
Http://pan.baidu.com/s/1gduxO9X

// The following are the hardware settings. You can modify the hardware settings of the clock_ds1302.h clock chip ds1302 by yourself based on different development boards. sbit clk_ds_rst = P3 ^ 5; // reset sbit clk_ds_clk = P3 ^ 6; // clock sbit clk_ds_sda = P3 ^ 4; // data // IR. h infrared remote control hardware settings sbit ir_port = P3 ^ 2; // infrared receiver data cable // lcd1602.h lcd1602 hardware settings sbit LCD _rs = P2 ^ 6; // LCD Rs register port sbit LCD _rw = P2 ^ 5; // LCD rw read/write port sbit LCD _ep = P2 ^ 7; // LCD ep enabling port # define LCD _port P0 // LCD parallel data port // main. c Other hardware settings sbit beep_port = p1 ^ 5; // buzzer port S Bit key_set_port = P2 ^ 0; // set the key port sbit key_up_port = P2 ^ 1; // Add the key port sbit key_down_port = P2 ^ 2; // reduce the key port sbit bao_jing_power = P2 ^ 3; // alarm Power port # define temp_max 340 // temperature alarm. 340 is actually 34.0




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.