OLED Character Module is actually not responding
"Taiwo" <taiwo_ososanya-/[email protected]>
| Newsgroups | gmane.comp.hardware.rabbit-semiconductor |
|---|---|
| Message-ID | <[email protected]> |
Hello everyone
I wrote a message some days back titled "Aux I/O is not responding."
After verifying the output signals of the RCM6700 pins using an MSO
picoscope, I realised the pins are actually responding but the module is
not displaying anything at all.
I had done a little bit of research in the predefined LCD122KEY7.LIB
file to work out the wait states required among other things. I have
configured the PA pins to serve as the data bus, while PB3 and PB2 are
the R/W and RS pins of the OLED module with PB3 always low since I am
only writing to the OLED. I have also configured PE7 to serve as the I/O
chip select strobe (15 wait states, write-enabled and inverted (active
high)), which is connected to the Enable pin of the OLED.
Below (displayed in red) is a part of my design that shows my
initialisation process. Please can you have a look and tell me what I
might be missing out.
#define PORTA_AUX_IO
void SendToDisplay(int addr, char value) // addr is used to make the RS
pin high or low{ WrPortE(addr+oxE000, NULL, value);}
void OLEDInit(void){ //Initialise PE7 to be the OLED chip select strobe
WrPortI(IB7CR, &IB7CRShadow, 0x08); BitWrPortI(PEAHR, &PEAHRShadow, 0,
6); BitWrPortI(PEAHR, &PEAHRShadow, 0, 7); WrPortI(PEFR, &PEFRShadow,
(PEFRShadow|0x80));
MsDelay(1000); 1sec delay to allow OLED boot up
SendToDisplay(0, '\B00111001'); // 8-bit, 2 line, 5x8 dots, Western
European font SendToDisplay(0, '\B00001100'); // Display on, cursor
off, non-blinking cursor SendToDisplay(0, '\B00000110'); // Increment
and non-shift display
return;}
void DisplayOnOLED(char* str){ int i; for (i = 0; i < strlen(str); i++)
{ SendToDisplay(1, str[i]); }}
void ClearOLED(void){ SendToDisplay(0, 0x01); MsDelay(3); // 3ms to
clear display}
void DisplayLine(char* str, char line){ char buffer[21]; memset(buffer,
' ', 21); buffer[20] = '\0';
SendToDisplay(0, line);
memcpy(buffer, str, strlen(str));
DisplayOnOLED(buffer); }
int main (){ char str[21] = "Hello World!"; OLEDInit(); ClearOLED();
DisplayLine(str, 0x80);
return 0;}
Please can you assist in finding where the bug will be located..... I
have tried so many things like making PE7 active-low (default).
Thanks