Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Serial communication in 8051

Status
Not open for further replies.

dabdibdira

New Member
Im doing a project with 8051. Im using Keil compiler. The output from the adc, usually in the range 0-255 must be converted to the range 0-14 for display. I use a simple mathematical relation "Display value= (adc value)/255*14". I want to send this float value, say, 12.5 through serial communication and display it in the serial window.

For display of integers, say 123, I approach the following way:

123/100=1 (first digit is sent through serial communication)
(123%100)/10=2 (second digit)
123%10=3 (third digit)

What logic will work out to display float numbers?
Its urgent. Someone help as soon as possible.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top