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

PIC affected by human hands??

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



Joined: 12 May 2005
Posts: 15

View user's profile Send private message

PIC affected by human hands??
PostPosted: Sun Jul 03, 2005 4:07 pm     Reply with quote

Hello
i have a project that works fine and does what its supposed to do, but it seems that whenever i pass my hand near the PIC it turns off. I know that PIC pins that are left floating will go high when a hand is brought near the pins but this is strange. I have one pin im monitoring as an input and its low most of the time. when i turn the device on it works until i pass my hand near it and then it turns off. the condition is that when it reads a high (caused by a human hand) it turns off an LED. its like this think is reading either an input from the input device or from my hand. how can i make it more stable? could the other pins that are not used be a problem?? should i make all unused pins outputs or inputs or something?

thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jul 03, 2005 4:55 pm     Reply with quote

Somewhere on your project, you've left off a ground connection
or you've got floating input pins, or a combination of the two.

You can take all unused pins and set them to be low level outputs.
For example, if you're not using Pin E0, then do this:

output_low(PIN_E0);

This assumes that you're using the CCS standard i/o mode,
in which the TRIS is handled by the compiler.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sun Jul 03, 2005 7:07 pm     Reply with quote

your missing a pullup resistor.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
buckeyes1997



Joined: 12 May 2005
Posts: 15

View user's profile Send private message

thanks guys
PostPosted: Sun Jul 03, 2005 7:52 pm     Reply with quote

hey everyone thanks for helping.

im not sure what i should be grounding other than the PIC. i dont have a cap across the rails, but the input is 5v digital so should be fairly clean. the pins that are not in use are not tied to ground or high they just arent connected to anything. i dont use pullups because i have the weak pullups turned on. i shouldnt need an additional pull up right?

my next step was to try using output_low(pins) at boot and see if that fixes them. im just worried because the only pin that is even used in the program is in input, so if its the other pins that are the problem i dont understand why since i never use them in my code.

thanks for any suggestions.
Mark



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

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

PostPosted: Mon Jul 04, 2005 12:44 am     Reply with quote

You should always put 0.1uf caps as close to the power pins to most all IC's. But this isn't the cause of your problem. Make sure all your power and grounds are connected. Also check your oscillator circuit.
ckielstra



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

View user's profile Send private message

PostPosted: Mon Jul 04, 2005 3:15 am     Reply with quote

Quote:
i dont use pullups because i have the weak pullups turned on
The internal pull-up is for most chips only available on port B.

In general, with CMOS chips you have to be carefull with open inputs. An open input pin will have it's input voltage float somewhere in the middle between gnd and VCC. CMOS is so sensitive that just a bit of noise on the input pin will make it switch rapidly between logic high and zero. CMOS has a low current consumption except during switching. The rapid switching of an open input causes a much higher power consumption than you would expect for your circuit.

Most PIC's have their I/O-pins defined as inputs on power up.
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