??? 09/18/08 04:51 Read: times |
#158348 - Lookup Table Responding to: ???'s previous message |
A lookup table is simply an array of data. In C that could be an array of bytes. In Assembler language it would be a label followed by a series of DB statements. The data byte values in the array are the various valid combinations of data that are required to operate your seven segment display. For example if the display is driven by the pins of one specific I/O port then the byte values in the array would be values to sent to that port for each of the display segment combinations you want to support. Arrange the list of values in the array in an order that makes some sense. The index to access the array then takes advantage of the order in the list to effectively select the proper value per index value. For example if the 7-segment display is to be used to show the digits 0 to 9 arrange the segment pattern values in the list so the pattern for a "0" is at list location zero, for a "1" is at list location 1 and so forth up to and including the pattern for the "9". Now when setting out to display a particular digit value use the number value of 0 to 9 as the index to the array and at that location pull out the segment pattern and sent to the I/O port!!
Michael Karas |
Topic | Author | Date |
lookup tables | 01/01/70 00:00 | |
Lookup Table | 01/01/70 00:00 | |
7-Segment Lookup Table - Example | 01/01/70 00:00 | |
lookup tables | 01/01/70 00:00 | |
pardon? | 01/01/70 00:00 | |
faq | 01/01/70 00:00 | |
Accessible FAQ | 01/01/70 00:00 | |
Oh, yes. Thanks for the correction.![]() | 01/01/70 00:00 |