View previous topic :: View next topic |
Author |
Message |
Rando
Joined: 18 Nov 2006 Posts: 4
|
Implementing a PIC16F877A onto a circuit board |
Posted: Sat Nov 18, 2006 4:57 pm |
|
|
Hi,
I am currently using the PIC16F877A with the CCS Software Prototyping Board in one of my classes. I would like to use the PIC without the board but I am confused to which pins have to be wired.
I am using the following pins: RA0 to read in a swtich
RA1 to read in a sensor ouput
C1 digital ouput to an h-bridge
C2 digital output to an h-bridge
I was wondering do both of the VDD and Vss pins have to be wired, and I don't plan on having a reset option....do I still need to wire the MCLR pin?
Also the datasheet lists a maximum current into the VDD pin....I was wondering what is the minimum current that can go into the VDD pin.
Thanks
Randy |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Sat Nov 18, 2006 7:03 pm |
|
|
Yes and Yes. The minimum current depends on many factors, speed, driving current, preipherals, ect... |
|
|
Rando
Joined: 18 Nov 2006 Posts: 4
|
|
Posted: Sat Nov 18, 2006 7:19 pm |
|
|
Thanks for the reply Mark... Just to get this straight I'd need the 2 VDD pins, the 2 Vss pins, the 2 input pins, the 2 output pins and the MCLR pin.
Also to wire the MCLR pin just follow the recommended MCLR circuit in the datasheet? ( p.148 figure 14-5).
This might also seem like a dumb question but as I said I've only used the chip on the protoboard........ do u need an external Socketed Oscillator?...or is that only needed if you have a timer in your program.
Thanks,
Randy |
|
|
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
Posted: Sat Nov 18, 2006 9:58 pm |
|
|
Quote: | Just to get this straight I'd need the 2 VDD pins, the 2 Vss pins, the 2 input pins, the 2 output pins and the MCLR pin. |
That is correct. MCLR can simply be pulled up to Vdd through a 47K resistor.
Quote: | do u need an external Socketed Oscillator?...or is that only needed if you have a timer in your program. |
You need some form of oscillator. Your choices are listed in 14.2. A crystal with the associated capacitors is the simplest (see table 14-2.) The resistor usually isn't necessary.
You should also have a 0.1uF cap on each of the Vdd pins as close to the pin as you can get. This will save a lot of grief later on.
John |
|
|
Rando
Joined: 18 Nov 2006 Posts: 4
|
|
Posted: Sat Nov 18, 2006 10:25 pm |
|
|
Thank you for the quick response. I will give that a try |
|
|
jma_1
Joined: 08 Feb 2005 Posts: 147 Location: Wisconsin
|
|
Posted: Sun Nov 19, 2006 10:32 am |
|
|
Greetings,
If you do not want to use an external oscillator, pick a different microprocessor. Some of the 18 series chips can run with the internal oscillator as the clock source.
Cheers,
JMA |
|
|
Rando
Joined: 18 Nov 2006 Posts: 4
|
|
Posted: Sun Nov 19, 2006 10:40 am |
|
|
Thanks I will keep that in mind for the future. However, the school supplies the PIC16F877A and I'm just getting used to it ....so I do not think I will change the PIC.
Randy |
|
|
|