Author Topic: Double Hight Font on a 763-NHD-0420CW-AW3 with Phyton on a Pi3b  (Read 1250 times)

garbage98

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Double Hight Font on a 763-NHD-0420CW-AW3 with Phyton on a Pi3b
« on: February 20, 2019, 03:50:05 AM »
Hi,

I purchased a 763-NHD-0420CW-AW3 OLED character display and would like to use the two upper lines as one text line with double size letters. Is this display capable of showing double height fonts?

I am using a Raspberry Pi 3b and I am developing in Phyton. Does someone know a good resource for a existing library to get things working quickly?

Thanks!

Ted_M

  • Administrator
  • Full Member
  • *****
  • Posts: 132
  • Karma: 5
    • View Profile
Re: Double Hight Font on a 763-NHD-0420CW-AW3 with Phyton on a Pi3b
« Reply #1 on: February 20, 2019, 09:43:43 AM »
The NHD-0420CW-AW3 OLED display has the US2066 controller/driver built in which does support Double-Height font characters.
The command table in the display's datasheet includes the instruction code on pg.8.

Please also refer to page 37 of the US2066 datasheet for more details. http://www.newhavendisplay.com/app_notes/US2066.pdf

See our Github for a US2066 library. https://github.com/NewhavenDisplay/NHD_US2066

Another Github link with python code for this display that may be useful:  https://github.com/wjskrydl/nhd-oled


Best Regards,

garbage98

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Double Hight Font on a 763-NHD-0420CW-AW3 with Phyton on a Pi3b
« Reply #2 on: February 20, 2019, 11:31:49 AM »
I will look into it. Thanks!

garbage98

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Double Hight Font on a 763-NHD-0420CW-AW3 with Phyton on a Pi3b
« Reply #3 on: February 28, 2019, 05:24:01 AM »


I've found the command for controlling Line Size in the data sheet.
See datasheet pg. 8 https://www.mouser.de/datasheet/2/291/NHD-0420CW-AW3-1266321.pdf

Can you help me figure out how to send this command to my display? I'm using the python module you've linked above.

Code: [Select]
def __command(self, byte):
        self.__bang(byte, True)

I'm unsure how to translate this command into byte format.

Thank you
« Last Edit: February 28, 2019, 05:25:39 AM by garbage98 »

Alee_S

  • Administrator
  • Jr. Member
  • *****
  • Posts: 53
  • Karma: 0
    • View Profile
Re: Double Hight Font on a 763-NHD-0420CW-AW3 with Phyton on a Pi3b
« Reply #4 on: March 01, 2019, 08:41:18 AM »
Hi there,
 

The states of your D0-D7 bits will determine the hex value for your command.

Since the double height font feature is in the 'function set' command, you will need to send the 'function set' command. 
D0 can change the internal 'IS' bit to a 1 or 0, which can allow to use other commands listed in the datasheet. For now, I would advise to keep it low.
D1 will turn the internal 'RE' bit to 0.
D2 should be 1 to enable double height.
D3 should be 1, since you are operating with a 4-line display.
D4 can be either 1 or 0, indicated by the star.
We are also instructed to keep D5 as 1, and D6 and D7 as 0.

If we convert these 8 bits to hex value, we would get (0x2C) or (0x3C), depending on what your D4 value is.


Based off this, you may try and send either self.__command(0x2C) or self.__command(0x3C) at the end of your  def __begin(self): function.
 
Hopefully this will do the trick!






 

NHD‐0420CW‐AB3 I2C Interface

Started by andersonpdBoard OLEDs

Replies: 1
Views: 6726
Last post January 23, 2015, 10:00:06 AM
by Michael_L
NHD‐0420CW‐AG3 Contrast question

Started by RichardRBoard OLEDs

Replies: 2
Views: 6470
Last post January 16, 2016, 09:52:02 AM
by RichardR
NHD‐0420CW‐AG3: blinking part of text?

Started by RichardRBoard OLEDs

Replies: 2
Views: 6130
Last post February 28, 2017, 03:27:02 PM
by BobG
NHD‐0420CW‐AG3 + I2C + PIC assembly code: trouble getting started

Started by RichardRBoard OLEDs

Replies: 4
Views: 9041
Last post December 17, 2015, 03:12:49 AM
by RichardR
NHD-0420CW-Ax3 Driver (w/demo) written for Parallax P8X32A/Propeller MCU

Started by avsa242Board OLEDs

Replies: 1
Views: 3482
Last post January 09, 2018, 04:48:45 PM
by Paul_B