STM8 six-step PWM output for motor control

Publisher:asd999dddLatest update time:2020-07-06 Source: eefocusKeywords:STM8 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

When complementary outputs are required on one channel, the preload bits are OCiM, CCiE and CCiNE. These preload bits are transferred to the shadow register bits when a COM commutation event occurs. This allows you to pre-set the next step configuration and modify the configuration of all channels at the same time. COM can be generated by software by setting the COMG bit in the TIM1_EGR register, or by hardware on the rising edge of TRGI.


Figure 73 shows the OCx and OCxN outputs in three different configurations when a COM event occurs.

STM8 generates six-step PWM, example using COM (OSSR=1)
(Figure 73: Example of STM8 generating six-step PWM using COM (OSSR=1))

Keywords:STM8 Reference address:STM8 six-step PWM output for motor control

Previous article:STM8 brake function motor control
Next article:STM8 PWM mode

Recommended ReadingLatest update time:2024-11-23 16:40

Use of STVD in STM8
How to assign a variable to a specific address For example: unsigned char temp_A@0x00; //Define unsigned variable temp_A and force its address to be 0x00 unsigned char temp_B@0x100; //Define unsigned variable temp_B and force its address to be 0x100 @tiny unsigned char temp_C; //Define unsigned variable temp_C, and
[Microcontroller]
Use of STVD in STM8
STM8 reset (RST) register
Reset Status Register (RST_SR) Address offset value: 0x00 Reset value: undefined Position 7:5 Reserved bit, must remain 0 Bit 4 EMCF: EMC reset flag is set by hardware and can be cleared by software by writing "1" 0: No EMC reset occurs; 1: An EMC reset occurs (possible reset reasons: complementary registers or op
[Microcontroller]
STM8 reset (RST) register
STM8's TIM4 timer 1ms enters interrupt
TIM4 — 8-bit basic timer ● 8-bit auto-load adjustable prescaler, the ratio can be selected as any power of 2 between 1 and 128 ● Clock source: CPU clock ● Interrupt source: 1 overflow/update interrupt It is necessary to implement an interrupt once every 1ms, which can be used as a system timer TIM4 initialization
[Microcontroller]
STM8 SPI drives LCD12864
System functions The SPI communication bus inside STM8 is used to drive LCD12864.    hardware design   LCD12864 circuit schematic diagram  software design /************************************************************************ Target system: Based on STM8 microcontroller  Application software: Cosmic CxSTM8  *
[Microcontroller]
STM8 SPI drives LCD12864
STM8 division operation time and precautions
The STM8 microcontroller's time for multiplication and division has been greatly reduced! Division operation only takes 2.75us @ 8MHz. It should be noted that you should not perform multiplication and division operations in the interrupt program, as this will result in errors. The explanation on the forum is: This is
[Microcontroller]
STM8 division operation time and precautions
Stm8 serial port redirection and problem solving
1. Code and its settings #include stdio.h int fputc(int ch, FILE *f) //Stm8005 redirection {    while (!(UART2- SR&0x80));    UART2- DR=ch;   return ch;  }  At the same time, you need to change the Library item in IAR's Project- Options- General Options- Library Configuration from "Normal" to "Full". 2. Problem S
[Microcontroller]
Stm8 serial port redirection and problem solving
stm8 io port remapping
STM8S003F3 ports can be remapped. For example, the PC6 pin of pin16, which has the SPI_MOSI function by default, can be remapped to TIM1_CH1, which is channel 1 of timer1. The mapping method is not configured by an AFR register like STM32, but by configuring the Option bytes, as shown below. That is the OPT2 regi
[Microcontroller]
stm8 io port remapping
STM8 study notes---light up the LED
There are generally three steps to operate a single-chip microcomputer: 1. System clock selection. 2. Single-chip microcomputer peripheral initialization. 3. Main program writing. To light up the LED light, follow these steps. First select the system clock, open the STM8S Chinese reference manual, and find the clock
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号