Chapter 3
eSL/eSLS Series (+ eSLZ000) User’s Manual
Peripheral Control
••••
89
3.4.5 Examples
/* Set PWM register and output a square waveform to PORTA0* /
….
…..
POWERON:
R0=#0X0003
;
Set PWM0(A0),PWM1(A1) output
IO[PDIRA]=R0
R0=#0X0200
IO[PWMCON]=R0
;
Clear and disable PWM counter
R0=#0X1FC0
IO[PWMD]=R0
;
Set PWM duty =(1/16384000)*(0X7F+1)=7.8us
R0=#0x7FC0
;
Set PWM period
=(1/16384000)*(#0x1FF+1)=31.25us
IO[PWMP]=R0
R0=#0X8C0C
IO[PWMCON]=R0
/* enable PWM,reguar current,volume=1/1,no repeat,
single-ended mode, left-aligned ,both PWM0 PWM1 output,
clock=Fpll/1 */
_Delay:
;
Main loop
JMP _Delay
Содержание eSL Series
Страница 8: ...Contents viii Contents eSL eSLS Series eSLZ000 User s Manual...
Страница 11: ...Contents eSL eSLS Series eSLZ000 User s Manual Contents xi...
Страница 12: ......
Страница 28: ......
Страница 110: ...Chapter 3 98 Peripheral Control eSL eSLS Series eSLZ000 User s Manual BC IO INTF1 ADIF RETI...
Страница 115: ...Chapter 3 eSL eSLS Series eSLZ000 User s Manual Peripheral Control 103...
Страница 148: ......
Страница 154: ...Chapter 4 142 Electrical Characteristics eSL eSLS Series eSLZ000 User s Manual...