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:
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
Posted: Tue Dec 15, 2009 10:18 am
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
Posted: Tue Dec 15, 2009 10:32 am
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.
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