View previous topic :: View next topic |
Author |
Message |
sorasit46
Joined: 07 May 2007 Posts: 69
|
How to pull up port A in 16F819 by program? |
Posted: Wed Dec 29, 2010 6:16 pm |
|
|
16F819
port_b_pullups(TRUE);
How to program pull up port A ?
thanks |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9240 Location: Greensville,Ontario
|
|
Posted: Wed Dec 29, 2010 7:12 pm |
|
|
You have easy two options that I can quickly think of.
Use external resistors of the appropriate value for your particular application and PIC,be sure to read the datasheet for correct inforamtion
or
Read the datasheet, hint, I/O PORTS section, PORTA, first chapter. In there is a wealth of specific information on the subject.
After over 50 years of building 'stuff' and inhaling solder fumes I've always found that reading the manual is the FIRST thing you should do when 'playing with chips'. |
|
|
scottc
Joined: 16 Aug 2010 Posts: 95
|
|
Posted: Wed Dec 29, 2010 7:18 pm |
|
|
You can't in software
Page 39 of the data sheet,
http://ww1.microchip.com/downloads/en/DeviceDoc/39598e.pdf
There are no weak pullups for port a.
Weak Pullups do exist for Port B.
If you need to pull the pin up then you will have to use an external
resistor to VCC, a value of 47K should be ok.
Scott |
|
|
sorasit46
Joined: 07 May 2007 Posts: 69
|
|
Posted: Fri Dec 31, 2010 12:17 am |
|
|
Thanks and happy new year. |
|
|
|