MCU:Atmega8
Internal oscillator: 8M
Environment: ICCAVR 7.0
Program: sdyzxue Xue Haitao
2010/06/16
=*******************************************************
#include
#include
#define fosc 8000000
#define baud 9600
#define SEI() asm("sei")
#define CLR_DIR_1WIRE DDRC&=~BIT(1)
#define SET_DIR_1WIRE DDRC|=BIT(1)
#define CLR_OP_1WIRE PORTC&=~BIT(1)
#define SET_OP_1WIRE PORTC|=BIT(1)
#define CHECK_IP_1WIRE (PINC & 0x02)
unsigned char wmh,wmm,wml;
unsigned int
unsigned char RX_data[10]={0};
unsigned char RX_counter=0;
void delay_1us(void)
void delay_nus(unsigned int n)
void delay_1ms(void)
void delay_nms(unsigned int n)
void putchar(unsigned char c)
{
}
//Character input function
unsigned char getchar(void)
{
}
//String output function
int puts(char *s)
{
}
//String output function with carriage return and line feed
void puts_hh(char *s)
{
//
}
//UART initialization
void uart_init(void)
{
UCSRB=(1<
}
#pragma interrupt_handler UART_rx: iv_USART_RX
void UART_rx(void)
{
}
void init_1820()
{
}
void write_1820(unsigned char x)
{
}
unsigned char read_1820()
{
}
void gettemp()
{
}
void main(void) //main function
{
puts_hh("=====Temp Test=====");
putchar(wmh+0x30);//
delay_nms(10000);
}
Previous article:AVR series watchdog
Next article:Use the RS232 port of the PC to control the LED light
- Popular Resources
- Popular amplifiers
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- Infineon ADAS solutions ensure your safety every time you travel. Participate and win prizes!
- EEWORLD University - Analyzing battery protection and fuel gauge solutions, TI experts meet with you face to face
- A brief introduction to UWB
- [Anxinke NB-IoT Development Board EC-01F-Kit] 2. Power-on test and RX0/TX0 compatibility issues
- The perfect Baidu Netdisk is about to dominate the Internet's download resources
- [Raspberry Pi Pico Review] Unboxing and Power-On Test
- TPS62903: What causes Vout to deviate from the expected value?
- 0-10V, PWM, potentiometer three-in-one dimming power supply interface GP9301 solution
- 3 ways to handle lithium-ion battery testing equipment. Do you know this solution?
- Is there any plug-in that can add corresponding connections to the code in KEIL? Attached picture