Hi! I m Denise. I m trying to finish my final project in Biomedical Engineering/Bioelectronic; wich its last part is to work with a graphical LCD (BATRON - BTHQ128064AVO).
I ve found out original code source (monochrome_screen_driver_sample_project_files) to work with my microcontroller (dspic33f128gp804 - C30 compiler), but there are some parts of mplab's code that are empty, and i don t know how to interface, like these functions:
//**********************************************
//**********************************************
//********** WRITE COMMAND TO DISPLAY **********
//**********************************************
//**********************************************
void display_write_command (BYTE data)
{
//Load the output data onto the bus
DISPLAY_DATA_BUS_OP(data);
//Setup control pins
DISPLAY_CS1(0);
DISPLAY_RW(1);
DISPLAY_RD(1);
DISPLAY_A0(0); //A0 low for a command
What to do next?
//Latch in the byte
##########(#);
#####################; //Pause
##########(#);
###########(#);
}
//***************************************
//***************************************
//********** INITIALISE SCREEN *****
//***************************************
//***************************************
void display_model_initialise(void)
{
//----- PAUSE IF NECESSARY FOR DISPLAY TO POWERUP -----
display_delay_ms(10);
//----- SETUP CONTROL PINS -----
//----- DO THE RESET PIN -----
DISPLAY_RESET(0); //Set low to reset
DISPLAY_CS1(0);
display_delay_ms(1);
DISPLAY_RESET(1); //Set high to run
##################(#);
//----- PAUSE #mS BEFORE ENABLING V0 (The negative driver voltage) -----
//(Not necessary for this screen)
//----- DO THE CONFIGURATION COMMAND SEQUENCE -----
#####################(#### | #); //0xa2 = set drive voltage bias ratio command (0 = 1/9, 1 = 1/7) - Here i think that i have to call display_write_command (0xa2 | dont know if i have to put 0/1 here)
#####################(#### | #); //0xa0 = adc command (0 = normal)
#####################(#### | #); //0xc0 = common output mode select command (0 = normal)
#####################(#### | (# & ####)); //0x20 = set internal Rb/Ra resistor ratio command (0 - 7) Dont understand this line. it should be: display_write_command (0x20 | (?&????))
//Do electronic volume (contrast)
#####################(####); //0x1 = electronic volume set command
#####################(##################### & ####); //electronic volume command (0 - 63, 6bit LSB)
#####################(####); //0xee = clear read / modify / write command
#####################(#### | #); //0xa6 = set display normal / reverse (0 - 1)
#####################(#### | #); //0xac = static indicator on / off (0 - 1)
#####################(#### | # | # | #); //0x28 = power control command (internal power supply operating mode)
//(bit2 = booster, bit1 = vreg, bit0 = vfollower)
#####################(#### | #); //0xae = display on / off command (0 - 1)
#####################(#### | (# & ####)); //0x40 = set display ram display start line
}
Regards.
Dlo