Hola KillerJC,
Estoy modificando el código para usar un LCD, pero tengo el siguiente error al compilar:
Undefined identifier -- set_tris_lcd
La sentencia completa donde está el fallo es:
#if defined(__PCB__)
set_tris_lcd(LCD_INPUT_MAP);
#else
He probado incluyendo, antes de #include <lcd.c>, las siguientes sentencias:
CASO1:
#define LCD_ENABLE_PIN PIN_B0
#define LCD_RS_PIN PIN_B1
#define LCD_RW_PIN PIN_B2
#define LCD_DATA4 PIN_B3
#define LCD_DATA5 PIN_B4
#define LCD_DATA6 PIN_B5
#define LCD_DATA7 PIN_B6
CASO2:
#define LCD_DATA_PORT getenv("SFR:PORTB")
En ningun caso consigo que compile sin error.
He mirado la configuración de la librería lcd.c, y creo que habría que configurar las siguientes opciones:
#if defined(__PCB__)
// these definitions only need to be modified for baseline PICs.
// all other PICs use LCD_PIN_MAP or individual LCD_xxx pin definitions.
/* EN, RS, RW, UNUSED, DATA */
const LCD_PIN_MAP LCD_OUTPUT_MAP = {0, 0, 0, 0, 0};
const LCD_PIN_MAP LCD_INPUT_MAP = {0, 0, 0, 0, 0xF};
#endif
¿Podrías decirme cómo debo configurar esto?
Supongo que habrá que indicar qué pines usar, pero... no sé cuáles son.
Gracias de antemano!
Saludos