Hi,
I looked at your code and saw the following:
//************************************************************************
// This routine is used for writing to the Toshiba TB62709 Display driver.
//************************************************************************
void display_out(unsigned char command, unsigned char data)
{
PTDD_PTDD3 = 0; // disable chip select
if(SPI1S_SPTEF) // if it is empty, load up the data
{
SPI2D = command; // output address (command)
}
if(SPI1S_SPTEF){
SPI2D = data; // output data
}
PTDD_PTDD3 = 0; // enable chip select (high active)
}
My first reaction was:
PTDD_PTDD3 = 0; // disable chip select
PTDD_PTDD3 = 0; // enable chip select (high active)
shouldn't one of these be
PTDD_PTDD3 = 1; // enable chip select (high active)
???
Then I looked at the code:
if(SPI1S_SPTEF) // if it is empty, load up the data
{
SPI2D = command; // output address (command)
}
if(SPI1S_SPTEF){
SPI2D = data; // output data
}
shouldn't the SPI1 be replaced by SPI2??
Now I have not run the code, so this is just idle thoughts of an idle mind.
So my "improvements" may be catastrophic.
Regards,
Ake