文件名称:ADC_VoltageSample
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 18kb
- 下载次数:
- 0次
- 提 供 者:
- Z**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
ADC_VoltageSample.rar,c8051f020 adc转换程序-sfr16 DP = 0x82 // data pointer
sfr16 TMR3RL = 0x92 // Timer3 reload value
sfr16 TMR3 = 0x94 // Timer3 counter
sfr16 ADC0 = 0xbe // ADC0 data
sfr16 ADC0GT = 0xc4 // ADC0 greater than window
sfr16 ADC0LT = 0xc6 // ADC0 less than window
sfr16 RCAP2 = 0xca // Timer2 capture/reload
sfr16 T2 = 0xcc // Timer2
sfr16 RCAP4 = 0xe4 // Timer4 capture/reload
sfr16 T4 = 0xf4 // Timer4
sfr16 DAC0 = 0xd2 // DAC0 data
sfr16 DAC1 = 0xd5 // DAC1 data
#define SYSCLK 22118400 // SYSCLK frequency in Hz
#define SAMPLE_RATE 50000 // Sample frequency in Hz
#define AMX0SL_AIN 0 // 0=AIN0....7=AIN7,8=TEMP
#define LEDCTL0Low P4&=~0x01
#define LEDCTL0High P4|=0x01
#define LEDCTL1Low P4&=~0x02
#define
sfr16 TMR3RL = 0x92 // Timer3 reload value
sfr16 TMR3 = 0x94 // Timer3 counter
sfr16 ADC0 = 0xbe // ADC0 data
sfr16 ADC0GT = 0xc4 // ADC0 greater than window
sfr16 ADC0LT = 0xc6 // ADC0 less than window
sfr16 RCAP2 = 0xca // Timer2 capture/reload
sfr16 T2 = 0xcc // Timer2
sfr16 RCAP4 = 0xe4 // Timer4 capture/reload
sfr16 T4 = 0xf4 // Timer4
sfr16 DAC0 = 0xd2 // DAC0 data
sfr16 DAC1 = 0xd5 // DAC1 data
#define SYSCLK 22118400 // SYSCLK frequency in Hz
#define SAMPLE_RATE 50000 // Sample frequency in Hz
#define AMX0SL_AIN 0 // 0=AIN0....7=AIN7,8=TEMP
#define LEDCTL0Low P4&=~0x01
#define LEDCTL0High P4|=0x01
#define LEDCTL1Low P4&=~0x02
#define
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ADC_VoltageSample\ADC1Voltage
.................\ADC1Voltage.hex
.................\ADC1Voltage.lnp
.................\ADC1Voltage.M51
.................\ADC1Voltage.plg
.................\ADC_VoltageSample.c
.................\ADC_VoltageSample.LST
.................\ADC_VoltageSample.OBJ
.................\ADC_VoltageSample.Opt
.................\ADC_VoltageSample.Uv2
.................\ADC_VoltageSample_Uv2.Bak
ADC_VoltageSample
.................\ADC1Voltage.hex
.................\ADC1Voltage.lnp
.................\ADC1Voltage.M51
.................\ADC1Voltage.plg
.................\ADC_VoltageSample.c
.................\ADC_VoltageSample.LST
.................\ADC_VoltageSample.OBJ
.................\ADC_VoltageSample.Opt
.................\ADC_VoltageSample.Uv2
.................\ADC_VoltageSample_Uv2.Bak
ADC_VoltageSample