URL
https://opencores.org/ocsvn/lwrisc/lwrisc/trunk
[/] [lwrisc/] [trunk/] [BENCH/] [test1/] [seg7_decode.c] - Blame information for rev 19
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
16 |
mcupro |
unsigned char byte2seg7(unsigned char my_byte)
|
2 |
|
|
{unsigned char seg;
|
3 |
|
|
switch (my_byte){
|
4 |
|
|
case 0: return 0xc0;//~8'b00111111;//b11111100;
|
5 |
|
|
case 1: return 0xf6;//~8'b00000110;//01100000;
|
6 |
|
|
case 2: return 0xa4;//~8'b01011011;//11011010;
|
7 |
|
|
case 3: return 0xb0;//~8'b01001111;//11010010;
|
8 |
|
|
case 4: return 0x99;//~8'b01100110;//1100110;
|
9 |
|
|
case 5: return 0x92;//~8'b01101101;//10110110;
|
10 |
|
|
case 6: return 0x82;//~8'b01111101;//10111110;
|
11 |
|
|
case 7: return 0xf8;//~8'b00000111;//11100000;
|
12 |
|
|
case 8: return 0x8f;//~8'b01111111;//11111110;
|
13 |
|
|
case 9: return 0x90;//~8'b01101111;//11110110;
|
14 |
|
|
case 10: return 0x88;//~8'b01110111;//11101110;
|
15 |
|
|
case 11: return 0x83;//~8'b01111100;//00111110;
|
16 |
|
|
case 12: return 0xa7;//~8'b01011000;//00011010;
|
17 |
|
|
case 13: return 0xa1;//~8'b01011110;//01111010;
|
18 |
|
|
case 14: return 0x86;//~8'b01111001;//10011110;
|
19 |
|
|
case 15: return 0x8e;//~8'b01110001;//10001110;
|
20 |
|
|
default : return 0xff;}
|
21 |
|
|
}
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.