I have the 12832 function library for the Newhaven NHD-2.23-12832. I made some modifications on the drivers since I have mine set up for 8080 and not 6800.
When I turn the display on I get a screen full of hash. None of the functions seem to do anything except Display_On_Off(); and possibly init though that may not work and the defaults allow it to work.
It appears as if it isn't getting any data writes. So here is driver for both Command and Data with the only difference the polarity of the D/C line: (PIC18)
( In the main init routines)
TRISA = 0b00000011;
ANSELA = 0x03;
ADCON0 = 0b00000101; // ADC 1 Enabled
ADCON1 = 0b00000000; // V ref = power and ground
ADCON2 = 0b00111110; //
PORTA = 0b00000011;
PORTC = 0b00100000;
PORTD = 0b00000000;
// In Display.c
#define GPIOB PORTD
#define GPIOC PORTD
#define Send_Data (PORTA | 0b00010000)
#define Send_Command (PORTA & ~(0b00010000))
#define Chip_Deselect (PORTA | 0b000100000)
#define Chip_Select (PORTA & ~(0b000100000))
#define No_Read (PORTA | 0b00001000)
#define Read (PORTA & ~(0b00001000))
#define Write (PORTA & ~(0b00000100))
#define No_Write (PORTA | 0b00000100)
#define Dis_Reset (PORTC & ~(0b10000000))
#define Clear_Reset (PORTC | 0b10000000)
void oled_Command(unsigned char Data) // 8080 mode
LATC = Dis_Reset;
LATC = Clear_Reset;
LATA = No_Read;
LATA = Send_Data;
PORTD = Data;
LATA = Chip_Select;
LATA = Write;
OLED_uDelay(0x04); // Wait 100 usec
LATA = No_Write;
LATA = Chip_Deselect;
I have a two input scope and WR and CS work properly so I assume the other outputs are as well.
And anyone suggest why none of the functions such as Fill_Block, Fill RAM, Checkerboard, Show_Font57_12832(1, 17, 10, 10); and the like aren't working?
Please sign in to leave a comment.