Author Topic: Can the PIC16F1703 do PWM through a peripheral?  (Read 1959 times)

0 Members and 2 Guests are viewing this topic.

Offline JoePTopic starter

  • Contributor
  • Posts: 37
  • Country: gb
Can the PIC16F1703 do PWM through a peripheral?
« on: June 29, 2019, 08:36:27 pm »
Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/40001722C.pdf

The datasheet seems to be slightly contradictory; it has 2 CCP modules which can be configured to do PWM, but it also says it has 0 PWM  modules (top of page 2). Presumably it's just not counting the CCP as PWM, and that it is perfectly capable of doing PWM without using the processor, but does anyone know for sure?

Thanks.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 14835
  • Country: gb
    • Mike's Electric Stuff
Re: Can the PIC16F1703 do PWM through a peripheral?
« Reply #1 on: June 29, 2019, 08:51:15 pm »
Read the CCP section of the datasheet.
Some PICs have dedicated PWM as well as CCP. CCPs generally can do PWM
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 
The following users thanked this post: JoeP

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3571
  • Country: ca
Re: Can the PIC16F1703 do PWM through a peripheral?
« Reply #2 on: June 30, 2019, 01:09:34 pm »
There are some newer PICs where CCP modules cannot do PWM - that is you cannot put CCP into PWM mode. Such PICs usually have separate PWM modules instead. I don't believe PIC16F1703 is one of them, so most likely this is a typo, but I wouldn't be 100% sure.
 

Offline rhodges

  • Frequent Contributor
  • **
  • Posts: 364
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: Can the PIC16F1703 do PWM through a peripheral?
« Reply #3 on: June 30, 2019, 01:49:37 pm »
Look at page 12. It shows RC5 as CCP1, "Capture/Compare/PWM1". And RC3 is CCP2, "Capture/Compare/PWM2".

It is a little confusing, as those list CCP1 and CCP2 as inputs next to RC5 and RC3, but below, the table connects CCP1 to PWM1 and CCP2 to PWM2 outputs.

The PWM info starts at page 189, and it looks like any other PIC description. So I would assume, yes, the 16f1703 does have two PWM outputs available.
Currently developing embedded RISC-V. Recently STM32 and STM8. All are excellent choices. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Offline cv007

  • Super Contributor
  • ***
  • Posts: 1063
Re: Can the PIC16F1703 do PWM through a peripheral?
« Reply #4 on: June 30, 2019, 07:51:05 pm »
Quote
Presumably it's just not counting the CCP as PWM
because the CCP module is not a PWM module. They are listing what modules are available and how many. They are not listing what functions those modules contain, so they don't say you have 2 pwm modules, because you don't. In a 1703 you have 2 CCP modules, and those modules have pwm capability (the P in CCP). If you want to see the difference, look at the 1704 datasheet.

You have CCP1 and CCP2 (2 CCP modules) which can both output pwm to almost any pin via pps. You can also route a pwm output to multiple pins if wanted (pps). When you look at the 1704 datasheet, you will find the pwm modules also listed as available pps output functions (and probably discover pps is quite nice to have).
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3920
  • Country: it
Re: Can the PIC16F1703 do PWM through a peripheral?
« Reply #5 on: July 02, 2019, 09:02:22 am »
There are some newer PICs where CCP modules cannot do PWM - that is you cannot put CCP into PWM mode. Such PICs usually have separate PWM modules instead. I don't believe PIC16F1703 is one of them, so most likely this is a typo, but I wouldn't be 100% sure.

can you share a partnumber?
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3571
  • Country: ca
Re: Can the PIC16F1703 do PWM through a peripheral?
« Reply #6 on: July 02, 2019, 01:00:26 pm »
There are some newer PICs where CCP modules cannot do PWM - that is you cannot put CCP into PWM mode. Such PICs usually have separate PWM modules instead. I don't believe PIC16F1703 is one of them, so most likely this is a typo, but I wouldn't be 100% sure.

can you share a partnumber?

Nope. I've just looked at all the new PIC16 datasheets and haven't found any. Must be glitches in my memory :(
 
The following users thanked this post: JPortici


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->