Download Print this page

Panasonic PanaXSeries MN103S65G User Manual page 12

Panasonic microcomputer user's manual

Advertisement

●Various setup of a 8-bit timer
It is a setup when using it as an interval timer.
/*******************************
* Register address
*******************************/
/* Timer 0 register address declaration */
#define TM0BC
#define TM0BR
#define TM0MD
/* Timer 1 register address declaration */
#define TM1BC
#define TM1BR
#define TM1MD
/* Timer 2 register address declaration */
#define TM2BC
#define TM2BR
#define TM2MD
/* Timer 3 register address declaration */
#define TM3BC
#define TM3BR
#define TM3MD
/* Timer 4 register address declaration */
#define TM4BC
#define TM4BR
#define TM4MD
/* Timer 5 register address declaration */
#define TM5BC
#define TM5BR
#define TM5MD
/* Timer 6 register address declaration */
#define TM6BC
#define TM6BR
#define TM6MD
/* Timer 7 register address declaration */
#define TM7BC
#define TM7BR
#define TM7MD
/* Pre-scaler register address declaration */
/* timer 0-3 */
#define TM03PSC
/* timer 4-7 */
#define TM47PSC
/* pre-scaler control register*/
#define TMEXPSC8
/* Declaration of setting data */
#define TM0MD_STOP
(*((volatile unsigned char *)0x0000A150))
(*((volatile unsigned char *)0x0000A148))
(*((volatile unsigned char *)0x0000A140))
(*((volatile unsigned char *)0x0000A151))
(*((volatile unsigned char *)0x0000A149))
(*((volatile unsigned char *)0x0000A141))
(*((volatile unsigned char *)0x0000A154))
(*((volatile unsigned char *)0x0000A14C))
(*((volatile unsigned char *)0x0000A144))
(*((volatile unsigned char *)0x0000A155))
(*((volatile unsigned char *)0x0000A14D))
(*((volatile unsigned char *)0x0000A145))
(*((volatile unsigned char *)0x0000A170))
(*((volatile unsigned char *)0x0000A168))
(*((volatile unsigned char *)0x0000A160))
(*((volatile unsigned char *)0x0000A171))
(*((volatile unsigned char *)0x0000A169))
(*((volatile unsigned char *)0x0000A161))
(*((volatile unsigned char *)0x0000A174))
(*((volatile unsigned char *)0x0000A16C))
(*((volatile unsigned char *)0x0000A164))
(*((volatile unsigned char *)0x0000A175))
(*((volatile unsigned char *)0x0000A16D))
(*((volatile unsigned char *)0x0000A165))
(*((volatile unsigned char *)0x0000A158))
(*((volatile unsigned char *)0x0000A178))
(*((volatile unsigned char *)0x0000A17C))
0x00
/* timer stop */
2-4 A 8-bit 16-bit timer, a peripheral initial
2-35

Advertisement

loading