• 大小: 328KB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2024-01-30
  • 语言: 其他
  • 标签: nec  例程  

资源简介

1.2009_NUEDC_Getsoon_Sample 2.2009_NUEDC_Getsoon_Sample_AD_V100 3.2009_NUEDC_Getsoon_Sample_BUZZER_V100 4.2009_NUEDC_Getsoon_Sample_DA-sin_V100 5.2009_NUEDC_Getsoon_Sample_IF_V100 6.2009_NUEDC_Getsoon_Sample_KEYBOARD_V100 7.2009_NUEDC_Getsoon_Sample_LCD_V100 8.2009_NUEDC_Getsoon_Sample_LED_V100 9.2009_NUEDC_Getsoon_Sample_NUMLED_V100 10.2009_NUEDC_Getsoon_Sample_TEMP_V100

资源截图

代码片段和文件信息

#include “digital_led.h“
/*this function is used to initilize */
void port_digital_led_init()  //init  digital_led
{
    PM8=0x00;                 //segment_control  port
P8=0x00;                  
PM4&=0b11000011;          //bit_control  port 
P4.2=0;
P4.3=0;
P4.4=0;
P4.5=0;
}
uchar getcode(uchar i)  //digital_led table ---->“k“
{
uchar p;
switch (i)
{
case 0:  p=0x3f; break; /* 0 */
case 1:  p=0x06; break; /* 1 */
case 2:  p=0x5B; break; /* 2 */
case 3:  p=0x4F; break; /* 3 */
case 4:  p=0x66; break; /* 4 */
case 5:  p=0x6D; break; /* 5 */
case 6:  p=0x7D; break; /* 6 */
case 7:  p=0x07; break; /* 7 */
case 8:  p=0x7F; break; /* 8 */
case 9:  p=0x6F; break; /* 9 */
case 0x0a: p=0x77;  break;   /* a */
case 0x0b: p=0x7c; break; /* b */
        case 0x0c: p=0x39;  break;      /* c */
case 0x0d: p=0x5e; break; /* d */
case 0x0e: p=0x79; break; /* e */
case 0x0f: p=0x71; break; /* f */
case   16: p=0x80; break; /* . */
case   17: p=0x73; break; /* p */
case   18: p=0x3e; break; /* u */
case   19: p=0x31; break; /* t */
case   20: p=0x6e; break; /* y */
case   21: p=0xff; break; /* 8.*/
case   22: p=0x00; break; /*close*/
default:  break;
}
return(p);
}
void display_digital_led()
{
if(count>=4)
{count=0;}

temp4=bit_control< P4.2=temp4.0;
P4.3=temp4.1;
P4.4=temp4.2;
P4.5=temp4.3;
seg_control=getcode(digital_led[count]);
count++;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     737742  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\a.hex

     文件      24032  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\a.lmf

     文件      13335  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\a.map

     文件       2918  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\a.sym

     文件       1540  2009-05-20 14:01  Sample_Program\2009_NUEDC_Getsoon_Sample\digital_led.c

     文件       1610  2009-05-20 11:42  Sample_Program\2009_NUEDC_Getsoon_Sample\digital_led.c.bak

     文件        323  2009-05-20 16:13  Sample_Program\2009_NUEDC_Getsoon_Sample\digital_led.h

     文件        352  2009-05-20 16:12  Sample_Program\2009_NUEDC_Getsoon_Sample\digital_led.h.bak

     文件       3276  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\digital_led.rel

     文件       4953  2009-05-20 16:13  Sample_Program\2009_NUEDC_Getsoon_Sample\ds18b20_1166.c

     文件       4955  2009-05-20 16:09  Sample_Program\2009_NUEDC_Getsoon_Sample\ds18b20_1166.c.bak

     文件        451  2009-05-20 11:27  Sample_Program\2009_NUEDC_Getsoon_Sample\ds18b20_1166.h

     文件       6740  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\ds18b20_1166.rel

     文件       3270  2009-05-20 12:55  Sample_Program\2009_NUEDC_Getsoon_Sample\keyboard_1166.c

     文件        224  2009-05-19 10:39  Sample_Program\2009_NUEDC_Getsoon_Sample\keyboard_1166.h

     文件       5644  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\keyboard_1166.rel

     文件        282  2009-05-19 19:05  Sample_Program\2009_NUEDC_Getsoon_Sample\lcd.h

     文件       1893  2009-05-19 17:54  Sample_Program\2009_NUEDC_Getsoon_Sample\lcd_1602.c

     文件       6128  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\lcd_1602.rel

     文件        313  2009-05-19 17:24  Sample_Program\2009_NUEDC_Getsoon_Sample\led_1166.c

     文件        341  2009-05-19 19:06  Sample_Program\2009_NUEDC_Getsoon_Sample\led_1166.h

     文件       2044  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\led_1166.rel

     文件       4384  2009-05-20 16:16  Sample_Program\2009_NUEDC_Getsoon_Sample\main.c

     文件       4396  2009-05-20 16:15  Sample_Program\2009_NUEDC_Getsoon_Sample\main.c.bak

     文件       2665  2009-05-20 11:40  Sample_Program\2009_NUEDC_Getsoon_Sample\main.h

     文件       7000  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\main.rel

     文件       4479  2009-06-25 12:33  Sample_Program\2009_NUEDC_Getsoon_Sample\together_1166.fni

     文件       3008  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\together_1166.mak

     文件       2155  2009-06-22 19:31  Sample_Program\2009_NUEDC_Getsoon_Sample\together_1166.plg

     文件       4634  2009-06-25 11:23  Sample_Program\2009_NUEDC_Getsoon_Sample\together_1166.prj

............此处省略194个文件信息

评论

共有 条评论