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

How to Pull ups port c

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



Joined: 09 Aug 2007
Posts: 82
Location: TN, India

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

How to Pull ups port c
PostPosted: Tue Dec 15, 2009 7:12 am     Reply with quote

Dear CCS Friends,


In my project I used 5 x6 matrix keypad. For that I take some sample code from CCS forum. In this program, the program has pull_ups on the row pins like port_b_pullups(TRUE);. In my project I connect the 3 rows connected in portB, one row in portD.2 and other row one in portC.2. I'm also using Pullups for the three ports like below:
Code:

port_B_pullups(TRUE);
port_D_pullups(TRUE);
port_C_pullups(TRUE);

When I compile the program, compiler show error on port_C_pullups(TRUE); line. Compiler error is undefine variable. I remove the port_C_pullups(TRUE); line and compile the program and load the program in hardware. When I touch the pin C.2. I received the equal key char in my system.

How to do Pullups on Port c?
Ttelmah
Guest







PostPosted: Tue Dec 15, 2009 10:18 am     Reply with quote

Read the data sheet.
Does the PIC you are using offer pullups on PortC?.
Most don't (can't think of any that do...).
Hence the error.

Best Wishes
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Tue Dec 15, 2009 10:32 am     Reply with quote

If the hardware is not there, NO amount of software will make it work. If the PIC does not have internal pullups inside there is no way to enable them. Read the spec. sheet and see what hardware is inside.

Ronald
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