-
Notifications
You must be signed in to change notification settings - Fork 0
/
Actually_working_code.txt
399 lines (368 loc) · 17.3 KB
/
Actually_working_code.txt
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
/**
******************************************************************************
* @file GPIO/IOToggle/main.c
* @author MCD Application Team
* @version V1.1.0
* @date 13-April-2012
* @brief Main program body
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT 2012 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "stm32f2xx.h"
#include "stm322xg_eval.h"
#include "stm32f2xx_usart.h"
#include "pixel_art.c"
#define LED1 GPIO_Pin_3
#define LED2 GPIO_Pin_4
#define LED3 GPIO_Pin_5
#define DB7 GPIO_Pin_7
#define A0 GPIO_Pin_8
#define CLK GPIO_Pin_9
#define CS GPIO_Pin_10
#define RES GPIO_Pin_11
void GPIOinit ()
{
/* GPIOG Periph clock enable */
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE);
/* Configure PG6 and PG8 in output pushpull mode */
GPIO_InitStructure.GPIO_Pin = LED1 | LED2 | LED3 | DB7 | A0 | CLK | CS | RES; //LED1 | LED2 | LED3 | RES; //((uint16_t)0xFFFF);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init(GPIOE, &GPIO_InitStructure);
}
void Data_read (unsigned int data)
{
GPIOE->BSRRL = A0; // BSRRL means setting bit high = 1
GPIOE->BSRRH = CLK; // BSRRH meaning bit is set low = 0
GPIOE->BSRRH = CS; // follow above rule for the following code
for(int dr=0; dr<8; dr++)
{
GPIOE->BSRRH = CLK; //CLK
if(data & 0x80)
GPIOE->BSRRL = DB7;
else GPIOE->BSRRH = DB7;
data = data<<1;
GPIOE->BSRRL = CLK;
}
GPIOE->BSRRL = CS; //CS
}
void CMD_read (unsigned int cmd)
{
GPIOE->BSRRH = A0; //A0
GPIOE->BSRRH = CLK; //CLK
GPIOE->BSRRH = CS; //CS
for(int cr=0; cr<8; cr++)
{
GPIOE->BSRRH = CLK; //CLK
if(cmd & 0x80)
GPIOE->BSRRL = DB7;
else GPIOE->BSRRH = DB7;
cmd = cmd<<1;
GPIOE->BSRRL = CLK;
}
GPIOE->BSRRL = CS; //CS
}
void delayS(unsigned int clkcyc)
{
for(unsigned int i=0; i<(clkcyc*1000000); i++);
}
void setpg(char row) //Select Page within a range of 0-8 pages. (Each page contains 8 pixel rows within each page)
{
CMD_read(0xB0 | (row));
}
void setcol(char col) // Select Columns from a range of 0-127 with each column 1 pixel wide.
{
CMD_read(0x10 | (col>>4));
CMD_read(0x0f & (col));
}
void setln(char ln) // Allows selecting a 1 pixel wide row ranging from 0-63
{
CMD_read(0x40 | (ln));
}
void clear()
{
for(char x=0; x<8;x++)
{
setpg(x);
// for(char y=0; y<0x3F; y++)
// {
// setln(y);
for(char z=0; z<128;z++)
{
setcol(z);
Data_read(0x00);
}
// }
}
}
void LCD_init()
{
CMD_read(0xE2); //RESET
GPIOE->BSRRL = RES; //RES - high
delayS(1);
GPIOE->BSRRH = RES; //RES - low
delayS(1); // more than 10 microsec delay
GPIOE->BSRRL = RES; //RES - high
delayS(1);
GPIOE->BSRRH = CS; //CS -Low
CMD_read(0xA0); //LCD SEG output pins normal
CMD_read(0xC8); //LCD common output scan: reverse
CMD_read(0xA2); //LCD bias set: 1/9
CMD_read(0x2F); //Power Control Set
CMD_read(0x26); //internal resistor ratio: 5.5
CMD_read(0x81); //Contrast Command
CMD_read(26); //Contrast Value
// CMD_read(0x40); //Set Page1/Line
CMD_read(0xAF); //Display ON
// CMD_read(0xA1); // reverse display
clear();
}
//CMD_read(0xA0); //LCD SEG output pins normal
//CMD_read(0xA2); //LCD bias set: 1/9
//CMD_read(0xC8); //LCD common output scan: reverse
//CMD_read(0xF8); //4x booster
//CMD_read(0x26); //internal resistor ratio: 5.5
//CMD_read(0x99); //electronic volume register: 24H
//CMD_read(0x2F); //Power Control Set
//CMD_read(0x81); //Contrast Command
//CMD_read(0x1F); //Contrast Value
//CMD_read(0xAF); //Display ON
int main(void)
{
/*!< At this stage the microcontroller clock setting is already configured,
this is done through SystemInit() function which is called from startup
file (startup_stm32f2xx.s) before to branch to application main.
To reconfigure the default setting of SystemInit() function, refer to
system_stm32f2xx.c file
*/
/* To achieve GPIO toggling maximum frequency, the following sequence is mandatory.
You can monitor PG6 or PG8 on the scope to measure the output signal.
If you need to fine tune this frequency, you can add more GPIO set/reset
cycles to minimize more the infinite loop timing.
This code needs to be compiled with high speed optimization option. */
GPIOinit();
LCD_init();
// int obama[]= {
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF0,0xF8,0xFC,
// 0xF8,0xFC,0xFC,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
// 0xFE,0xFE,0xFC,0xFC,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xFC,0xFC,0xFC,0xFE,0xFE,
// 0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFC,0xFC,0xF8,
// 0xFC,0xF8,0xF0,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xFC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
// 0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x7F,0x1F,0x1F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x07,
// 0x07,0x07,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0F,0x7C,0xD0,0xE0,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0xE0,0xD0,0x7C,0x0F,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x07,0x07,
// 0x07,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x1F,0x1F,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,
// 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x35,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
// 0xFF,0xFF,0xFF,0x3F,0x3F,0x38,0x30,0x88,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x80,0x80,0xC0,0xC1,0xDF,0xE5,0x80,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x80,0xE5,0xDF,0xC1,0xC0,0x80,0x80,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x88,0x30,0x38,0x3F,0x3F,0xFF,0xFF,0xFF,
// 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x35,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x40,0xE3,0xFF,0xFF,0xBF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF,
// 0xFF,0xFF,0xFF,0x3E,0xFE,0xFF,0x7F,0xBB,0xF8,0xFC,0xFC,0x6C,0x6D,0x6E,0xB6,0x1E,
// 0x3E,0x3F,0x04,0x04,0x00,0x00,0x00,0x06,0x07,0x0F,0x0F,0x3F,0x3D,0x0D,0x0B,0x0F,
// 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
// 0x0F,0x0B,0x0D,0x3D,0x3F,0x0F,0x0F,0x07,0x06,0x00,0x00,0x00,0x04,0x04,0x3F,0x3E,
// 0x1E,0xB6,0x6E,0x6D,0x6C,0xFC,0xFC,0xF8,0xBB,0x7F,0xFF,0xFE,0x3E,0xFF,0xFF,0xFF,
// 0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xBF,0xFF,0xFF,0xE3,0x40,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x0F,0x0B,0x7F,0xFF,0x85,0x85,0xDF,0xFE,0xFF,0xFF,0xFF,
// 0xFF,0xFF,0xFF,0xFF,0xF1,0xF1,0xF0,0xC0,0x81,0x01,0x01,0x01,0x01,0x01,0x00,0x00,
// 0x00,0x40,0xF8,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x20,0x30,0x18,0xF0,0x90,
// 0x20,0x31,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x20,
// 0x90,0xF0,0x18,0x30,0x20,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xF8,0x40,0x00,
// 0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x81,0xC0,0xF0,0xF1,0xF1,0xFF,0xFF,0xFF,0xFF,
// 0xFF,0xFF,0xFF,0xFE,0xDF,0x85,0x85,0xFF,0x7F,0x0B,0x0F,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x07,0x07,0x0D,0x00,0x07,
// 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xEC,0xC4,0x76,0x91,0x28,
// 0x28,0xE8,0x78,0x68,0x6C,0x6C,0x6C,0x6C,0x6C,0x2C,0xA6,0xBE,0x1E,0x01,0xF1,0x1E,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x1E,0xF1,0x01,0x1E,0xBE,0xA6,0x2C,0x6C,0x6C,0x6C,0x6C,0x6C,0x68,0x78,0xE8,0x28,
// 0x28,0x91,0x76,0xC4,0xEC,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
// 0x07,0x00,0x0D,0x07,0x07,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xF0,0xF8,
// 0x05,0x0D,0x3F,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
// 0xEC,0xC8,0x80,0x80,0x00,0x01,0x01,0x03,0x03,0x02,0x03,0x01,0x80,0xFE,0x14,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x14,0xFE,0x80,0x01,0x03,0x02,0x03,0x03,0x01,0x01,0x00,0x80,0x80,0xC8,0xEC,
// 0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xFF,0xFF,0xFF,0x3F,0x0D,0x05,
// 0xF8,0xF0,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x40,0x40,0x60,0x70,0x70,0x78,0x78,0x7E,0x7F,0x7F,0x7F,0x7F,
// 0x78,0x60,0x00,0x00,0x01,0x03,0x07,0x0E,0x00,0x01,0x0B,0x37,0x7F,0x7F,0x7F,0x7F,
// 0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x3F,0x1F,0x03,0x03,0x7E,0x7F,0x7E,0x7C,0x7C,
// 0x7C,0x7C,0x78,0x78,0x78,0x78,0x70,0x78,0x70,0x70,0x60,0x60,0x60,0x60,0x40,0x00,
// 0x00,0x40,0x60,0x60,0x60,0x60,0x70,0x70,0x78,0x70,0x78,0x78,0x78,0x78,0x7C,0x7C,
// 0x7C,0x7C,0x7E,0x7F,0x7E,0x03,0x03,0x1F,0x3F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,
// 0x7F,0x7F,0x7F,0x7F,0x37,0x0B,0x01,0x00,0x0E,0x07,0x03,0x01,0x00,0x00,0x60,0x78,
// 0x7F,0x7F,0x7F,0x7F,0x7E,0x78,0x78,0x70,0x70,0x60,0x40,0x40,0x00,0x00,0x00,0x00
// };
//
// int lcdchalgayi []=
// {
// 0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x30,0x10,0x30,0x20,0x40,0x40,0x00,0x00,0x00,
// 0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x80,0xE0,0x30,0x60,
// 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x40,0x60,0x20,
// 0x20,0x20,0x30,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x30,0xE0,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xC0,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x60,0x40,0xC0,0x40,0x40,0x40,0x40,0x40,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x7E,0x43,0xC0,0x80,0x80,0x80,0x80,0x80,0xC0,0x60,0x00,0x00,
// 0x00,0x7F,0x0C,0x04,0x04,0x04,0x7F,0x07,0x00,0x00,0xE0,0x78,0x0F,0x08,0x08,0x08,
// 0x09,0x0F,0x1C,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x80,0x80,0x80,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x00,0x80,
// 0x80,0x80,0x88,0x88,0xE8,0x38,0x00,0x00,0x00,0xC0,0x3C,0x0B,0x08,0x08,0x0B,0x0E,
// 0x78,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x06,0x04,0xFC,0x04,0x07,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
// 0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x3C,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x18,0x0C,0x04,0x06,0x02,0x02,0x02,0x02,0x02,
// 0x02,0x06,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x06,
// 0x02,0x02,0x02,0x02,0x02,0x02,0x06,0x04,0x04,0x0C,0x18,0x30,0xE0,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x02,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x3F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFE,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x7F,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x1F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF0,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x0F,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
// 0x00,0x00,0x00,0x00,0x07,0x0C,0x18,0x10,0x10,0x10,0x30,0x20,0x20,0x20,0x20,0x20,
// 0x20,0x30,0x18,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x7F,
// 0x20,0x20,0x30,0x10,0x10,0x10,0x18,0x0C,0x04,0x06,0x03,0x01,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x47,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x4F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
//
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
// };
while (1)
{
// clear();
// setpg(0);
// setln();
// setcol(0);
int d = 0;
for(unsigned int a=0; a<8;a++)
{
setpg(a);
for(char b=0; b<128; b++)
{
setcol(b);
// Data_read(displaydata[(a+(8*b))]);
// Data_read(lcdchalgayi[d]);
Data_read(obama[d]);
d++;
}
}
// for(unsigned int a=0; a<128; a++)
// {
// setcol(a);
// for(char b=0; b<8; b++)
// {
// setpg(b);
//// Data_read(displaydata[(a+(8*b))]);
// Data_read(displaydata[d]);
// d++;
// }
// }
//
// setpg(0);
// setcol(0);
// Data_read(0xff);
//
// setpg(1);
// setcol(0);
// Data_read(0xf0);
//
// setpg(2);
// setcol(0);
// Data_read(0x10);
// Data_read(0xA4);
// Data_read(0xB4);
// Data_read(0xC4);
// Data_read(0xD4);
// Data_read(0xE4);
// Data_read(0xF4);
// Data_read(0x64);
// CMD_read(0x82);
/* Set PE3 and PE4 and PE5 */
GPIOE->BSRRH = LED1 | LED2 | LED3;
delayS(1);
/* Set PE3 and PE4 and PE5 */
GPIOE->BSRRL = LED1 | LED2 | LED3 | DB7;
}
}