2956 views|19 replies

29

Posts

0

Resources
The OP
 

How to make the falling edge of the stm8 output waveform skew [Copy link]

 

This is a stm8 waveform written by someone else that outputs a 60HZ positive pulse with a width of 4us at the io port. There are no peripheral parts. Pulling down the io port with a 1k resistor can make it steeper. I tried to write one myself. No matter how the port is configured, the upper and lower edges are straight. There is no waveform if the drain is open and the pull-up is not done. The rising edge can be output by draining and pulling a large resistor can be done.

Ask for advice

This post is from stm32/stm8

Latest reply

Digital control power supply? Wouldn't such a long falling edge increase the loss of the MOSFET tube? Power supplies generally require fast turn-on and turn-off to reduce losses.   Details Published on 2022-4-23 21:22
 

2w

Posts

0

Resources
2
 

"This is a stm8 waveform written by someone else that outputs a 60HZ positive pulse width of 4us from an io port."

I guess it refers to the waveform in the picture?

The rising edge of the pulse is steep, but the falling edge is not steep enough. So the title "How to make the falling edge of the stm8 output waveform slanted" confuses me: is it to make the falling edge of the pin output waveform as steep as the rising edge, or to make the falling edge not steep?

This post is from stm32/stm8
 
 

29

Posts

0

Resources
3
 

The waveform in the figure is measured on the finished board. There are no components around the IO port. All of them have been removed and the pins are suspended. When I saw such a waveform, I was also puzzled. How was this done? So I also wrote one on the minimum system board. After various experiments, the upper and lower edges are steep. The rising edge can be achieved by open-drain output and external pull-up with a large resistor, but how can the falling edge be achieved without using external components?

This post is from stm32/stm8

Comments

"But how can the falling edge be achieved?" Do you want to solve the doubt of "how can such a waveform be achieved", or do you want to change your waveform with steep rising and falling edges: is the falling edge of the MCU pin the same as the falling edge of the waveform in the figure (slope), or the same as the rising edge (steep)?  Details Published on 2022-4-7 18:22
 
 

6744

Posts

2

Resources
4
 

You can grab other IO to see the waveform.

This post is from stm32/stm8
 
 
 

2w

Posts

0

Resources
5
 
Haoyu HY posted on 2022-4-7 18:14 The waveform in the figure is measured on the finished board. There are no components around the io port. They have all been removed and the pins are suspended. When I saw such a waveform, I was also confused. How could this be...

"But how can we achieve the falling edge?"

Do you want to solve the doubt of "how to achieve such a waveform", or do you want to change your waveform with steep rising and falling edges: is the falling edge of the microcontroller pin the same as the falling edge of the waveform in the figure (slope), or the same as the rising edge (steep)?

This post is from stm32/stm8
 
 
 

29

Posts

0

Resources
6
 

This is the waveform of S103 on the small board. There is another waveform with a phase difference of 180 degrees. There is also a waveform with a 5khz rising edge of 1us on the main control board. This should be written by the developer on purpose, but how is it implemented?

This post is from stm32/stm8
 
 
 

29

Posts

0

Resources
7
 
maychang posted on 2022-4-7 18:22 『But how can the falling edge be achieved?』 Do you want to solve the doubt of "how is such a waveform achieved?" or do you want to change...

Brother, I'm asking how to write a program to make io output such a waveform, with the falling edge falling slowly

This post is from stm32/stm8

Comments

I have never used this type of microcontroller, so I don't know how its pins can be configured. My guess is: first configure the pin as a push-pull output and write "1" to the pin. Then configure the pin as a high-impedance state (input), and this waveform may be generated on the pin. It's just a guess.  Details Published on 2022-4-7 19:01
 
 
 

351

Posts

3

Resources
8
 

The capacitive load will become like this

This post is from stm32/stm8
 
 
 

29

Posts

0

Resources
9
 
hjl2832 posted on 2022-4-7 18:53 The capacitive load will become like this

There are no external components, so there is no load. It is the IO port that does this. I initially suspected that the IO port was broken, so I took another board, disconnected all components, and the test was the same. The control waveform sent from the main control board was also like this.

This post is from stm32/stm8
 
 
 

2w

Posts

0

Resources
10
 
Haoyu HY posted on 2022-4-7 18:30 Brother, I am asking how to write a program to make io output such a waveform, with a slow decline along the falling edge

I have never used this model of microcontroller and don't know how its pins can be configured.

Hypothesis: First configure the pin as a push-pull output and write "1" to the pin. Then configure the pin to high impedance (input), and this waveform may be generated on the pin.

Just a guess.

This post is from stm32/stm8
 
 
 

29

Posts

0

Resources
11
 
maychang posted on 2022-4-7 19:01 I have never used this type of microcontroller and don't know how its pins can be configured. Guess: first configure the pin as a push-pull output and write to the pin...

I'll try it

This post is from stm32/stm8
 
 
 

29

Posts

0

Resources
12
 
maychang posted on 2022-4-7 19:01 I have never used this type of microcontroller and don't know how its pins can be configured. Guess: first configure the pin as a push-pull output and write to the pin...

Thank you for solving the doubts that have troubled me for a day.

This post is from stm32/stm8

Comments

Can you share it~  Details Published on 2022-4-9 09:40
 
 
 

29

Posts

0

Resources
13
 

This post is from stm32/stm8

Comments

Is this the PWM waveform you need for a massager? Or a laser medical product? I have measured a cervical massage and found this waveform.  Details Published on 2022-4-13 18:53
 
 
 

6744

Posts

2

Resources
14
 
Haoyu HY posted on 2022-4-7 20:08 Thank you, thank you, it solved the doubts that troubled me for a day

Can you share it~

This post is from stm32/stm8

Comments

In open-drain input mode, writing 1 to ODR (output control register) will cause the IO to output high impedance. The waveform should be like this: a pull-down resistor is hung on the IO, and then the IO first outputs 1 in push-pull mode, and the IO is 3.3V at this time. Then the IO mode is changed to open-drain output mode, because the output 1 in open-drain mode is the output  Details Published on 2022-4-11 08:53
 
 
 

377

Posts

0

Resources
15
 

In open-drain input mode, writing 1 to ODR (output control register) will cause the IO output to be in high-impedance state.

The waveform should be like this: a pull-down resistor is connected to the IO, and then the IO first outputs 1 in push-pull mode, and the IO is 3.3V at this time. Then the IO mode is changed to open-drain output mode, because the open-drain mode outputs 1 in high-impedance state, so the 3.3V on the IO is pulled to near 0V through the pull-down resistor. This process is a pull-down to a low level, so the waveform looks like an RC discharge waveform.

This post is from stm32/stm8

Comments

The peripheral components have been removed, so there is no pull-down, and there is only a pull-up resistor inside the stm8  Details Published on 2022-4-23 23:39
 
 
 

351

Posts

3

Resources
16
 

Is this the PWM waveform you need for a massager? Or a laser medical product? I have measured a cervical massage and found this waveform.

This post is from stm32/stm8

Comments

This is the waveform of the communication between the CNC board and the standby board after the ZXD2400 communication power supply is transformed into a CNC adjustable power supply.  Details Published on 2022-4-21 19:55
 
 
 

29

Posts

0

Resources
17
 
hjl2832 posted on 2022-4-13 18:53 Is this the PWM waveform you need for a massager? Or a laser medical product? I have measured a cervical massage and found this waveform.

This is the waveform of the communication between the CNC board and the standby board after the ZXD2400 communication power supply is transformed into a CNC adjustable power supply.

This post is from stm32/stm8

Comments

Digital control power supply? Wouldn't such a long falling edge increase the loss of the MOSFET tube? Power supplies generally require fast turn-on and turn-off to reduce losses.  Details Published on 2022-4-23 21:22
 
 
 

351

Posts

3

Resources
18
 
Haoyu HY published on 2022-4-21 19:55 This is the waveform of the communication between the CNC board and the standby board after the ZXD2400 communication power supply was transformed into a CNC adjustable power supply.

Digital control power supply? Wouldn't such a long falling edge increase the loss of the MOSFET tube? Power supplies generally require fast turn-on and turn-off to reduce losses.

This post is from stm32/stm8

Comments

This is not used to drive MOS tubes  Details Published on 2022-4-23 23:33
 
 
 

29

Posts

0

Resources
19
 
hjl2832 published on 2022-4-23 21:22 CNC power supply? Wouldn’t such a long falling edge increase the loss of the MOSFET tube? The power supply generally focuses on fast opening and closing to reduce the loss.

This is not used to drive MOS tubes

This post is from stm32/stm8
 
 
 

29

Posts

0

Resources
20
 
LeoMe published on 2022-4-11 08:53 In open-drain input mode, writing 1 to ODR (output control register) will cause the IO output to be in high-impedance state. The waveform should be like this, with the IO hanging...

The peripheral components have been removed, so there is no pull-down, and there is only a pull-up resistor inside the stm8

This post is from stm32/stm8
 
 
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list