View previous topic :: View next topic |
Author |
Message |
jhonny13deep
Joined: 26 Sep 2011 Posts: 6
|
Number of pwm on pic16F84 |
Posted: Mon Sep 26, 2011 5:47 pm |
|
|
Hi I am new to microcontrollers and i would like to know how many pwm channels does pic16F84 have and how can i verify please.
Thank you very much |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Sep 26, 2011 5:55 pm |
|
|
1-
16f84 - has less than 1 hardware pwm channel
but could have a software based PWM if a very low frequency for PWM will
cut it in software.
2-
normally you check the DATASHEET for the pic to see its hardware functions |
|
|
jhonny13deep
Joined: 26 Sep 2011 Posts: 6
|
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Mon Sep 26, 2011 6:13 pm |
|
|
You certainly MAY - as there is no law against it
but only YOU will know if you CAN.
If it were me - I'd look further up the product tree for PICS with ADC and PWM capability as well as more timers.
Could make the task simpler and give you a more flexible baseline to grow on too. The 16f886 comes to mind as pretty feature rich in that way.
BTW there are many datasheets at microchip.com |
|
|
jhonny13deep
Joined: 26 Sep 2011 Posts: 6
|
|
Posted: Tue Sep 27, 2011 9:01 pm |
|
|
How can I know and be sure before buying how many pwm, adc and pins I will need when choosing my microcontroller please? |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Sep 27, 2011 11:11 pm |
|
|
Refer to the datasheet. PIC16F84 has 0 PWM outputs. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Sep 27, 2011 11:44 pm |
|
|
Since you don't know what your final project specifications will be,
it's best if you use a PIC with a medium or large number of pins
and features. Depending on how much physical space is available,
I would suggest a 16F886 (28 pin DIP) or 16F887 (40 pin DIP).
Read the data sheet for these PICs:
http://ww1.microchip.com/downloads/en/DeviceDoc/41291F.pdf |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9216 Location: Greensville,Ontario
|
|
Posted: Wed Sep 28, 2011 4:53 am |
|
|
Bigger is better ! Right now I can buy 18F4550 cheaper than the 16F877 that I've used for 2 decades.
If you use a 40pin DIP package, you'll have lots of 'extra' pins, peripherals, memory, speed, etc. for future projects.
BTW you can easily get 8 PWM from a 16F84. There are serial servo controllers available that used that PIC. I did build a 12 channel unit with a 16C84 once. Yes, done under software NOT hardware but to me 'PWM' doesn't mean dedicated hardware.
You have to know the design criteria before you choose the PIC but consider the 4550 tons of power 'under the hood'. |
|
|
jhonny13deep
Joined: 26 Sep 2011 Posts: 6
|
|
Posted: Thu Sep 29, 2011 5:58 pm |
|
|
Ok thanks for the info, this question is really important for me to understand
how many sensors can i use with a 40 pin pic? For example, how do i find out how many pins will i need for this sensor(http://www.robotshop.com/ca/sharp-gp...-sensor-2.html)?
Thank you very much
Last edited by jhonny13deep on Thu Sep 29, 2011 6:13 pm; edited 1 time in total |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Sep 29, 2011 6:12 pm |
|
|
If you want help on using a sensor with CCS, you need to post the
complete link (not "gp...-sensor") or post the manufacturer and part number. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Sep 29, 2011 6:23 pm |
|
|
It has an analog output. It can be measured with A/D converter on
the 16F886 or 16F887. Those chips have at least 11 A/D channels per
chip, and you only need one channel for this sensor. |
|
|
jhonny13deep
Joined: 26 Sep 2011 Posts: 6
|
|
|
jhonny13deep
Joined: 26 Sep 2011 Posts: 6
|
|
Posted: Thu Sep 29, 2011 6:32 pm |
|
|
So you don't look at the pins you look at the number of A/D channels it takes to install the maximum number of sensors on a pic?
PCM programmer wrote: | It has an analog output. It can be measured with A/D converter on
the 16F886 or 16F887. Those chips have at least 11 A/D channels per
chip, and you only need one channel for this sensor. |
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Sep 30, 2011 12:22 pm |
|
|
Download the PIC data sheet. To get the data sheet, type this into
http://www.google.com
The first hit will take you to the Microchip page for the 16F887, and you
can download the data sheet there. Near the front of the data sheet,
there is a table that lists the main features of the PICs in the 16F887
series. You can see the number of i/o pins on each PIC, and the number
of A/D channels, and the number of hardware PWM channels (1 for CCP
and 1 for ECCP = 2 PWM channels). Of course, normal i/o pins can be
used for software PWM.
Basically, you need to read the data sheet. We don't want to read it for
you. You need to find the number of A/D channels on the PIC that you
are considering to buy, and decide if it's enough. You need to start
thinking about the project instead of asking us what to do for every little
detail. |
|
|
|