![Samsung S3C80M4/F80M4 User Manual Download Page 218](http://html1.mh-extra.com/html/samsung/s3c80m4-f80m4/s3c80m4-f80m4_user-manual_3996174218.webp)
8-BIT PULSE WIDTH MODULATION
S3C80M4/F80M4
12-2
8-BIT PULSE WIDTH MODULATION (PWMCON)
The PWM control register, PWMCON is used to select the PWM interrupt to enable or disable the PWM function.
It is located in set 1, bank 0 at address E8H, and is read/write addressable using register addressing mode.
A reset clears PWMCON to "00H". This disable the PWM interrupt, selects an input clock frequency of fosc/64,
disables all PWM interrupt. So, if you want to use the PWM, you must write PWMCON.5 to “1” and write
P0CONH.5-.4 to “10”.
To enable the PWM interrupt (IRQ2, vector EAH), you must write PWMCON.2, and PWMCON.1 to “1”. To detect
an interrupt pending condition when PWMINT is disabled, the application program polls pending bit, PWMCON.0.
When a “1” is detected, a PWM interrupt is pending. When PWMINT sub-routine has been serviced, the pending
condition must be cleared by software by writing a “0” to the PWM interrupt pending bit, PWMCON.0.
PWM input clock selection bits:
00 = fosc/64
01 = fosc/8
10 = fosc/2
11 = fosc/1
PWM Control Register (PWMCON)
E8H, Set 1, Bank 0, R/W
.7
.6
.5
.4
.3
.2
.1
.0
MSB
LSB
PWMDATA reload interval Selection bit:
0 = Reload from 8-bit up counter overflow
1 = Reload from 6-bit up counter overflow
PWM overflow interrupt pending bit:
0 = No interrupt pending (when read)
0 = Clear pending bit (when write)
1 = Interrupt is pending (when read)
1 = No effect (when write)
PWM counter enable bit:
0 = Stop counter
1 = Start counter (Resume countering)
PWM overflow interrupt enable bit:
(8-bit overflow)
0 = Disable interrupt
1 = Enable interrupt
Not used for the S3C80M4
(must keep always "1")
PWM counter clear bit:
0 = No effect
1 = Clear the PWM counter (when write)
Figure 12-1. PWM Control Register (PWMCON)
Summary of Contents for S3C80M4/F80M4
Page 1: ...S3C80M4 F80M4 8 BIT CMOS MICROCONTROLLERS USER S MANUAL Revision 1 ...
Page 44: ...ADDRESS SPACES S3C80M4 F80M4 2 20 NOTES ...
Page 84: ...CONTROL REGISTERS S3C80M4 F80M4 4 26 NOTES ...
Page 102: ...INTERRUPT STRUCTURE S3C80M4 F80M4 5 18 NOTES ...
Page 190: ...INSTRUCTION SET S3C80M4 F80M4 6 88 NOTES ...
Page 202: ...RESET and POWER DOWN S3C80M4 F80M4 8 6 NOTES ...
Page 216: ...8 BIT TIMER 0 S3C80M4 F80M4 11 4 NOTES ...
Page 220: ...8 BIT PULSE WIDTH MODULATION S3C80M4 F80M4 12 4 NOTES ...
Page 230: ...ELECTRICAL DATA S3C80M4 F80M4 13 10 NOTES ...