CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PORT A needs to be pulled up on a PIC16F877 ??

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jruibarroso



Joined: 07 Jan 2006
Posts: 64
Location: Braga

View user's profile Send private message Send e-mail MSN Messenger

PORT A needs to be pulled up on a PIC16F877 ??
PostPosted: Mon Oct 30, 2006 9:43 am     Reply with quote

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







PostPosted: Mon Oct 30, 2006 10:31 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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