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

Doubt about the pic or the code

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



Joined: 23 Aug 2006
Posts: 37

View user's profile Send private message

Doubt about the pic or the code
PostPosted: Wed Sep 20, 2006 7:29 am     Reply with quote

Hi everybody!!

Well, first of all, in my project i don't use the ccs compiler, but i guess that someone can help me here, sorry if i'm wrong. By the way, i'm using the boost C compiler and the 16f84a.

In my project is crutial to know if one input is high or low. When the input is low it works just fine, but when no signal are send (nor low or high) is like the input is high.

My question is, this is right, i mean, the pic is suposse to work that way?? Or could that be an software error??


thanks
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Wed Sep 20, 2006 9:53 am     Reply with quote

This is a CCS board supported by CCS. They are extremely tolerant but this board won't last long if it becomes a help desk for competitive compilers.
Either ask your compiler vendor to start a board or start one yourself.
Some PIC pins are open drain and need pull ups for output. If you compiler has a pseudo assembler list file as CCS does you could look at the actual machine instructions. The in pin should tristate and in the abscence of a driven input signal will float. Look at Microchips documentation and good luck with the Boost C board.


Last edited by Douglas Kennedy on Wed Sep 20, 2006 10:02 am; edited 1 time in total
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Wed Sep 20, 2006 9:58 am     Reply with quote

Well, you give us no detail about the circuit, but PORTB of the 16F84A has weak pullups on the input, so if you tristate the input signal (as you imply by saying you don't drive a one or a zero) then you will read a one.

If you are using port A as an input and tristate the input signal, then reading the input pin may give a one or zero, depending on your circuit configuration.
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