| ??? 02/10/03 02:47 Read: times |
#38683 - RE: check code for 7-segment display Responding to: ???'s previous message |
Dear Waqar, I do this. Just check if it is OK for you also. 1. First write a look up table for digits 0-9 and store in the ROM. It will have nine hex values that when ported to P2 (which is connected to the segment drive) will light up the relevant LEDs for the required digit. 2. Reserve 4 bytes in RAM ( if you want 4 digits ). Call it DISRAM 3. Keep updating DISRAM at the some regular intervals with clock data. ( once in 0.5 Secs is OK if you are displaying HH:MM ) 4. Now have an ISR for every 1 Sec ( you already have one - use it )and in that move the DISRAM data to the port P2 in sequence so that the HH:MM display is updated. Finally when you have got the above going, plan to have a trap so that the display update ISR will never happen when update to to DISRAM is underway (to avoid any jitters in display ) Have fun. Raghu |
| Topic | Author | Date |
| check code for 7-segment display | 01/01/70 00:00 | |
| RE: check code for 7-segment display | 01/01/70 00:00 | |
| RE: check code for 7-segment display | 01/01/70 00:00 | |
| RE: check code for 7-segment display | 01/01/70 00:00 | |
RE: check code for 7-segment display | 01/01/70 00:00 |



