Greetings. I bought the PCWH software last week and am trying to get familiar with it. I am pretty familiar with the pic assembler, and am now trying to branch into the C language.
I am using:
Microcontroller: PIC 18LF4520
LCD: 4x16 character Hitachi HD44780 LCD.
and I have #included the lcd.c file from the PICC C library.
In the new project wizard I selected to have the LCD driver installed. Now I am trying to see how I am going to adapt your LCD library to my application. I see in the LCD program it relies on me overlaying the “struct lcd_pin_map” over a port. I am not sure how to make this work for me.
struct lcd_pin_map { // This structure is overlayed
BOOLEAN enable; // on to an I/O port to gain
BOOLEAN rs; // access to the LCD pins.
BOOLEAN rw; // The bits are allocated from
BOOLEAN unused; // low order up. ENABLE will
int data : 4; // be pin B0.
} lcd;
My problem lies in the RE0 pin. Is this going to be a major problem that I am split across two ports? I don’t have an entire port to dedicate to the LCD. PORTA is the only contiguous port I have available. PORTA starts at 0xF80, and PORTE starts at 0xF84.
What is my best solution?
If anyone has any ideas let me know. I would appreciate any help any one has.
Best Regards,
Mark McKinley
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sun Nov 27, 2005 12:07 am
Quote:
My problem lies in the RE0 pin. Is this going to be a major problem that I am split across two ports.
Look in the CCS Code Library forum. There are drivers posted there
that allow you to spread the LCD signals over two or more ports.
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