<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need help displaying moving text on a 16x2 LCD in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173626#M5533</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also be aware that as the controller is made for larger displays you can use the memory off the edge of your display to write a long message into and then scroll backwards and forwards through it. This can be used with either of the methods suggested above. However this makes it tricky to scroll one line to another and scroll only one line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2009 05:14:49 GMT</pubDate>
    <dc:creator>peg</dc:creator>
    <dc:date>2009-04-21T05:14:49Z</dc:date>
    <item>
      <title>Need help displaying moving text on a 16x2 LCD</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173623#M5530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everyone.&amp;nbsp;I have a 16x2 LCD and&amp;nbsp;I am able to display text on the LCD but I want to make the text moving, like having the text moving from right to left of the LCD instead of stationery text. Can anyone help me? Thx &lt;/SPAN&gt;&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif"&gt;&lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 13:24:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173623#M5530</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2009-04-20T13:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help displaying moving text on a 16x2 LCD</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173624#M5531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;that will depend of course of the LCD display controller used. If you are using one of the common Hitachi or HD44780 or compatible, then there are two special commands which allow you to shift the content in the display:&lt;/P&gt;&lt;P&gt;#define RightShift&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x1C&lt;BR /&gt;#define LeftShift&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x18&lt;BR /&gt;&lt;BR /&gt;void LCD_Shift (unsigned char Right)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (Right)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteLCDCommand (RightShift);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WriteLCDCommand (LeftShift);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course you would have to use your own routine to send the commands (which are pretty timing sensitive).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 17:47:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173624#M5531</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2009-04-20T17:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Need help displaying moving text on a 16x2 LCD</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173625#M5532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An alternative to BN's suggestion is to make use of the "Entry mode set" command, rather than the cursor/display shift command.&amp;nbsp; Reference to these commands can be found within AN1745.&amp;nbsp; Here is an extract from the application note:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;EM&gt;Entry Mode Set&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I/D — Increments (I/D = 1) or decrements (I/D = 0) the DDRAM address by 1 when a character code is written into or read from DDRAM. The cursor or blinking moves to the right when incremented by 1 and to the left when decremented by 1. The same applies to writing and reading of CGRAM.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;EM&gt;S — Shifts the entire display either to the right (ID = 0) or to the left (I/D = 1) when S is 1. The display does not shift if S is 0. If S is 1, it will seem as if the cursor does not move but the display does. The display does not shift when reading from DDRAM. Also, writing into or reading out from CGRAM does not shift the display.&lt;/EM&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;To set the mode that you require would need a command value of 0x07.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The advantage of this method would seem that the left shift of the display would occur automatically whenever each character was written.&amp;nbsp; With the previous method, the display shift command would need to be given prior to writing each character to the display.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 04:04:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173625#M5532</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-04-21T04:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Need help displaying moving text on a 16x2 LCD</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173626#M5533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also be aware that as the controller is made for larger displays you can use the memory off the edge of your display to write a long message into and then scroll backwards and forwards through it. This can be used with either of the methods suggested above. However this makes it tricky to scroll one line to another and scroll only one line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 05:14:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173626#M5533</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2009-04-21T05:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need help displaying moving text on a 16x2 LCD</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173627#M5534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thx for the replies. I followed BlackNight's example. Not sure how to utilise BigMac's example lol. Here's how&amp;nbsp;I programmed it for those who would like to know:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;if (config == shift)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //shift display&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LCDrs = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LCDdata = 0b00011000;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wait;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LCDenable = 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wait;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LCDenable = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wait;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2009 15:02:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Need-help-displaying-moving-text-on-a-16x2-LCD/m-p/173627#M5534</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2009-04-23T15:02:51Z</dc:date>
    </item>
  </channel>
</rss>

