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

Pin A2 and A4 spoilt ??

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



Joined: 19 Jul 2004
Posts: 42
Location: Malaysia, PJ

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

Pin A2 and A4 spoilt ??
PostPosted: Tue Oct 04, 2005 11:29 pm     Reply with quote

PIC 16F876, Compiler 2.734

I spent whole night, eeprom not working. Then found SDA always low.

I tested port A pin by pin using LED, and found that A2 and A4 always low, cannot output high or float.

Anyone has this problem before? Some pins spoilt and some ok? Crying or Very sad
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed Oct 05, 2005 12:58 am     Reply with quote

Have you studied the description of port-A pins in the datasheet? If you did you would have discovered these pins are mixed with comparator and ADC functions. Did you disable both the comparator and analog function blocks?

Pin-A4 on most chips has an open collector output, you'll have to adjust your electronics for this.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Oct 05, 2005 2:02 pm     Reply with quote

http://www.microchipc.com/sourcecode/images/i2c.gif
Joshua Lai



Joined: 19 Jul 2004
Posts: 42
Location: Malaysia, PJ

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

PostPosted: Wed Oct 05, 2005 10:34 pm     Reply with quote

I bought a new PIC, running the same program, everything is ok. Why?

That prove my old PIC really spoilt? But other port still working fine.

I bought PIC from fanell, what difference for 1 timer and 3 timers?
Joshua Lai



Joined: 19 Jul 2004
Posts: 42
Location: Malaysia, PJ

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

PostPosted: Wed Oct 05, 2005 10:40 pm     Reply with quote

I saw the pin diagram, I used 1k pull-up resistors.

Software i2c can use any pin right?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Thu Oct 06, 2005 6:14 am     Reply with quote

Joshua Lai wrote:
I bought a new PIC, running the same program, everything is ok. Why?



Umm... cause you broke it!
Joshua Lai



Joined: 19 Jul 2004
Posts: 42
Location: Malaysia, PJ

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

PostPosted: Fri Oct 07, 2005 9:33 pm     Reply with quote

Embarassed
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