定时器PWM输出
原理图
GPD0CON, R/W, Address = 0xE020_00A0
CON, R/W, Address = 0xE250_0008
相关文章:
http://blog.csdn.net/zhangxuechao_/article/details/77841192
举例
#define TCFG0 (*(unsigned int*)0xE2500000)
#define TCFG1 (*(unsigned int*)0xE2500004)
#define CON (*(unsigned int*)0xE2500008)
#define TCNTB1 (*(unsigned int*)0xE2500018)
#define GPD0CON (*(unsigned int*)0xE02000A0)
TCFG0 = (255 << 0);
TCFG1 = (4 << 4);
TCNTB1 = 16896;
CON = (1 << 8) | (1 << 11) | (1 << 9);
CON = (1 << 8) | (1 << 11) | (0 << 9);
GPD0CON |= (2 << 4);