Author Topic: NHD-0420D3Z-FL-GBW-3V Dropping characters over I2c  (Read 4078 times)

camac881

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
NHD-0420D3Z-FL-GBW-3V Dropping characters over I2c
« on: November 11, 2014, 02:05:13 PM »
Hello All,
  I saw the other posts about losing characters over I2c due to firmware issues and tried the same fix by slowing it down. It has gotten better but I'm still dropping the occasional character. I am running the screen from an Arduino Uno and displaying data from an SPI A/D converter.

 My question is what is the correct way to code a speed correction for the Arduino? The line I'm using now is
#define TWI_FREQ = 100000L / 6; Is that correct?

Thanks,
Cam

Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 357
  • Karma: 34
    • View Profile
Re: NHD-0420D3Z-FL-GBW-3V Dropping characters over I2c
« Reply #1 on: November 11, 2014, 03:12:01 PM »
I'm not sure if this applies to the Uno as well as the Mega, but with the Arduino Mega I have used "TWBR = 152;" (sets I2C clock frequency to 50kHz) after I call "Wire.begin()" in the setup() function.
I would check the Arduino forums/documentation to confirm this works with the Uno too.

camac881

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: NHD-0420D3Z-FL-GBW-3V Dropping characters over I2c
« Reply #2 on: November 12, 2014, 08:16:37 AM »
Hello Michael,
  That worked perfectly. Thank you.

  I checked the Wire library reference at Arduino.cc and they referenced the data sheet at Atmel and a table that does not make this any clearer. How do you come up with the number? Do you gather all the pieces and run them through the formula? It seems like herding cats to me.

Thanks for your help!
Cam


Michael_L

  • Administrator
  • Hero Member
  • *****
  • Posts: 357
  • Karma: 34
    • View Profile
Re: NHD-0420D3Z-FL-GBW-3V Dropping characters over I2c
« Reply #3 on: November 14, 2014, 09:41:07 AM »
You're welcome!  This site should help:

http://www.gammon.com.au/forum/?id=10896

 

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

Started by davekBoard Character LCDs

Replies: 1
Views: 4117
Last post March 25, 2016, 05:23:05 PM
by Saurabh_B
NHD‐240128WG‐BTFH‐VZ - custom characters

Started by saubaerBoard Graphic LCDs

Replies: 1
Views: 3009
Last post November 11, 2016, 12:09:42 PM
by Saurabh_B
NHD-2.7-12864UCY3 yellow columns occur under ascii characters

Started by bsoyerBoard OLEDs

Replies: 7
Views: 6447
Last post August 26, 2015, 11:02:25 AM
by tracyb
NHD-C0220BiZ-FSW-FBW-3V3M NAKs all odd numberd ASCII characters

Started by majorninthBoard Character LCDs

Replies: 7
Views: 6094
Last post May 28, 2015, 04:51:31 PM
by Michael_L
Generating characters of size more than 8x8 pixels on NHD-320240WG-BoTFH-VZ#

Started by harshal6905Board Graphic LCDs

Replies: 0
Views: 35
Last post September 19, 2018, 01:36:49 PM
by harshal6905