The Litec PCA0 Plotter plots the behavior of the PCA0 counter and the
corresponding pulse width modulated output, under ideal conditions for
the Intel C8051 microprocessor.
- Period field:
shows the steady state ideal period of the current counting cycle using
the currently displayed start value and system clock. Note that this
field is a text box to allow you to copy the value out to be used for
- Frequency field:
shows the steady state ideal frequency of the current counting cycle by
taking the inverse of the period field. Note that this field is a text
box to allow you to copy the value out to be used for other purposes.
- Duty cycle:
shows the steady state duty cycle of the current PWM output by
calculating the ratio of the time high to the entire pulse length.
- System clock:
shows the system clock setting currently being used by PCA0. On the
C8051, this field is stored in bits 1-3 of the PCA0MD register.
- PCA0 Start Value
field: shows the counting
value that the PCA0 counter will start at after
the first counter overflow. On the C8051, this value is stored in the
PCA0H and PCA0L registers upon an overflow interrupt..
- PCA0 Compare
Value field: shows the
compare value that will trigger the compare ISR to set the PWM output
high. On the C8051, this value is stored in the PCA0CPHn and PCA0CPLn
registers and is indicated by the green line on the PCA0 Counter Plot.
- Note that the "K" on the y-axis values of the PCA0 Counter Plot represents a multiplier of 1024 (2^10). The
square pulses are the voltage signal that would appear on the CEXn output.
- Upon loading, the plotter
will default to using the system clock on the
full counting range of 0-65535, with a compare value of 32768, to
produce a duty cycle of approximately 50%.
- Set the PCA0 Start Value
field to start the counter at a desired number to allow the counting
range to be shortened.
- Set the PCA0 Compare Value
field to change where the rising edge of the PWM output occurs in the
- Set the desired system
to produce a signal with the correct period.
- Click the Graph button to
plot the new output waveforms.
- The period, frequency, and
duty cycle fields will automatically change to display the results from
the newly drawn waveforms.
- Applet source code: ZIP file
- Java Web applet: ZIP file