Newhaven Display Forum

Newhaven Products => OLEDs => Topic started by: PhilipJ on February 06, 2017, 06:44:27 AM

Title: What is 'shift' in example code
Post by: PhilipJ on February 06, 2017, 06:44:27 AM
Hi All,
I have just started with an NHD-3.12-25664UMB3 display and downloaded the example code to drive it, thanks for that it's a great help in getting started quickly.

Some of the routines include use of a variable named Shift; e.g.

void Fill_Block_25664(unsigned char Data, unsigned char a, unsigned char b, unsigned char c, unsigned char d)
{
    Set_Column_Address_25664(Shift+a,Shift+b);
    ....

I just wonder what this variable represents as I can't find it defined anywhere in the code (which I quite understand is not meant to be a full program). I've tried taking it out but I'm not sure if the function is operating correctly without it.

Thanks for any assistance
PhilipJ
Title: Re: What is 'shift' in example code
Post by: PhilipJ on February 06, 2017, 09:34:27 AM
Well I think I have answered my own question:
for some reason this display's left most column is numbered 28, but I've no idea why. I have found by trial and error that if I want to light up a pixel in this left most column I have to set ColumStartAddress to 0x1c.

Can anyone from Newhaven displays shed any light on this please? Is it somewhere in the data sheet and I've just missed it?

regards
PhilipJ