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

RC3 always detects HIGH

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



Joined: 26 Jun 2006
Posts: 9

View user's profile Send private message

RC3 always detects HIGH
PostPosted: Mon Jun 26, 2006 2:15 am     Reply with quote

Hi,

at the moment I have a problem with the 16F690 I haven’t found a solution in this board.
The 16F690 is used to detect a pulse to ground at nine inputs (RA0, RA1, RA4, RB4, RC1, RC2, RC3, RC4 and RC6). They are all working well but RC3. It always detects a High-Level, regardless whether it has VCC or GND-Level.

I am not using the ADC but reading the ANSEL-Register (ptr = 0x11E; putc(*ptr);) gives a 0x88;

These are my settings:
#fuses INTRC_IO, NOPROTECT, BROWNOUT, NOMCLR, NOCPD, WDT, PUT, NOIESO, NOFCMEN, BROWNOUT_NOSL
#use rs232(BAUD=9600, XMIT=PIN_B7, RCV=PIN_B5, RESTART_WDT, PARITY=E)//, ERRORS)


Does anyone know about this problem and has a hot tip for me?
Many thanks in advance.


BTW: I tried a different PIC. Hence, I can eliminate defect hardware.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 26, 2006 3:05 am     Reply with quote

Read this thread. It's about RC3 always reading low with the 16F690:
http://www.ccsinfo.com/forum/viewtopic.php?t=26716

If it doesn't help, then try to post a very small test program
that shows the problem. Also post your compiler version.
rt_joerg



Joined: 26 Jun 2006
Posts: 9

View user's profile Send private message

PostPosted: Mon Jun 26, 2006 6:51 am     Reply with quote

Thanks for your quick reply.

Following line was missing:
setup_comparator(NC_NC_NC_NC)

With this command the C3 is detecting H/L as expected!

Thanks a lot!
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