|
Kategorie: Diplomové, bakalářské práce |
Tento dokument chci!
Práce popisuje principy a problémy při realizaci ultrazvukového anemometru. Je popsán princip výpočtu rychlosti větru a následné korekce výpočtu. Pro realizaci jsou využity ultrazvukové sensory a microcontrolér ARM Cortex-M3. Práce se zabývá generováním PWM signálu, jeho analogovou filtrací, zesílením a odvysíláním. Na přijímací straně jeto nízkonapěťový zesilovač a komparátor. Vyvíjený kód je popsán pomocí vývojového diagramu.
Then after timer interrupt function inform that measurement hasn’t done and sets
flag start again. also
includes example use every peripherals.
21
. permit us
using drive Stellaris driver API functions.2 TI.
After release notes include files, global variable with its defines can found. First function preparing PWM for measurement chosen
axis. These conditions test flag global
variable and inside each concretes functions are called. contain basic description all peripherals programming API. Below interrupt handler functions the rest of
functions can found.
All code was written into anemometer file. Code continue with
a component functions.4.4 Flowcharts
To describe how works our anemometer flowchart was created. All them are called from main function, where the program
starts. the beginning initialization functions takes place. Every part will be
described separately below.
After this initialization main function called.
Then function capture time from timer called. Their behavior controlled with flag global variable with its
definitions for every value.
For creation this diagrams LibreOffice Draw was used. After digital input port interruption ADC sample function called. Constant variable timer_load_set used
to set time for timer interruption.
It let know every time what was done and what has done. [15]
Within development code Stellaris peripheral driver library user's guide was
great aid [14].1 Header files, Global variable and Defines
Included header files are chosen for used peripherals and microcontroller. Behind
that while loop start. Then
interrupt handler functions can found.
On the bottom the code main function with its infinite while loop.4.3 Code development
Code was developed Code composer studio 4. Its value 31250 refers 2,5 with 12,5 MHz clock
speed. The rest are function calculate
peak peak value from ADC sequence, function make averages peak peak
values and wind calculation function.
4.
4. All orders, processes and functions
are accompanied with lot comments. Variable flag has defined all its states above. Flowchart take account whole code
inside anemometer file, which was created for this application. There are few condition inside. It’s divided few section the beginning. CCS was installed from
kit included CD. the
beginning the main are local variables with calling initialization function. From time time function calculate
temperature called. also contain programming examples, driver libraries and and header
files, which form application programming interface API. Variable adc_array is
used save here samples from converter. It’s divided into
sections and functions was illustrated above