松翰2711芯片c语言程序,SN8P2711-C语言程序例子.doc

SN8P2711-C语言程序例子.doc

SN8P2711-C语言程序例子

/*C************************************************************************

* 文件名: gyyls_voltage.c

*--------------------------------------------------------------------------

* Copyright (c) CAESAR

*--------------------------------------------------------------------------

* 创建: CAESAR

*--------------------------------------------------------------------------

* 版本: V1.0

*--------------------------------------------------------------------------

* 日期:

*--------------------------------------------------------------------------

* 功能:

*

*

*--------------------------------------------------------------------------

* 说明:

*

**************************************************************************/

/*__包含文件_____________________________________________________________*/

#include

#include "compiler.h"

#include "temperature_displayer.h"

/*__变量定义_____________________________________________________________*/

Uint16 vol_ad1;

Uint16 time_10ms;

Uint16 time_1sec;

Uchar temperature_low_segment;

Uchar temperature_high_segment;

//Uint16 temp16;

//Uint16 voltage;

//Uchar temp320_a;

//Uchar temp321_a;

//Uchar temp320_b;

//Uchar temp321_b;

//Uchar x1,x2,x3,x4;

Uint16 __ROM NTC_TABLE[]=

{

3035,

3001,2965,2930,2894,2858,2821,2784,2747,2709,2671,

2633,2594,2556,2516,2478,2438,2399,2360,2321,2281,

2243,2203,2164,2125,2086,2048,2010,1972,1934,1896,

1859,1822,1786,1750,1714,1678,4090,1609,1575,1541,

1508,1475,1443,1412,1380,1350,1319,1290,1261,1232,1204,

1176,100,

};

s_bit_variable flag_together;

Uchar __ROM CODE_TABLE[]=

{

0x11, //0

0xDB, //1

0x0D, //2

0x0B, //3

0xC3, //4

0x23, //5

0x21, //6

0x9B, //7

0x01, //8

0x03, //9

0x10, //'-'

0x25, //'E'

0xff,

};

/*__宏定义_______________________________________________________________*/

#define flag_byteflag_together.byte

#define ADC_YN 0

#define DISPLAY_1SEG_YN 1

#define TEMPERATURE_GET_YN 2

#defi

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1 1 1 PRODUCT OVERVIEW 1.1 FEATURES  Features Selection Table CHIP ROM RAM Stack Timer I/O ADC ADC Int. Ref. Green Mode PWM Wake-up Pin No. Package TC0 TC1 Buzzer SN8P2711A 1K 64 4 V V 12 5+1 V V 2 5 DIP14/SOP14/ SSOP16  Memory configuration  Two 8-bit Timer/Counter ROM size: 1K * 16 bits. One 8-bit timer with external event counter, RAM size: 64 * 8 bits. Buzzer0 and PWM0. (TC0). One 8-bit timer with external event counter,  4 levels stack buffer. Buzzer1 and PWM1. (TC1).  5 interrupt sources  5+1 channel 12-bit SAR ADC. 3 internal interrupts: TC0, TC1, ADC Five external ADC input 2 external interrupt: INT0, INT1 One internal battery measurement Internal AD reference voltage (VDD, 4V, 3V, 2V).  I/O pin configuration Bi-directional: P0, P4, P5.  On chip watchdog timer and clock source is Input only: P0.4. Internal low clock RC type (16KHz(3V), 32KHz(5V)) Pull-up resisters: P0, P4, P5. Wakeup: P0 level change.  4 system clocks ADC input pin: P4.0~P4.4. External high clock: RC type up to 10 MHz External Interrupt trigger edge: External high clock: Crystal type up to 16 MHz P0.0 controlled by PEDGE register. Internal high clock: 16MHz RC type P0.1 is falling edge trigger only. Internal low clock: RC type 16KHz(3V), 32KHz(5V)  3-Level LVD  4 operating modes Reset system and power monitor. Normal mode: Both high and low clock active Slow mode: Low clock only.  Powerful instructions Sleep mode: Both high and low clock stop Instruction‟s length is one word. Green mode: Periodical wakeup by TC0 timer Most of instructions are one cycle only. All ROM area JMP/CALL instruction.  Package (Chip form support) All ROM area lookup table function (MOVC). DIP 14 pin SOP 14 pin  Fcpu (Instruction cycle) SSOP 16 pin Fcpu = Fosc/1, Fosc/2, Fosc/4, Fosc/8, Fosc/16,

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值