203/317
7 - Debugger and PROM Programmer Tutorial for ST72251
verter. When at the highest position, it provides the full V
CC
voltage that is converted to a value
of 255. The relationship provides for a frequency that changes from about 0.5 Hz to 10 Hz.
07-func
Since we use a timer to produce a frequency, this formula must be inverted to give something
like:
This formula requires performing 16-bit division at least . Since this would take too long a time,
we shall use a look-up table to convert the converted voltage into a number that can be written
to the timer reload register.
10
0
255
Hz
Analog to digital
conversion (ADC)
Frequency (f)
f = (9.5/255) ADC +0.5
0.5
t
ADC
=
+
1
9 5
255
0 5
.
.
Содержание ST7 Series
Страница 1: ...ST7 8 BIT MCU FAMILY USER GUIDE JANUARY 1999 1 ...
Страница 238: ...238 317 8 C Language and the C Compiler 08 Burn bmp Then use the EPROMer programmer software as described in Chapter 7 ...
Страница 289: ...289 317 10 Second Application a Sailing Computer 10 befor Bs Rw Vw VMG AlphaR AlphaV Before the wind ...