LCD display techniques for floating point data with decimals

Publisher:书香门第Latest update time:2015-10-08 Source: eefocusKeywords:LCD Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Generally, when displaying real-time values, we often use the sprintf function to convert the numbers into characters and then call the character display function of the LCD. For example:

 u16 adcx;

 float temp;
 char aa[10];

 

  adcx=Get_Adc_Average(ADC_Channel_0,10);
  temp=(float)adcx*(3.3/4096);
  sprintf(aa,"%5.2f",temp); //Convert floating point data to a string of the specified format
  LCD_ShowString(152,150,200,16,16,aa);  //Directly send character display function


This is very convenient, saving the need to create a digit processing function.
Note: Calling header files in the compiler environment

Keywords:LCD Reference address:LCD display techniques for floating point data with decimals

Previous article:Bit field operations in microcontrollers
Next article:Single LED indicator flashing control

Recommended ReadingLatest update time:2024-11-17 07:30

S3C2440 LCD module driver design
Parameter configuration: Development board model: TX2440; One pixel is represented by 16 bits; LCD screen resolution: 480*272; LCD module model: BL43014_SPEC; The image content is saved in the bmp.c file in the form of a C language array. /* *Copyright (C) 2015, ZJU * *File name: lcd.c *Abstract: About LCD configu
[Microcontroller]
S3C2440 LCD module driver design
Foxconn responds to Wisconsin: Never promised to build LCD factory
In October, Wisconsin rejected Foxconn's subsidy application on the grounds that the company failed to build the LCD factory stipulated in the contract signed with the state. However, Foxconn said in its latest filing that it had never promised to build an LCD factory in the contract.     Foxconn has already built a
[Embedded]
Foxconn responds to Wisconsin: Never promised to build LCD factory
A LCD display technology based on DSP
  1 Introduction   With the development of electronic product integration, liquid crystal displays are more widely used in portable instruments to display images or texts.   At the same time, in today's information age, digital image processing technology has increasingly higher requirements for real-time performanc
[Embedded]
LCD displays a small number of Chinese characters in STM32
How to display Chinese characters (only Chinese characters) on the LCD display in STM32? The following is my little opinion on this issue. If you have any questions, I hope readers will leave a message; The following program mainly operates on the library functions in STM32: To display Chinese characters on LCD, y
[Microcontroller]
LCD TV panel prices rise due to short supply
It is reported that Xie Qinyi, senior research director of market research firm Omdia, said that panel shortages are expected to continue in the first quarter of 2021, and panel manufacturers intend to continue to increase the average selling price of LCD TV Open Cell to the level of the first quarter of 2017.   Since
[Embedded]
Local dimming LED backlight solution for next generation 3D LCD TV
Today, the proportion of CCFL backlight in LCD TV has dropped to 15%, while the penetration of LED backlight in LCD TV has reached 50%, and as the cost of LED decreases, this proportion will certainly continue to rise. In addition, in order to further reduce power consumption, dimming LED backlight solutions are als
[Home Electronics]
Local dimming LED backlight solution for next generation 3D LCD TV
Application of an Improved UML in Embedded Systems
introduction With the rapid development of computer technology, network technology and communication technology, the current information society has entered the post-PC era from the traditional personal computer era; and the main feature of the post-PC era is the widespread application and development of embe
[Microcontroller]
Application of an Improved UML in Embedded Systems
Design and implementation of a teaching and research platform for cyclone preheaters
0 Introduction The cyclone preheater is a heat exchanger consisting of a cyclone and connecting pipes, and is widely used in new cement production processes. It uses the high-temperature exhaust gas from the cement rotary kiln to heat the cement raw material, and has many functions such as preheating and de
[Industrial Control]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号