| 数据搜索系统,热门电子元器件搜索 |
|
AN3208 数据表(PDF) 13 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3208 数据表(HTML) 13 Page - STMicroelectronics |
|
13 / 19 page ![]() AN3208 Software Doc ID 17411 Rev 1 13/19 5 Software 5.1 Preliminary information The software described in this section has been implemented using a 32-Kbyte STM8AF6266 device with 32 pins. It performs the complete needle rotation of one stepper motor (in a forward and back forward direction). Two PWM channels and two I/O lines are necessary for driving the stepper motor. Thus, four stepper motors can be driven by STM8AF6266 devices as it is able to provide up to eight PWM signals. Note: Up to four PWM signals are provided by TIM1, two PWM signals are provided by TIMER2 (leaving one channel free ), and another two PWM signal are provided by TIMER3. 5.2 Software description The software code is based on the STM8A/S standard firmware library available from http://www.st.com. The firmware consists of: ● A main program ● An interrupt routine. TIM1 interrupt routine, (TIM1_UPD_OVF_TRG_BRK_IRQHandler()), is used for providing PWMs signals with correct duty cycles. 5.2.1 Main program The main program initializes the peripherals (GPIOs, timers, clock CNTRL), the variables, and the interrupt routines. After initialization, it stays in an endless loop (see Figure 12). |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| 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 |