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

PIC16c765 input() problem :(

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



Joined: 06 May 2005
Posts: 2

View user's profile Send private message

PIC16c765 input() problem :(
PostPosted: Thu Jun 02, 2005 5:31 am     Reply with quote

hi there~
i'm not a good at english please understand.

my board has 6 switch and its connected with RA0~RA5 of pic16c765.
but it's not working except RA4.
my code like bellows
.......
if(input(PIN_A0)) ~~

so i had changed switch to RB0~RB5 and its worked well
if(input(PIN_B0)) ~~

what is different RA with RB port??

my compiler is ccsc 3.203
thanks
_________________
^^/~
Ttelmah
Guest







PostPosted: Thu Jun 02, 2005 10:38 am     Reply with quote

Have you actually set portA, to be used for digital I/O?. By default chips with ADC units, wake up with the analog bits on port A, set to work as analog I/O, usually with the exception of A4.
You need to add:
setup_adc(NO_ANALOGS );

to switch these pins to digital operation.

Best Wishes
tramper2



Joined: 06 May 2005
Posts: 2

View user's profile Send private message

thanks Ttelmah
PostPosted: Thu Jun 02, 2005 6:25 pm     Reply with quote

i'll try it ~~
thanks you very much
_________________
^^/~
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