This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to conventer unsigned long to BCD code faster?

just as titleï¼
now i'am use this method:
a=value%1000/100;
b=value%100/10;
c=value%10;
but it's slow,any faster methods?
thanksï¼

Parents
  • You do not need to produce a display update for every pulse you get. Our human brain has a limited capacity - it takes a lot of time for us to read, and if you update too often then the last digit(s) on the display will be hard to see because every reading will vary a bit, making the last digit(s) constantly change value.

    If you have a sensor that produces a lot of readings, then you may decide to measure the time of 5 pulse periods instead.

Reply
  • You do not need to produce a display update for every pulse you get. Our human brain has a limited capacity - it takes a lot of time for us to read, and if you update too often then the last digit(s) on the display will be hard to see because every reading will vary a bit, making the last digit(s) constantly change value.

    If you have a sensor that produces a lot of readings, then you may decide to measure the time of 5 pulse periods instead.

Children
No data