Intel 8XC196K Series User Manual page 255

Table of Contents

Advertisement

8XC196K x , J x , CA USER'S MANUAL
/* Sample PTS control block initialization sequence.*/
void Init_PWM_toggle_PTS3(void)
{
disable();
disable_pts();
PWM_toggle_CB_3.constant2
PWM_toggle_CB_3.constant1
PWM_toggle_CB_3.pts_ptr
PWM_toggle_CB_3.ptscon
/* Sample code that could be used to generate a PWM with an EPA channel.*/
setbit(p1_reg, 0x1);
clrbit(p1_dir, 0x1);
setbit(p1_mode, 0x1); /*
setbit(ptssel, 0x3);
setbit(int_mask, 0x3)
}
void main(void)
{
Init_PWM_toggle_PTS3();
epa1_con = 0x78;
epa1_timer = 127;
t1control = 0xC2;
enable_pts();
while(1);
}
10-36
/* disable all interrupts */
/* disable the PTS interrupts */
= 127;
= 127;
= (void *)&EPA0_TIME;
= 0x42;
/*
init output
/*
set to output
set special function*/
/* toggle, timer1, compare, re-enable */
/* enable timer, up 1 micrsecond @ 16 MHz
*/
*/
*/

Advertisement

Table of Contents
loading

Table of Contents