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 support@ccsinfo.com

PIC18F25K20 PIN_A2 and A3 stops to be analog

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



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PIC18F25K20 PIN_A2 and A3 stops to be analog
PostPosted: Fri Sep 18, 2015 2:39 pm     Reply with quote

Hi,

I'm using the PIC18F25K20. In the application I'm developing the A2 and A3 are used as an analog pins and all other pins (of the Port A) as digital outputs. The system is running and everything seems to be OK ( I can read the A/D converter). However when I'm writing to to the RA6 or RA7 or RA5 a "high", the A/D on the A2 and A3 return 1023. When I write again "low" to the RA5 or RA6 or RA7,the A/D on the A2 and A3 return "normal value" of 350.


On the same Port A the A0 and A1 are also analog, but writing to RA7 and RA6 or RA5 not affect the A/D reading.

Any ideas or help?
Compiler Version 5.048

Going to be crazy.. .

Thank you in advance
Best Regards
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Sep 18, 2015 5:19 pm     Reply with quote

Post a short, complete test program that shows the problem.
temtronic



Joined: 01 Jul 2010
Posts: 9134
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Sep 18, 2015 6:05 pm     Reply with quote

compiling in 'release' mode and NOT 'debug' ??

Jay
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Fri Sep 18, 2015 6:13 pm     Reply with quote

Hi,
compile in release.

It is a big project, so making an example takes time, will provide by tomorrow.
Thank you

Best Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19260

View user's profile Send private message

PostPosted: Sat Sep 19, 2015 12:40 am     Reply with quote

The first thing to be checking is that there isn't something like a solder whisker. I've used all the pins on these chips with no sign of any problems like this, and it looks suspiciously like the analog signal may actually be being taken high, or whatever you are driving off RA5,6 and 7, may be pulling the ADC VREF down...
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Sat Sep 19, 2015 2:43 am     Reply with quote

Hi,

It is not hardware as itself problem, because there are many PCB (all) running at the same way. So it is hardware (design) or software problem. Doing the demo software I make more specific my problem and soon will provide all data to you.
Thank you for your quick response.

Best Regards
micro_debugger



Joined: 08 Oct 2009
Posts: 73

View user's profile Send private message

PostPosted: Tue Sep 29, 2015 2:45 pm     Reply with quote

Hi,

It was finally hardware designing problem, a 5 V applied to this pin for a very short time.

Thank you for your support.

Best Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19260

View user's profile Send private message

PostPosted: Wed Sep 30, 2015 4:19 am     Reply with quote

I felt it had to be hardware somewhere....
Glad you found it.
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