Author Topic: What hex character is this?  (Read 3303 times)

svolk@crimsontrace.com

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
What hex character is this?
« on: October 20, 2014, 07:29:09 PM »
I am working on a ASCII display using SPI port and everything is working fine except I cannot sort on the last character that gets received. It displays a weird character that is not in the data sheet on page 14

(see attached picture)

 When I wrote a nibble sorting command  and added 0X41h to each nibble of the data -- AB was displayed -- which meant the raw data should have been 0x01h. -- but sorting on 0X01h caused an error.

Any idea what the hex value of the displayed character is so i can sort on it and keep it from displaying?

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: What hex character is this?
« Reply #1 on: October 21, 2014, 07:53:18 AM »
Can you please provide the display's full part number?  Also, can you please explain what you mean by sorting?  Lastly, right before you see this character on the display, what value (hex) are you sending?

svolk@crimsontrace.com

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: What hex character is this?
« Reply #2 on: October 21, 2014, 10:02:54 AM »
That would help - wouldn't it? (Forgot to include the part#)

The display is a NHD‐0420D3Z‐NSW‐BBW‐V3

I am receiving a string of ASCII characters from an external source. All the alpha-numeric ASCII characters display fine -- except the last character -- which is some type of weird control character.
So to try to find out what character it is --I took the upper nibble of the weird character, and-ed it with 0xF0, shifted right without carry, added 0x41h and SPI'd the character to the display which came out as an "A" . I then took the lower nibble of the weird charater, and-ed it with 0x0F, added 0x41 and SPI'd the character to the display which came out as an "B". Fine. That means the weird character data should be 0x01, but when I send the NHD‐0420D3Z‐NSW‐BBW‐V3 a 0x01, it displays as" ll " -- the same as the attached picture except the bottom left corner pixel is white instead of black -- which doesn't match the weird character that is actually displayed!

I am trying to sort on the weird character as a message terminator -- so that when I see it come in - I do not display it.


Any idea how to add a picture to this post?
« Last Edit: October 21, 2014, 10:05:53 AM by svolk@crimsontrace.com »

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 356
  • Karma: 33
    • View Profile
Re: What hex character is this?
« Reply #3 on: October 22, 2014, 08:14:10 AM »
You should be able to attach an image to the post.  Look under the message box where it says "Attachments and other options".  Allowed file types are jpg, pdf, and png.  You would post it in the same manner that you posted your first image.

Also, based off what you've said, it seems each time you get this string of ASCII characters it is always the last character that is affected.  Most likely there is something going on with this character string at the end, because the display wouldn't just properly show every character except for the last one each time.  The LCD will show what is being sent to it, and again, since it's working for all other characters in the string, that tells me there may be some extra bits at the end of your string that is causing issues.
« Last Edit: October 22, 2014, 08:19:28 AM by Michael_L »

svolk@crimsontrace.com

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: What hex character is this?
« Reply #4 on: October 24, 2014, 10:35:50 AM »
Michael,

Thanks again for your help.

I was able to work around the problem by counting characters -- as the ASCII string was of fixed length -- but was never able to figure out what character generated the character detailed in the 1st post.  When the display was sent ASCII data in the 0x20 to 0x7F range everything worked great!

My suggestion is to add a debug function to the Table of Commands that displays the 8 bit value of the last data character sent in Hex -- [MS Nibble in Row 1, Column 1 ] & [LS Nibble in Row 1, Column 2] 

Best wishes,

-Scott Volk


 

Character LCD NHD‐0220D3Z‐NSW‐BBW‐V3 not receiving correct characters

Started by davekBoard Character LCDs

Replies: 1
Views: 2356
Last post March 25, 2016, 05:23:05 PM
by Saurabh_B
NHD-0420DZW-AG5 OLED character module--Displaying junk data

Started by control3Board OLEDs

Replies: 2
Views: 1312
Last post December 11, 2016, 11:19:54 PM
by control3
NHD-C0220Biz-FSW adds character 0x11 at begining of line

Started by whAtlGaBoard Character LCDs

Replies: 3
Views: 1541
Last post July 11, 2016, 08:20:40 AM
by Saurabh_B
Controlling 1x16 character display NHD-0116GZ.

Started by icaganBoard Character LCDs

Replies: 5
Views: 4813
Last post May 21, 2014, 03:31:37 PM
by Michael_L
OLED Character display - Some commands don't work

Started by wedgeBoard Character LCDs

Replies: 1
Views: 3216
Last post July 08, 2014, 09:29:43 AM
by Michael_L