-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtables.c
139 lines (136 loc) · 3.55 KB
/
tables.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#include "tables.h"
#include <stdint.h>
//0-63 -> 0-65535
//CIE 1931 lightness
//values are powers of 4 so ccp pr matches timer1 when timer1 uses FOSC
//as timer1 advances by 4 every clock cycle when source is FOSC
//(powers of 2 probably work also it seems, but went with 4)
const uint16_t tables_bright[64]={
0,112,228,344,460,572,696,836,992,1164,1356,1572,1804,2064,2344,2648,2976,
3332,3716,4128,4568,5040,5540,6076,6644,7248,7884,8560,9268,10020,10808,
11640,12508,13424,14380,15380,16428,17520,18660,19848,21088,22376,23716,
25108,26556,28056,29612,31224,32896,34624,36412,38260,40172,42144,44180,
46280,48448,50680,52980,55352,57788,60300,62880,65532
};
const uint8_t tables_segment_hex[16] = {
//DP A B C D E F G
// 0-9
0b01111110, //0
0b00110000, //1
0b01101101, //2
0b01111001, //3
0b00110011, //4
0b01011011, //5
0b01011111, //6
0b01110000, //7
0b01111111, //8
0b01111011, //9
//hex A - F
0b01110111, //A
0b00011111, //b
0b01001110, //C
0b00111101, //d
0b01001111, //E
0b01000111 //F
//A b C c d E F g H h i I J L l n O o P q r S U u y
};
const uint8_t tables_segment_ascii[128] = {
//DP A B C D E F G
// 32-127
0b00000000, //32 space
0b10110000, //33 ! (1 + DP)
0b00100010, //34 "
0b00111111, //35 #
0b01011011, //36 $ (5)
0b00010011, //37 %
0b00011011, //38 &
0b00000010, //39 '
0b01001110, //40 ( (C)
0b01111000, //41 ) (])
0b01001001, //42 *
0b00110001, //43 +
0b00000100, //44 ,
0b00000001, //45 -
0b10000000, //46 . (dp)
0b00100101, //47 /
0b01111110, //48 0
0b00110000, //49 1
0b01101101, //50 2
0b01111001, //51 3
0b00110011, //52 4
0b01011011, //53 5
0b01011111, //54 6
0b01110000, //55 7
0b01111111, //56 8
0b01111011, //57 9
0b01001000, //58 :
0b01010000, //59 ;
0b01000011, //60 <
0b00001001, //61 =
0b01100001, //62 >
0b01101001, //63 ?
0b01111010, //64 @
0b01110111, //65 A
0b00011111, //66 B (b)
0b01001110, //67 C
0b00111101, //68 D (d)
0b01001111, //69 E
0b01000111, //70 F
0b01111011, //71 G (9)
0b00110111, //72 H
0b00110000, //73 I (1)
0b00111100, //74 J
0b00001111, //75 K (k)
0b00001110, //76 L
0b01110110, //77 M
0b00010101, //78 N (n)
0b01111110, //79 O (0)
0b01100111, //80 P
0b01110011, //81 Q (q)
0b00000101, //82 R (r)
0b01011011, //83 S (5)
0b00000111, //84 T (t)
0b00111110, //85 U
0b00111110, //86 V (U)
0b00111111, //87 W
0b00010011, //88 X
0b00100111, //89 Y
0b01101101, //90 Z (2)
0b01001110, //91 [ (C)
0b00100101, //92 slash
0b01111000, //93 ]
0b01100010, //94 ^
0b00001000, //95 _
0b00000010, //96 `
0b01110111, //97 a (A)
0b00011111, //98 b
0b00001101, //99 c
0b00111101, //100 d
0b01001111, //101 e (E)
0b01000111, //102 f (F)
0b01111011, //103 g (9)
0b00010111, //104 h
0b00010000, //105 i
0b00111100, //106 j (J)
0b00001111, //107 k
0b00001110, //108 l (L)
0b01110110, //109 m (M)
0b00010101, //110 n
0b00011101, //111 o
0b01100111, //112 p (P)
0b01110011, //113 q
0b00000101, //114 r
0b01011011, //115 s *5)
0b00000111, //116 t
0b00011100, //117 u
0b00111110, //118 v (U)
0b00111111, //119 w (W)
0b00010011, //120 x (X)
0b00100111, //121 y (Y)
0b01101101, //122 z (2)
0b01001110, //123 { (C)
0b00110000, //124 | )1)
0b01111000, //125 } (])
0b01000000, //126 ~
0b0 //127
};