有谁用过PIC16F1947的内部温度传感器啊?我用了,结果ADC的值也不对,同时,我发现XC8编译器里的PIC16F1947.H中的FVRCON寄存器没有定义TSEN和TSRNG位,请问这是什么原因?规格书上明明说有这个外设,但是编译器里却没有相关的寄存器定义。搞不懂。
http://ww1.microchip.com/downloads/en/DeviceDoc/41414D.pdf
// Register: FVRCON
extern volatile unsigned char FVRCON @ 0x117;
#ifndef _LIB_BUILD
asm("FVRCON equ 0117h");
#endif
// bitfield definitions
typedef union {
struct {
unsigned ADFVR0 :1;
unsigned ADFVR1 :1;
unsigned CDAFVR0 :1;
unsigned CDAFVR1 :1;
unsigned :1;
unsigned :1;
unsigned FVRRDY :1;
unsigned FVREN :1;
};
struct {
unsigned ADFVR :2;
unsigned CDAFVR :2;
};
} FVRCONbits_t;
extern volatile FVRCONbits_t FVRCONbits @ 0x117; |