SawDust - Viewing Profile: Topics - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

SawDust

Member Since 05 Jun 2014
Offline Last Active May 25 2017 01:49 AM
-----

Topics I've Started

I2C LCD character interpretation shifted by half a character

25 May 2015 - 09:08 PM

I am trying to get my Netduino 2+ working with a Sainsmart 2004 I2C LCD (with PCF8574 I2C backpack). I am using Toolbox MultiI2C class, 100KHz clockrate, and 2.2K resistors seem to give nice crisp shape on signal analyzer. The first MultiI2C.Write always produces a NAK, but all succeeding writes produce ACKs. I have checked the analyzer output and it appears the setup commands and write bits are all correct. The good news is that I am seeing some characters, the bad news it they are not the characters I wrote.

 

My test program is writing A, B, C, D … which happens to be the 0100 high nibble column in the ASCII table. However the characters that I see are  … $, 4, D, T, d, t … which happen to be the 0100 low nibble row of the ASCI table. I am writing character high nibble, pulse enable, writing character low nibble, pulse enable... For some reason the last half of the previous character is being combined with the first half of the current character, meaning the LCD interpretation is half a character off (previous low nibble being interpreted as current high nibble, combined with current high nibble being interpreted as current low nibble). Is this shifting a result of the initial NAK? Any ideas on how to get the current high nibble & low nibble back in synch? What is the proper initialization for I2C LCD's, especially with the first NAK?

 

Thanks for any ideas offered on how to solve this problem.


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.