微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI无线射频设计 > RF430FRL152H程式編寫

RF430FRL152H程式編寫

时间:10-02 整理:3721RD 点击:
我是新手第一次寫
怎麼宣告及讀取温度呢

宣告如下
enum Sensors_Types
{
REFERENCE_ADC1_SENSOR = 0x01,
THERMISTOR_ADC2_SENSOR = 0x02,
ADC0_SENSOR = 0x04,
INTERNAL_SENSOR = 0x08,
DIGITAL_SENSOR1 = 0x10,
DIGITAL_SENSOR2 = 0x20,
DIGITAL_SENSOR3 = 0x40
};

void DigitalSensorInit()
{
//ROM sets P1OUT = 0x0F, this then consumes some current
P1OUT = 0x00; // needed to reduce power consumption on RF430FRL152H EVM, since P1.3 is connected to a 2.2K Ohm resistor on the EVM to ground

P1DIR &= MASTER_SLAVE_SELECT; // check if digital sensor mode is selected
if (P1IN & MASTER_SLAVE_SELECT)
{
//P1DIR &= MASTER_SLAVE_SELECT; //host controller mode selected, exit
return;
}


return;
}

不知道語法對不對,各位指導 一下新手

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top