Description:
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.
Field
Descriptions:
- 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
other purposes.
- 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 PCA0CPH0 and PCA0CPL0
registers.
How
to use:
- 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
counting range.
- Set the desired system
clock
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.
Download:
- Applet source code: ZIP file
- Java Web applet: ZIP file