📄 24m点阵时钟.lst
字号:
219
220 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
221 {0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"一",0*/
222 {0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00},
223 {0x00,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFE,0x00,0x00,0x00},/*"二",1*/
224 {0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00},
225 {0x00,0x00,0xFC,0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00},/*"三",2*/
226 {0x00,0x7F,0x44,0x44,0x44,0x44,0x44,0x44,0x48,0x48,0x50,0x60,0x40,0x7F,0x40,0x00},
227 {0x00,0xFC,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x7C,0x04,0x04,0x04,0xFC,0x04,0x00},/*"四",3*/
228 {0x00,0x7F,0x02,0x02,0x02,0x02,0x02,0x3F,0x04,0x04,0x04,0x04,0x04,0xFF,0x00,0x00},
229 {0x00,0xF8,0x00,0x00,0x00,0x00,0x20,0xF0,0x20,0x20,0x20,0x20,0x24,0xFE,0x00,0x00},/*"五",4*/
230 {0x04,0x03,0x01,0x01,0xFF,0x00,0x00,0x04,0x06,0x04,0x08,0x08,0x10,0x20,0x40,0x00},
231 {0x00,0x00,0x80,0x00,0xFE,0x00,0x00,0x80,0x40,0x20,0x10,0x18,0x0C,0x0C,0x08,0x00},/*"六",5*/
232 {0x00,0x1F,0x10,0x10,0x10,0x10,0x1F,0x10,0x10,0x10,0x10,0x10,0x1F,0x10,0x00,0x00},
233 {0x00,0xF0,0x10,0x10,0x10,0x10,0xF0,0x10,0x10,0x10,0x10,0x10,0xF0,0x10,0x00,0x00},/*"日",0*/
234
235 };
236
237 uchar code SONG_WORDS[][16] = {
238 {0x00,0x1F,0x10,0x10,0x14,0x12,0x11,0x10,0x10,0x11,0x12,0x24,0x28,0x40,0x80,0x00},
239 {0x00,0xF8,0x08,0x48,0x68,0x48,0x48,0x88,0x88,0x48,0x6A,0x2A,0x26,0x06,0x02,0x00},/*"风",0*/
240 {0x01,0xFF,0x01,0x01,0x7F,0x00,0x3F,0x21,0x21,0x3F,0x20,0x20,0x40,0x40,0x80,0x00},
241 {0x00,0xFE,0x00,0x00,0xFC,0x00,0xF8,0x08,0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00},/*"声",1*/
C51 COMPILER V8.05a 24M点阵时钟 09/28/2010 07:26:18 PAGE 5
242 {0x00,0xFF,0x01,0x01,0x3F,0x31,0x29,0x25,0x31,0x29,0x25,0x21,0x21,0x21,0x21,0x20},
243 {0x00,0xFE,0x00,0x00,0xF8,0x88,0x48,0x28,0x88,0x48,0x28,0x08,0x08,0x08,0x28,0x10},/*"雨",2*/
244 {0x01,0xFF,0x01,0x01,0x7F,0x00,0x3F,0x21,0x21,0x3F,0x20,0x20,0x40,0x40,0x80,0x00},
245 {0x00,0xFE,0x00,0x00,0xFC,0x00,0xF8,0x08,0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00},/*"声",3*/
246 {0x01,0xFF,0x01,0x01,0x7F,0x00,0x3F,0x21,0x21,0x3F,0x20,0x20,0x40,0x40,0x80,0x00},
247 {0x00,0xFE,0x00,0x00,0xFC,0x00,0xF8,0x08,0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00},/*"声",4*/
248 {0x01,0xFF,0x01,0x01,0x7F,0x00,0x3F,0x21,0x21,0x3F,0x20,0x20,0x40,0x40,0x80,0x00},
249 {0x00,0xFE,0x00,0x00,0xFC,0x00,0xF8,0x08,0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00},/*"声",5*/
250 {0x0C,0x06,0x02,0x01,0x03,0x02,0x02,0x04,0x04,0x08,0x08,0x10,0x20,0x40,0x80,0x00},
251 {0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x40,0x20,0x20,0x10,0x08,0x0E,0x04,0x00,0x00},/*"入",6*/
252 {0x00,0x7F,0x08,0x08,0x0F,0x08,0x08,0x0F,0x08,0x08,0x08,0xFF,0x00,0x00,0x00,0x00},
253 {0x00,0xFE,0x10,0x10,0xF0,0x10,0x10,0xF0,0x10,0x10,0xFE,0x90,0x10,0x10,0x10,0x10},/*"耳",7*/
254 {0x02,0x01,0x3F,0x40,0x5F,0x01,0x02,0x0F,0x72,0x04,0x19,0x66,0x18,0x60,0x05,0x02},
255 {0x00,0x00,0xFE,0x04,0xE8,0x00,0x00,0x20,0xB0,0xC0,0xC0,0xB0,0x8E,0x84,0x00,0x00},/*"家",8*/
256 {0x01,0xFF,0x01,0x1F,0x11,0x1F,0x01,0x3F,0x01,0xFF,0x01,0x3F,0x01,0x09,0x05,0x02},
257 {0x00,0xFE,0x00,0xF8,0x08,0xF8,0x00,0xF8,0x08,0xFE,0x08,0xF8,0x08,0x00,0x00,0x00},/*"事",9*/
258 {0x00,0x7F,0x40,0x5F,0x41,0x41,0x41,0x4F,0x41,0x41,0x41,0x5F,0x40,0x40,0x7F,0x40},
259 {0x00,0xFC,0x04,0xF4,0x04,0x04,0x04,0xE4,0x44,0x24,0x24,0xF4,0x04,0x04,0xFC,0x04},/*"国",10*/
260 {0x01,0xFF,0x01,0x1F,0x11,0x1F,0x01,0x3F,0x01,0xFF,0x01,0x3F,0x01,0x09,0x05,0x02},
261 {0x00,0xFE,0x00,0xF8,0x08,0xF8,0x00,0xF8,0x08,0xFE,0x08,0xF8,0x08,0x00,0x00,0x00},/*"事",11*/
262 {0x01,0xFF,0x01,0x1F,0x11,0x1F,0x01,0x3F,0x01,0xFF,0x01,0x3F,0x01,0x09,0x05,0x02},
263 {0x00,0xFE,0x00,0xF8,0x08,0xF8,0x00,0xF8,0x08,0xFE,0x08,0xF8,0x08,0x00,0x00,0x00},/*"事",12*/
264 {0x01,0xFF,0x01,0x1F,0x11,0x1F,0x01,0x3F,0x01,0xFF,0x01,0x3F,0x01,0x09,0x05,0x02},
265 {0x00,0xFE,0x00,0xF8,0x08,0xF8,0x00,0xF8,0x08,0xFE,0x08,0xF8,0x08,0x00,0x00,0x00},/*"事",13*/
266 {0x08,0x04,0x06,0x04,0x7F,0x01,0x01,0x01,0xFF,0x01,0x02,0x04,0x08,0x10,0x20,0x40},
267 {0x20,0x30,0x20,0x48,0xFC,0x00,0x00,0x00,0xFE,0x00,0x80,0x40,0x20,0x30,0x1C,0x08},/*"关",14*/
268 {0x02,0x01,0x00,0x00,0x08,0x08,0x08,0x48,0x48,0x48,0x88,0x08,0x08,0x08,0x07,0x00},
269 {0x00,0x00,0x80,0xC0,0x80,0x00,0x10,0x08,0x04,0x06,0x04,0x10,0x10,0x10,0xF0,0x00},/*"心",15*/
270
271
272 };
273 uchar code CPYRT_WORDS[][16] = {
274
275 {0x00,0x08,0x04,0x04,0x7B,0x01,0x22,0x12,0x0C,0x06,0x09,0x11,0x20,0x40,0x00,0x00},
276 {0x00,0x02,0x04,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x04,0x04,0x0C,0x00,0x00},/*"刘",0*/
277 {0x00,0x01,0x00,0x00,0x3F,0x60,0x00,0x3F,0x01,0x01,0x01,0x01,0x00,0x03,0x00,0x00},
278 {0x00,0x00,0x80,0x04,0xFC,0x00,0x04,0xF8,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00},/*"宁",1*/
279 {0x00,0x06,0x14,0x24,0x3F,0x44,0x7F,0x04,0x24,0x3F,0x24,0x24,0x25,0x04,0x00,0x00},
280 {0x00,0x02,0x02,0x92,0x12,0x12,0xD2,0x12,0x52,0xD2,0x52,0x42,0x82,0x0C,0x04,0x00},/*"制",2*/
281 {0x00,0x0C,0x08,0x09,0x11,0x1A,0x34,0x54,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00},
282 {0x00,0xC0,0x80,0x04,0xF8,0x40,0x40,0x7C,0x40,0x40,0x44,0x78,0x40,0x40,0x00,0x00},/*"作",3*/
283 };
284
285 void Put_Wdispram(uchar code *WORDS[][8]){ //,uchar first_word
*** WARNING C235 IN LINE 285 OF 24M点阵时钟.C: parameter 1: different types
286 1 uchar i;
287 1 disword[0] = &NO_WORDS[12][0];
288 1 for(i=1;i<25;i++){
289 2 disword[i] = &WORDS[i-1][0]; //first_word+
*** WARNING C182 IN LINE 289 OF 24M点阵时钟.C: pointer to different objects
290 2 }
291 1 }
292
293 void Put_Hdispram(){
294 1 uchar i;
295 1 for(i=0;i<10;i++){
296 2 h_dispram[i] = *(disword[i+start_word]+hang); //
297 2 }
298 1 }
299
300 void Move_Left(){
301 1 uchar i;
C51 COMPILER V8.05a 24M点阵时钟 09/28/2010 07:26:18 PAGE 6
302 1 for(i=0;i<9;i++){
303 2 h_dispram[i] = (h_dispram[i] << (move_times)) | (h_dispram[i+1] >> (8-move_times));
304 2 }
305 1 }
306
307 void Move_Right(){
308 1 uchar i;
309 1 for(i=9;i>0;i--){
310 2 h_dispram[i] = (h_dispram[i] >> (move_times)) | (h_dispram[i-1] << (8-move_times));
311 2 }
312 1 }
313
314 void RL_Move(){
315 1 //
316 1 switch(MSG_MV){
317 2 case MSG_MV_L: //左移
318 2 Move_Left();
319 2 break;
320 2 case MSG_MV_R: //右移
321 2 Move_Right();
322 2 break;
323 2 case MSG_NONE:
324 2 break;
325 2 default:
326 2 break;
327 2 }
328 1 }
329
330 void Move_Up(){
331 1 //
332 1 uchar i,j,m,n;
333 1 for(m=0;m<16;m++){
334 2 for(n=0;n<8;n++){
335 3 for(j=0;j<16-m;j++){
336 4 for(i=0;i<10;i++){
337 5 h_dispram[i] = *(disword[i]+m+j); //
338 5 }
339 4 Show_Line();
340 4 }
341 3 for(j=16-m;j<16;j++){
342 4 for(i=0;i<10;i++){
343 5 h_dispram[i] = *(disword[i+8]+m+j-16); //0x00
344 5 }
345 4 Show_Line();
346 4 }
347 3 }
348 2 }
349 1 }
350
351 void Move_Down(){
352 1 //
353 1 uchar i,j,m,n;
354 1 for(m=0;m<16;m++){
355 2 for(n=0;n<8;n++){
356 3 for(j=0;j<m;j++){
357 4 for(i=0;i<10;i++){
358 5 h_dispram[i] = *(disword[i+8]+15-m+j); //
359 5 }
360 4 Show_Line();
361 4 }
362 3 for(j=m;j<16;j++){
363 4 for(i=0;i<10;i++){
C51 COMPILER V8.05a 24M点阵时钟 09/28/2010 07:26:18 PAGE 7
364 5 h_dispram[i] = *(disword[i]-m+j); //0x00
365 5 }
366 4 Show_Line();
367 4 }
368 3 }
369 2 }
370 1 }
371
372 void UD_Move(){
373 1 //
374 1 switch(MSG_MV){
375 2 case MSG_MV_U: //左移
376 2 // Move_Up();
377 2 break;
378 2 case MSG_MV_D: //右移
379 2 // Move_Down();
380 2 break;
381 2 case MSG_NONE:
382 2 break;
383 2 default:
384 2 break;
385 2 }
386 1 }
387
388 void Show_Line(){
389 1 uchar m;
390 1 OE=1;
391 1 for(m =0;m<8;m++)
392 1 {
393 2 SendData = h_dispram[m+1];
394 2 SendByte();
395 2 }
396 1 STB = 0;
397 1 STB = 1; //上升沿数据锁存
398 1 RowsCan(); //行扫描
399 1 OE = 0;
400 1 // delay(); //
401 1 }
402
403 void Show_sWord(){
404 1 int m,i;//
405 1 hang = 0;
406 1 for(m=0;m<14;m++){
407 2 for(i=0;i<16;i++){
408 3 Put_Hdispram(); //把第i行放入行缓冲
409 3 Show_Line();
410 3 //delay(); //看需要
411 3 }
412 2
413 2 }
414 1 }
415 void Show_Move_Word(uchar code *WORDS[][8]){
416 1 int m,i;
417 1 while(1){
418 2 for(m=0;m<6;m++){ //若要上下移动 m=16
419 3 //hang = 0;
420 3 for(i=0;i<16;i++){
421 4 Put_Hdispram(); //把第i行放入行缓冲
422 4 RL_Move(); //是否要左右移动
423 4 Show_Line();
424 4 //delay(); //看需要
425 4 }
C51 COMPILER V8.05a 24M点阵时钟 09/28/2010 07:26:18 PAGE 8
426 3 //UD_Move(); //是否要上下移动
427 3 }
428 2 //========================================
429 2 //测试左移右移 切换时有跳变!!
430 2 // if(MSG_MV){
431 2 move_times++;
432 2 if((move_times == 9) && (MSG_MV == MSG_MV_L)){
433 3 move_times = 1;
434 3 Put_Wdispram(WORDS);
435 3 start_word++;
436 3 switch(STATE){
437 4 case STA_gTEMP:
438 4 Read_Temperature();
*** WARNING C206 IN LINE 438 OF 24M点阵时钟.C: 'Read_Temperature': missing function-prototype
439 4 Disp_Temperature(); //
440 4 Put_gTEMP(); //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -