$regfile = "m16def.dat"
$crystal = 8000000
Config Lcdpin = Pin , Db4 = Portc.4 , Db5 = Portc.5 , Db6 = Portc.6 , Db7 = Portc.7 , E = Portc.2 , Rs = Portc.0
Config Lcd = 16 * 2
Config 1wire = Porta.0
'*************************************************
Dim Id(8) As Byte
Dim I As Byte
Dim C(2) As Byte
Dim T As Word
'*****************************************************
Deflcdchar 0 , 14 , 10 , 14 , 32 , 32 , 32 , 32 , 32 ' Define the display characters of degree
Deflcdchar 1 , 4 , 10 , 17 , 4 , 31 , 2 , 4 , 8 'Define the display characters of the Chinese character "今"
Deflcdchar 2 , 31 , 4 , 31 , 4 , 12 , 10 , 18 , 17 'Define the display characters of the Chinese character "天"
'****************************************************
Dim Shi As Byte , Fen As Byte , Miao As Byte
Dim S As String * 2 , F As String * 2 , M As String * 2
Dim N_shi As Byte , N_fen As Byte , Zt As Bit
Dim N_s As String * 2 , N_f As String * 2
Dim Key_in As Byte
Dim Beep_times As Byte
Config Portb = Input
Portb = &HFF
Initlcd
Cls
Shi = 12
Fen = 0
Miao = 0
N_shi = 12
N_fen = 0
Zt = 0
Cursor Off
Main:
Cls
Gosub Disp
Gosub Ds18b20csh
Gosub 18b20js
Gosub Key_scan
Gosub Naoshi
Gosub Jishi
Goto Main
End
............
............
..............
The program is correct, the experiment is successful, the temperature can be displayed, the time is very accurate.
Minor problems also exist, but they can be basically solved. It can be used as it is.
Previous article:AVR MCU fuse settings and rescue methods
Next article:Mixed programming of basic language and assembly language --- electronic watch
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- Europe's three largest chip giants re-examine their supply chains
- Breaking through the intelligent competition, Changan Automobile opens the "God's perspective"
- The world's first fully digital chassis, looking forward to the debut of the U7 PHEV and EV versions
- Design of automotive LIN communication simulator based on Renesas MCU
- When will solid-state batteries become popular?
- Adding solid-state batteries, CATL wants to continue to be the "King of Ning"
- The agency predicts that my country's public electric vehicle charging piles will reach 3.6 million this year, accounting for nearly 70% of the world
- U.S. senators urge NHTSA to issue new vehicle safety rules
- Giants step up investment, accelerating the application of solid-state batteries
- Guangzhou Auto Show: End-to-end competition accelerates, autonomous driving fully impacts luxury...
- 9-bit serial communication Linux how to receive data
- Xuanxingbao shares how to build a unified and shared master data platform to create truly clean data governance capabilities?
- A question about the voltage collection of the ADC module of DSP28335
- GD32VF103C START Review——by Changjianze1
- A new interpretation of the principle of integral circuits: the transformation of amplifiers and capacitors
- Forlinx third generation iMX6ULL core board hardware design guide and power consumption table
- There are many models of STM32. The high-end ones have DMA, floating-point operations, multipliers, programmable gain amplifiers (PGA), internal...
- Keil software simulation serial port debugging skills
- C64x software optimization techniques and embedded development techniques
- 【XMC4800 Relax EtherCAT Kit Review】+ Getting Started with DAVE and DAC Module