công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

STN3NF06 bảng dữ liệu(PDF) 17 Page - STMicroelectronics

tên linh kiện STN3NF06
Giải thích chi tiết về linh kiện  Digital constant-current controller
PDF  34 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  STMICROELECTRONICS [STMicroelectronics]
Trang chủ  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

STN3NF06 bảng dữ liệu(HTML) 17 Page - STMicroelectronics

Back Button STN3NF06 Datasheet HTML 13Page - STMicroelectronics STN3NF06 Datasheet HTML 14Page - STMicroelectronics STN3NF06 Datasheet HTML 15Page - STMicroelectronics STN3NF06 Datasheet HTML 16Page - STMicroelectronics STN3NF06 Datasheet HTML 17Page - STMicroelectronics STN3NF06 Datasheet HTML 18Page - STMicroelectronics STN3NF06 Datasheet HTML 19Page - STMicroelectronics STN3NF06 Datasheet HTML 20Page - STMicroelectronics STN3NF06 Datasheet HTML 21Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 17 / 34 page
background image
AN3151
Firmware implementation
Doc ID 17051 Rev 1
17/34
5
Firmware implementation
Below are some details of firmware implementation.
It's not an exhaustive firmware implementation description but it mainly focuses on some
important microcontroller settings: TIM1, ADC and PI controller implementation.
The firmware developed for the LED Streetlight application is based on STM8S firmware
library release 1.1 and entirely downloadable from the internet.
The firmware described in this application note is entirely available; to obtain a copy please
contact your closest ST office.
5.1
Basic initialization of peripherals and I/O pins
At the beginning of the main program, all the peripherals and I/O pins are configured as
described below:
The Clock source is selected in order to have the maximum frequency by means of an
external 24 MHz oscillator.
GPIO PINs are configured for: ADC channels (floating input) and I/Os.
TIMER (TIM1) configuration: Ch1, Ch2, Ch3, and Ch4 are configured in center aligned
mode and provide an AD triggering signal to ADC for conversion by TRGO.
ADC Configuration: AIN8, AIN9, AIN10, AIN11, and AIN12 are converted one by one
during the “update” event forced by TIM1. Single shot conversion has been set.
Other firmware settings are for interrupt and joystick/pushbutton management. The joystick,
soldered onto the control section, is useful in debug phase to change the PI gains.
This feature is implemented on a low priority interrupt.
5.2
Peripheral settings
The main peripheral settings are:
Clock configuration
TIM1 configuration
ADC configuration
The clock configuration is related to the PRESCALER by means of the function:
/* Configure the Fcpu to DIV1*/
CLK_SYSCLKConfig(CLK_PRESCALER_CPUDIV1);
The TIM1 configuration is:
TIM1_DeInit();
TIM1_TimeBaseInit(0,TIM1_COUNTERMODE_CENTERALIGNED1, PWM_PERIOD,5);



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com