Skip to content

LennardBoediger/dsPIC33CK64MC105-PWM-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

dsPIC33CK64MC105

The dsPIC33 family is a really cost-effective and capable option if you need a lot of PWM signals, but the datasheets are pretty intense and the code examples don't usually work right out of the box.

Here I am sharing a code snippet to get you started 🫶 pinout

Dual PWM Mode

PWM1L,PWM1H,PWM2H,PWM4L,PWM4H are set up in Dual PWM Mode.
They can be controlled by sending data in the format: value1,value2,value3,value4,value5; via Uart (9600 baud rate)

DUAL_PWM

Configurable Logic

I found two ways to combine multiple PWM Pins with logic gates.

Combinatorial PWM Logic

  • PWM3L is set to PWM4L or PWM4H using the "Combinatorial PWM Logic" functinallity.
  • PWM3L is set to PWM4L nor PWM4H using the "Combinatorial PWM Logic" functinallity.

Configurable Logic Cell (CLC)

It is also possible to use the “CLC” functionality, but you have to connect the PWM pins to the input pins of the CLC block, as an internal connection is not possible.
Note the Blue arrows on the Pinout image.

  • Pin RB0 is set to PWM1L or PWM1H or PWM2H
  • Pin RB2 is set to not(PWM1L or PWM1H or PWM2H)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages