AVR microcontroller---serial port sending

Publisher:码字奇才Latest update time:2015-09-10 Source: eefocusKeywords:AVR Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
the first method:
void send1_1byte(float k)
{   
  while(UCSR1A.5==0){;}
  UDR1=k;    
  while(UCSR1A.6==0){;}
  UCSR1A.6=1;
 
void send0_1byte(float k)
{   
  while(UCSR0A.5==0){;}
  UDR0=k;    
  while(UCSR0A.6==0){;}
  UCSR0A.6=1;
}
This method is commonly used.
 
The second method:
putters (k);
Keywords:AVR Reference address:AVR microcontroller---serial port sending

Previous article:Insufficient size error occurs when compiling AVR project
Next article:AVR-SPI bus control

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号