#include "1602.h"
#include "18b20.h"
#include "main.h"
__CONFIG(0X0B31);
main()
{
char msg[2][16] = {" Temperature: "," .C"};
delay_us2 (40, 40);
delay_us2 (100, 200);
initial();
while(1) {
start_convert();
change_to_ascii (get_temp (), &msg[1][3]);
display2(&msg[0][0],&msg[1][0]);
}
}
//------------------------us level delay----------------------------//
void delay_us2 (char x, char y)
{
char z;
to { from=y;
do {;} while(--z);
} while(--x);
}
//------------------------1 second delay--------------------------------//
void delay_1s(unsigned int x)
{
unsigned a,b;
for(a=x;a>0;a--)
for(b=110;b>0;b--);
}
//-----------------------------------------------------------------------//
void delay_us1 (char d)
{
while(--d) ;
}
Previous article:PIC microcontroller electronic clock program + simulation circuit
Next article:PIC16F877_adc usage
Recommended ReadingLatest update time:2024-11-16 14:32
- Popular Resources
- Popular amplifiers
- Intelligent computing systems (Chen Yunji, Li Ling, Li Wei, Guo Qi, Du Zidong)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Single-chip microcomputer C language programming and simulation
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [CH563L Review] Part 3 Based on uCos, using FIFO algorithm to achieve zero wait, any baud rate FreeModbus RTU
- Electrical knowledge encyclopedia
- C6678 Learning - Interrupt Nesting
- The role and selection of input and output capacitors in power supplies
- It's all here! TI mmWave radar product information and software download links
- Share: Detailed explanation of induction cooker control using single chip microcomputer
- Can Tantalum Capacitors Replace MLCC?
- [NXP Rapid IoT Review] + Remotely modify display data
- How to use Namisoft to make spectrum analyzer capture screen and send it to computer through SCPI command
- Quartz crystal