Author Topic: Calculation of Font Addresses Multi‐Font Displays Help!  (Read 3599 times)

Bluesboy

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Calculation of Font Addresses Multi‐Font Displays Help!
« on: August 25, 2015, 10:32:01 PM »

Display type: NHD-2.7-12864UMY3
useage: Serial SPImode

From the Font Tables and Application Guide http://www.newhavendisplay.com/app_notes/MultiFont.pdf
 section 2.1 ASCII font table

and section 4.  Calculation of Font Addresses
4.1. 5x7 ASCII

I need help figuring out the what are the the ASCIICODE used in the Address function
if(ASCIICODE >= 0x20 && ASCIICODE <= 0xFF)
 Address = (ASCIICODE 0x20) *8;

example for an "A" character
is the ASCIICODE=hex 21 (from  section 2.1 ASCII font table)? or 12?
or is it =hex 41 (from a standard ASCII table)

also there is an example given in Section 5 to calculate, retrieve and display for a 32 byte Chinese character
is there an example for a simple 8 byte 5x7 ASCII? or I must rewrite to suit?

Thank you very much in advance.





Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Calculation of Font Addresses Multi‐Font Displays Help!
« Reply #1 on: August 26, 2015, 09:03:02 AM »
Hi,

To get the A the hex value should be 21.

There isn't a set example for the standard 5x7 fonts, you would have to rewrite the data for the language you would like to use the 4.1 calculation. So for the letter A just replace all the ASCIICODE sections with 0x21.

Parameters:
ASCIICODE: 8bit ASCII character code
Address: Address of character data

if(ASCIICODE >= 0x20 && ASCIICODE <= 0xFF)
 Address = (ASCIICODE – 0x20) *8;

Bluesboy

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Calculation of Font Addresses Multi‐Font Displays Help!
« Reply #2 on: September 02, 2015, 09:53:14 PM »
Thank you so much...
I just what to straight out a few things with the Multi Font so I'm not going in circles!

BTW the way I have the main graphic side working and can send checker board and rectangles clear the screen etc

The procedure is as follows and please correct me if I'm wrong
Based on the Chinese example..as shown on on page 30 section 5
but I'm first trying 5x7 ASCII just for the letter "A" or 0x21 from  Font table 2.1
and
-Send string to address calculation function running  in MPU(i.e ATmel XMEGA)
and obtain address I end up with address=8 (I hope?)
-then I send a 24 byte address to the MF chip SPI (mode0) SPI_OUT data= 0x0B,0x00,0x00,0x08,0xFF (read command, 3 bytes, first two are dummy cause my address is just 0x08, than the 0xFF dummy) but the documents section 6 (page 31) say dummy byte is FF but in section 12.2 (page 31) Communication Protocol dummy byte stated to be a 0x00??
-now I switch to SPI mode3 to RX 32 bytes?? or just 8 bytes
-so if I can save or store that all (but my SPI code isn't work) but if I could than I send back out the Graphic display side
using the data command but not sure what routine.

I guess I need some help on that...almost there as I figured how to "init" the display so far.
Thank you in advance
Dave

Bluesboy

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Calculation of Font Addresses Multi‐Font Displays Help!
« Reply #3 on: September 08, 2015, 06:18:58 AM »
Anyone?

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Calculation of Font Addresses Multi‐Font Displays Help!
« Reply #4 on: September 08, 2015, 09:45:34 AM »
Hi,

I am looking into this, but your logic seems fine. I would stick to using the dummy variable that is in the Multi-Font display spec.

Bluesboy

  • Jr. Member
  • **
  • Posts: 11
  • Karma: 0
    • View Profile
Re: Calculation of Font Addresses Multi‐Font Displays Help!
« Reply #5 on: September 08, 2015, 12:43:05 PM »
Thank you,
I have the (NHD-2.7-12864UMY3) hooked up to a LOGIC Analyser to view the SPI signals.
Using the the SERIAL Protocol SPI with a ATMEL XMEGA.

I do have the initialization C code functions working and can send graphics (Data and Command)
which I'll clean up very soon and make available to the forum.


Thanks again for any support

Saurabh_B

  • Administrator
  • Hero Member
  • *****
  • Posts: 355
  • Karma: 10
    • View Profile
Re: Calculation of Font Addresses Multi‐Font Displays Help!
« Reply #6 on: September 11, 2015, 10:54:16 AM »
Hi, Here is some information if it can help at all:

  • The dummy Variable is 0xFF
  • You would want to save the information coming back from the MF Chip into an 8X8 Array. The MF chip will give you 8 sets of bytes. With the bytes, B0-B7 will be the font information.
  • The bits will be vertical, so you could display the information one of 2 ways, either using the bit that corresponds with the line you are currently writing and go horizontally, or go through each bit and write vertically

 

NHD‐0216PZ‐FL‐YBW

Started by oldhippyBoard Graphic LCDs

Replies: 1
Views: 2201
Last post January 23, 2015, 09:37:27 AM
by Michael_L
NHD‐0420DZW‐AB5 Lines

Started by RickJBoard OLEDs

Replies: 1
Views: 2280
Last post January 09, 2015, 04:18:32 PM
by Michael_L
NHD‐0420CW‐AB3 I2C Interface

Started by andersonpdBoard OLEDs

Replies: 1
Views: 2634
Last post January 23, 2015, 10:00:06 AM
by Michael_L
NHD‐2.23‐12832UCB3 I2C WontTurn ON

Started by NHD2.23_I2CBoard OLEDs

Replies: 0
Views: 1899
Last post April 05, 2015, 05:33:02 AM
by NHD2.23_I2C
NHD‐2.8‐25664UMY3 Multifont SPI

Started by krolfeBoard OLEDs

Replies: 0
Views: 1812
Last post June 02, 2015, 11:06:09 AM
by krolfe