In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: Capt. Quirk, (Cool name. I wish I had thought of it!) Most standard LCDs (and certainly if you got one from Parallax) are going to be expecting the high nibble first, then the low nibble. So, although you are seeing something displayed by sending your data the other way around, it is not your text. So I do not think the display has been properly initialized. [b]Question:[/b] Can you initialize your LCD and have it properly display text using anyone else's SX/B code? In my response I simply took the second code snippet you provided and examined it mainly from the standpoint of "efficiency." In so doing I was compelled to point out what looked like an error to me in regard your presentation of the low nibble first. Obviously there are other factors that must be considered for making the LCD function properly. Basme's code segment does not alter the low nibble of the RB port of the SX. Your code does. If there is nothing connected to RB pins 0-3 this should not cause any problems. It might be more "code space efficient" to do operate this way. If, however, you do have things connected to RB pins 0-3, you quite likely will not want to have their states altered by your LCD code. If you happen to have your LCD control lines connected to any of these lower RB pins, then you will definitely need to heed JonnyMac's advise to use a mask so the the lower nibble (and thus the lower pins) of RB are not altered inadvertently. Keep in mind that if you do this you will need to apply the appropriate masking function with fewer than four assembly language primitives or faster than four clock cycles if you wish to improve upon Basme's code in terms of code space or speed. The bottom line is... once it has been compiled (which is what really counts on the SX), the code segment you have referenced by Basme is hard to improve upon in terms of either code space or speed! I must make one final comment. Although I am glad that you found some web pages that were quite helpful to you, I can not accept any credit for them. I am quite certain they are the effort of someone else. Perhaps you will be kind enough to share the link so that we may all benefit and the proper author may receive due credit. :-) - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=161442#m161689 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)