Based on these options, the maximum delay is provided when the state flag is configured with a 1. This gives:
state flag = 1: delay = (255 - Loops) * multiplier * 1 ms (2)
And for the state flag = 0:
state flag = 0 : delay = Loops * multiplier * 1 ms (3)
Figure 2 shows the resulting delays for Loops values obtained in Equation 1. The longer delays occur when the state flag is set at 1, and the shorter delays reflect the state flag set to 0. Resistance, R, is limited to 10 k Ω and constrained to 1 k Ω in this analysis.
For a specific multiplier, the range of delays is constrained by the external components. Varying both the R and C allows for a significant variation in delay. The trigger pulse width is a minimum of 2 µs, while the trigger-to-output-active delay is a minimum of 2 µs and a maximum of 12 µs.
The accuracy (independent of RC component variation) is dominated by the tolerance of the internal instruction period. This is defined as 1% over a narrow voltage and temperature range. Tolerances of pin 1’s output-low voltage (used to discharge the capacitor), the internal comparator, and 0.6-V reference also will impact initial accuracy. Changes in delay over time and temperature depend on all component variations. The value of the multiplier is a code-based constant and will not vary.
Click here to get the assembly code for this example application and a spreadsheet, with instructions, to help calculate voltage, multiplier, and component values.
Assembly Code To use the spreadsheet to calculate voltage, multiplier, and component values for the controller-based one-shot:
Set the Charging voltage, Vc, to your regulated supply or reference voltage.
Set the Trip voltage Vt to .6.
Set the Multiplier to 1.
For reference only, set the desired delay, enter state flag 1 or 0 based on this number.
Set the cap value in nF to any value.
Go to the table:
In the first column of the table’s top row, I have copied the cap value entered above, converted to Farads. The remaining entries, along this row, have standard cap values, in F, and may be re-entered with what ever values you would like.
The left column of the table has resistor values from 1000 to 10,000. 10,000 is a limit imposed by the controller. The column is a linear list. You may change this column to identify standard values for 2%, 1%, … 0.1%.
The table uses these R and C values and the Multiplier value, entered above, to generate the delay values using Eq. 1, 2, and 3, referenced in the article.
You may want to do a little math to get you into the "Ball Park."
Settle on values for R, C, and the Multiplier.
You may want to select a set of values which rely more on the Multiplier.
The multiplier is a coded value and does contribute to timing variation.
It is best to accommodate RC values that produce Loops values (using Eq. 1), that are smaller rather than larger. Migrate the possible R and C values to the spreadsheet cells at the top of the form and read the Loops value directly.
The variation in the cap’s discharge voltage will have less effect on the calculated Loops count. Also, to reduce component sensitivity with small cap values, you want to constrain the R and C values to the linear slope portion of the (1-e'-t/RC) curve generated during component evaluation.
Select values that demonstrate delay stability in the table. This will be seen in the table with adjacent table values that don’t change.
To view the assembly code, click here. To view a spreadsheet for calculating values, click here. To view the instructions for the spreadsheet, click here.
Please refresh the page if you have trouble reading this text.
Search Electronic Design
Email Newsletter
Sponsored By:
Electronic Design UPDATE provides readers with late-breaking news, opinions from industry experts, and timely technology stories. It's a unique opportunity to get your product message in front of engineers, engineering managers, and corporate managers while they're reading about critical information online.