| ??? 12/02/07 14:53 Read: times |
#147715 - Timer interrupt and segments in RAM Responding to: ???'s previous message |
Hi !
Most often I do this kind of things using timer interrupt to refresh the 7-segment display. As the display is usually multiplexed it would be very hard to do it othervise and get a steady display with no flickering. Actually the conversion from digits to the actual segments is best done outside the interrupt. This means that the interrupt service does not need to do the conversion and the result is also more flexible. As stated earlier there is actually 8 segments in most displays so this will do 8 bits for digit - how convenient. All You need is a 3 byte public buffer (in Your case) and have the interrupt take care of multiplexing. This means that You have all the time in the world to fill in the segment buffer which would not be the case if You allow the interrupt to do this task. |



