Use of Keil5 Logic Analyzer

This article introduces the use of keil software simulation to view the PWM output waveform, and mainly introduces the use of the logic analyzer in keil simulation .

1. First of all, I use software simulation that needs to be configured, as shown in the figure:

insert image description here

Note: The parameters below cannot be used by default, otherwise the simulation cannot be performed, and it needs to be configured according to the model of the single-chip microcomputer used.

2. Enter the simulation
insert image description here
3. Find the logic analyzer on the simulation page, and set the viewing parameters.
insert image description here
insert image description here
Because the PWM output pin used is PB5, enter PORT.5 in it .
Note that there is a dot.
It will automatically convert to this kind of register operation command. insert image description here
My PWM output configuration, that is, the PB5 output duty cycle is 50%
insert image description here

  1. Enter full-speed operation, and you can view the output waveform.
    insert image description here

Supongo que te gusta

Origin blog.csdn.net/amimax/article/details/127450544
Recomendado
Clasificación