|
|
View previous topic :: View next topic |
Author |
Message |
jruibarroso
Joined: 07 Jan 2006 Posts: 64 Location: Braga
|
PORT A needs to be pulled up on a PIC16F877 ?? |
Posted: Mon Oct 30, 2006 9:43 am |
|
|
I need to output_high(LED) and realised that port needs to be pull up,
i just made the hardware and don't include pull ups, is there any way avoid this ?
my code :
#include <16f877.h>
#device adc=10
#fuses HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT
#use delay(clock=8388608)
#define LED PIN_A4 //Pulse led
#define Ilum_Int PIN_B7 // Iluminacao interior
#define Ilum_Ext PIN_B6 // Iluminacao exterior
main ()
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
THANK YOU ALL |
|
|
Ttelmah Guest
|
|
Posted: Mon Oct 30, 2006 10:31 am |
|
|
It is not the whole port, but just pin A4. There is no software fix for this I'm afraid. The 'best' solution, would be to disconnect the ground connection from the bottom of the LED, reverse the LED, and connect it to +5v instead. This way you can use the pull down drive (which is there on pin A4), and don't have to waste power in using a 'pull up'.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|