View previous topic :: View next topic |
Author |
Message |
tienguan
Joined: 06 Jan 2011 Posts: 12
|
|
Posted: Fri Jan 14, 2011 11:42 pm |
|
|
I am using the keypad by ccs which is in the toolkit, so I think there's no need to have those pull up pins, right? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Jan 15, 2011 1:33 am |
|
|
I don't have the ACE kit manual. Only you have it. Look at the
schematic in the manual.
What pins on the PIC are connected to the keypad ? Post the list.
Also, post the list of pins used for the LCD. |
|
|
tienguan
Joined: 06 Jan 2011 Posts: 12
|
|
Posted: Sun Jan 16, 2011 3:31 am |
|
|
I dont think I need the pull up resistors because I am using the keypad by CCS in the toolkit. If I need the resistors, how do I connect it? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19515
|
|
Posted: Sun Jan 16, 2011 4:40 am |
|
|
If you look at the notes about the Ace kit, it refers to the keyboard header 'connecting to port B'. Hence it is almost certainly designed to use the internal 'resistors' in the PIC (current sources really, but serving the same purpose here). You will need the line 'port_b_pullups(TRUE)', to turn these on.
Best Wishes |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Jan 16, 2011 3:20 pm |
|
|
Ttelmah has established that the ACE kit uses PortB for the keypad.
To make it work, add the following modifications to your program,
as shown below in bold. The new lines in should be placed in the
exact locations shown below:
Quote: |
#include "flex_lcd.c"
#define use_portb_kbd TRUE
#include <kbd.c>
void main() {
char c;
port_b_pullups(TRUE);
lcd_init();
kbd_init();
|
|
|
|
|