3834 views|3 replies

1

Posts

0

Resources
The OP
 

IO port analog PWM [Copy link]

I am new to microcontrollers. I want to use a PIC microcontroller with 8 pins and a 4MHZ crystal oscillator to make the breathing light go from dark to bright, with an interrupt every 20MS and a total time of 1s. How can I use IO port simulation (Timer0 and timer) to achieve this?

This post is from Microchip MCU

Latest reply

Disappeared  Details Published on 2018-7-28 18:19
 

4005

Posts

0

Resources
2
 
There is no counter. Just compare the count value with the duty cycle variable and output it.
This post is from Microchip MCU
 
 
 

637

Posts

2

Resources
3
 
This post was last edited by dingzy_2002 on 2018-7-28 11:55 It is possible to use IO to simulate PWM as a breathing light display, but pay attention to 1. Its PWM cycle (20MS is too large, the effect is poor) 2. Consider the brightness level (generally ≥60 levels, the effect is better) so the interrupt cycle must be at least less than 1MS to complete.
This post is from Microchip MCU
 
 
 

4005

Posts

0

Resources
4
 
Disappeared
This post is from Microchip MCU
 
 
 

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