3031 views|1 replies
- Last login
- 2023-3-9
- Online Time
- 211 hours
- Prestige
- 16 points
- Points
- 0 points
|
Please help me with a simple program about CC2530
[Copy link]
#include
#define uint unsigned int #define uchar unsigned char void Init_T1() { PERCFG=0x00; //Timer 1 spare position 1 P0SEL=0xFF; T1CTL|=0X0E; //Mode: modulo; 128 division T1CC0H=0X04; T1CC0L=0X11; //Frequency: 120HZ T1CC1H=0X00; T1CC1L=0XFF; //Duty cycle adjustable T1CCTL1=0X2C; //Select timer 1 channel 1 as comparison mode //Channel 1 comparison mode: 5(101): clear when equal to T1CC0, set when equal to T1CC1} void main() { Init_T1(); while(1); }
|
|