LCD Presentation
LCD Presentation
USB bootloader. These must be used with every application program to run as a USB
application.*/
extern void _startup (void);
#pragma code _RESET_INTERRUPT_VECTOR = 0x1000
#pragma code
#pragma code _HIGH_INTERRUPT_VECTOR = 0x1008
void high_ISR (void)
{
}
#pragma code
#pragma code _LOW_INTERRUPT_VECTOR = 0x1018
void low_ISR (void)
{
}
#pragma code
//End of interrupt vector relocation
//LCD data pins connected to PORTD and control pins connected to PORTE
#define LCD_DATA PORTD //LCD data port
#define ctrl PORTE //LCD signal port
#define en PORTEbits.RE2 //enable signal
#define rw PORTEbits.RE1 //read/write signal
#define rs PORTEbits.RE0 //register select signal
#define BUSY PORTDbits.RD7
This section relocates the reset and interrupt vectors. It is crucial when working
with a USB bootloader.
LCD Control Definitions:
Macros define the connections of the LCD control and data pins to the
microcontroller's ports.
LCD Function Definitions:
Ensure that the connections between the microcontroller and the LCD are correct,
and the LCD is compatible with the control signals and data lines as defined in the
code. You might need to adjust the code based on the specifics of the LCD you are
using.