<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>LCD 4x20 on a LPC1768</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/39669/lcd-4x20-on-a-lpc1768</link><description> 
Hello everyone, 
I&amp;#39;d like to interface a 4x20 character LCD. But I can not do it! 
Finally I arrive boot (the black line disappears) but I do not see
the cursor blinking and the characters that I want to write. 
So I just see whether you already have</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/80130?ContentTypeID=1</link><pubDate>Thu, 29 Mar 2012 02:03:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:28c742b0-3242-4dfb-9a8f-6948de8aad79</guid><dc:creator>Bernard de l&amp;amp;#39;Escaille</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes now I understand my problem!&lt;br /&gt;
I use this CPU for a short time.&lt;br /&gt;
But with your help, I found the solution. Now my LCD works: D&lt;/p&gt;

&lt;p&gt;
thank you&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/60547?ContentTypeID=1</link><pubDate>Wed, 28 Mar 2012 16:57:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:093be19f-940c-4a5b-9430-819437b35f03</guid><dc:creator>Ashley Madison</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;the black line disappears&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
that means the hardware connection is good, just that the lcd
isn&amp;#39;t properly initiated. so I would look into how your code
initiates the lcd - make sure that the timing / commands are sent per
the lcd datasheet.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;LPC_GPIO0-&amp;gt;FIOPIN |= (data&amp;lt;&amp;lt;15); /* place data
*/&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
that does not send a byte to the port.&lt;/p&gt;

&lt;p&gt;
you can use an io mask for that. or you can do it like this:&lt;/p&gt;

&lt;p&gt;
LPC_GPIO0-&amp;gt;FIOPIN = (LPC_GPIO0-&amp;gt;FIOPIN &amp;amp;
~(0xff&amp;lt;&amp;lt;15)) | (data &amp;lt;&amp;lt; 15);&lt;/p&gt;

&lt;p&gt;
or&lt;/p&gt;

&lt;p&gt;
LPC_GPIO0-&amp;gt;FIOPIN &amp;amp;= ~(0xff) &amp;lt;&amp;lt; 15; //clear the
bits&lt;br /&gt;
LPC_GPIO0-&amp;gt;FIOPIN |= (data) &amp;lt;&amp;lt; 15; //set the bits&lt;/p&gt;

&lt;p&gt;
you can write a macro to make it easier to manage.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/143130?ContentTypeID=1</link><pubDate>Wed, 28 Mar 2012 12:32:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9ae0309e-3af0-4280-af6d-2ce5151f21fb</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I/O in push-pull? I suppose but i don&amp;#39;t really know&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
STOP, dig out the datsheet (or the NXP base software description)
and find out about port configuration.&lt;/p&gt;

&lt;p&gt;
You can damage the uC and/or the LCD with misconfigured ports.&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/140204?ContentTypeID=1</link><pubDate>Wed, 28 Mar 2012 12:29:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3a70e242-1cdb-4ce4-a8d6-a227447394df</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;But tomorow I will place an Pull-up resistor on the LCD to pull
the level on 5V. just to adapt the pin level.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;But you think the LCD would work with 3.3V?&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
The LCD, if specified with Vih(min) at 2V7, will work just fine
with a 3V3 port, however still must be powered by 5V.&lt;/p&gt;

&lt;p&gt;
You MUST configure the outputs as push-pull or you will have
severe risetime problems (check with a scope). I have, forgot the
brand, had problems with a LCD that was extremely &amp;quot;risetime
sensitive&amp;quot;.&lt;/p&gt;

&lt;p&gt;
When you configure as push-pull DO NOT install the resistors.&lt;/p&gt;

&lt;p&gt;
If you install the resistors and it start working all you have
done is proving that your pins are not configured as push-pull&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/130980?ContentTypeID=1</link><pubDate>Wed, 28 Mar 2012 11:58:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ce1cf17b-e259-4729-a31e-2901f050a1c4</guid><dc:creator>Bernard de l&amp;amp;#39;Escaille</dc:creator><description>&lt;p&gt;&lt;p&gt;
for the timing normaly it&amp;#39;s good. I have verified with an
oscilloscope.&lt;br /&gt;
I/O in push-pull? I suppose but i don&amp;#39;t really know. But i have read
the databus with an logic anliser and I have, normaly, the good
level!&lt;/p&gt;

&lt;p&gt;
But tomorow I will place an Pull-up resistor on the LCD to pull
the level on 5V. just to adapt the pin level.&lt;/p&gt;

&lt;p&gt;
But you think the LCD would work with 3.3V?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/127431?ContentTypeID=1</link><pubDate>Wed, 28 Mar 2012 11:47:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1595a8ca-6482-44ec-9867-b224b0b6c943</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I use a 5V LCD and I communicate with him in 3.3V. But on the
datasheet they say Vih = 2.2V. So I thought it was compatible 3.3V
(for communication). My problem will not come from there?&lt;/i&gt;&lt;br /&gt;
that is correct, &amp;quot;TTL compatible&amp;quot; is &amp;quot;3V3 compatible&amp;quot;&lt;br /&gt;
I have no idea how long the os_dly_wait is, have you verified with
the LCD datasheet?&lt;br /&gt;
are the port pins driving the LCD configured as push-pull?&lt;br /&gt;
since the amsk bits are beyond 16, did you remember the &amp;#39;L&amp;#39; on the
mash definition or both places will fail&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/116767?ContentTypeID=1</link><pubDate>Wed, 28 Mar 2012 11:20:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cb170a93-91de-4999-a93e-82f839ae8e80</guid><dc:creator>Bernard de l&amp;amp;#39;Escaille</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, I agree.&lt;br /&gt;
I think I found the problem.&lt;br /&gt;
I use a 5V LCD and I communicate with him in 3.3V. But on the
datasheet they say Vih = 2.2V. So I thought it was compatible 3.3V
(for communication). My problem will not come from there?&lt;/p&gt;

&lt;p&gt;
P.S.: I tested the screen on a PIC in 5V (with a library that
already exists) and everything works!&lt;/p&gt;

&lt;p&gt;
-&amp;gt; My display: &lt;a href="http://www.newhavendisplay.com/specs/NHD-0420H1Z-FSW-GBW.pdf"&gt;www.newhavendisplay.com/.../NHD-0420H1Z-FSW-GBW.pdf&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/105861?ContentTypeID=1</link><pubDate>Wed, 28 Mar 2012 06:18:31 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ddfaa4d3-e640-43c0-a320-5f263f27cfd6</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
FIRST you need this&lt;/p&gt;

&lt;pre&gt;
        LPC_GPIO0-&amp;gt;FIOPIN &amp;amp;= LCB_BITS_MASK;    // clear old LCD data
        LPC_GPIO0-&amp;gt;FIOPIN |= (data&amp;lt;&amp;lt;15);       /* place data */
&lt;/pre&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/80129?ContentTypeID=1</link><pubDate>Tue, 27 Mar 2012 14:55:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f6f7e628-7ca2-41c7-9c62-75110a5aecee</guid><dc:creator>Bernard de l&amp;amp;#39;Escaille</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes. Just on port 0, I 32-pin.&lt;br /&gt;
I also try to place the different states of pins (RS, RW, E, DB0-7)
directly in hex on the port. And no results.&lt;br /&gt;
but today I found a logic analyzer. I test tomorrow to see if I am
good on different pins at the right time&lt;/p&gt;

&lt;p&gt;
Bernard&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LCD 4x20 on a LPC1768</title><link>https://community.arm.com/thread/60553?ContentTypeID=1</link><pubDate>Tue, 27 Mar 2012 08:19:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:25b50bf1-3c1b-4c10-a12b-e7d59967a04b</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
with no knowledge of the LPC1768 (have, so far, only worked with
ST)&lt;br /&gt;
under the assumption that you are using a traditional character
LCD.&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;LPC_GPIO0-&amp;gt;FIOPIN |= (data&amp;lt;&amp;lt;15); /* place data
*/&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
1) does GPIO0 have &amp;gt;23 pins?&lt;br /&gt;
2) or&amp;#39;ing tha data without first and&amp;#39;ing to clear the field is not a
good idea&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>