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.

Displaying a number from 0-999

Status
Not open for further replies.

Eric926

New Member
Okay I have used a 671 to get a count that will vary from 0 to a bit under 999 max. Now I want to display this number on 3 7-segment displays. I know how to do the look-up table for a number from 0 to 9, but I'm not sure on how to go from there. How do I take the number from the 671, send it to the f84, and then split it up into ones and tens and hundreds to display in Assembly?
 
Eric926 said:
Okay I have used a 671 to get a count that will vary from 0 to a bit under 999 max. Now I want to display this number on 3 7-segment displays. I know how to do the look-up table for a number from 0 to 9, but I'm not sure on how to go from there. How do I take the number from the 671, send it to the f84, and then split it up into ones and tens and hundreds to display in Assembly?

For a start, what's a 671?

If the number is binary (10 bit for 999), you need to first convert it to decimal digits, then display it.
 
Eric926 said:
12C671
I'm not sure how to go to decimal in assembly though.

Look in my tutorials, the LCD ones include a routine (which I got off the PICList) to convert a 16 bit number to decimal.

There are various similar routines on the PICList, it should be your first stop for all things PIC 8)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top