Main Site Documentation

N18 Display module in landscape mode


#1

Hi everyone,
I just receive my N18 display module and I would like to use it in landscape mode, with images this is not a problem, but with text I cannot find a way to do this without modifying the driver. Is there a chance to do this ?

Thanks


#2

Hi sebarenzi,
Yes, you may modify the N18 driver so that display works in the landscape mode.
You need the source of the latest driver from http://gadgeteer.codeplex.com/ under Main/Modules/GHIElectronics/Display N18/Software/Display N18 (see more information in http://www.ghielectronics.com/community/forum/topic?id=11748&page=1#msg122769).

In the driver source Display_N18_42.cs modify the following lines to swap the screen Width and Height values:

		// public override uint Width { get { return 128; } }
        public override uint Width { get { return 160; } }

and

// public override uint Height { get { return 160; } }
        public override uint Height { get { return 128; } }

next in the Initialize routine modify the line that configures Frame Data Write Direction as follows:

           this.WriteCommand(0x36); //MX, MY, RGB mode
            // this.WriteData(0xC8);
            this.WriteData(0x68);   // Data Write Direction X-Mirror Y-Mirror

Save the Display_N18_42.cs file, add the Display_N18_42 project to your application project and reference it there, build the solution and your display works in the landscape mode.