<?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>S12 / MagniV MicrocontrollersのトピックRe: LCD hitachi hc9s12256Dp</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LCD-hitachi-hc9s12256Dp/m-p/207973#M8504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello and welcome to the forums nevi,&lt;BR /&gt;&lt;BR /&gt;This code looks like it is for a 4x20 character LCD module based on a Hitachi HD44780 controller.&lt;BR /&gt;Therefore cmd_reg would be the 8-bit port which connects to the data port of the LCD module.&lt;BR /&gt;They are using reads of the busy flag in between initialisation writes instead of delays and it is unclear how the&amp;nbsp; modules R/W input is being controlled.&lt;BR /&gt;Also you have not shown us the putc2lcd function.&lt;BR /&gt;&lt;BR /&gt;It is a good idea to use a code box (the SRC button) to display example code as it will look neater.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Mar 2008 06:58:14 GMT</pubDate>
    <dc:creator>peg</dc:creator>
    <dc:date>2008-03-30T06:58:14Z</dc:date>
    <item>
      <title>LCD hitachi hc9s12256Dp</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LCD-hitachi-hc9s12256Dp/m-p/207972#M8503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hello, I have problem with program. I don't know what is cmd_reg. This program is from one book. But there wasn't explaint it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#include hc12.h&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#include stdio.h&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;char *msg = "this is a very very very long string in the desert storm";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void putc2lcd(char ch);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void puts2lcd(char *ptr);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void lcd_init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void main(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lcd_init();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;puts2lcd(msg);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;asm("swi");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void lcd_init()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while(cmd_reg &amp;amp; 0x80); /* wait until LCD is ready */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cmd_reg = 0x3C; /* set 4 x 20 display */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while(cmd_reg &amp;amp; 0x80);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cmd_reg = 0x0f; /* display and cursor on */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while(cmd_reg &amp;amp; 0x80);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cmd_reg = 0x14; /* display and cursor on */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while(cmd_reg &amp;amp; 0x80);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cmd_reg = 0x01; /* display and cursor on */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while(cmd_reg &amp;amp; 0x80);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;void puts2lcd (char *ptr)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while (*ptr) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;putc2lcd (*ptr);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ptr++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} Do you know please. What should be cmd_reg? And how i can do that? Thank you very much. I sorry for my english.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by nevi on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-03-29&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;11:29 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by nevi on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2008-03-29&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;11:30 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 06:28:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LCD-hitachi-hc9s12256Dp/m-p/207972#M8503</guid>
      <dc:creator>nevi</dc:creator>
      <dc:date>2008-03-30T06:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: LCD hitachi hc9s12256Dp</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LCD-hitachi-hc9s12256Dp/m-p/207973#M8504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello and welcome to the forums nevi,&lt;BR /&gt;&lt;BR /&gt;This code looks like it is for a 4x20 character LCD module based on a Hitachi HD44780 controller.&lt;BR /&gt;Therefore cmd_reg would be the 8-bit port which connects to the data port of the LCD module.&lt;BR /&gt;They are using reads of the busy flag in between initialisation writes instead of delays and it is unclear how the&amp;nbsp; modules R/W input is being controlled.&lt;BR /&gt;Also you have not shown us the putc2lcd function.&lt;BR /&gt;&lt;BR /&gt;It is a good idea to use a code box (the SRC button) to display example code as it will look neater.&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 06:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LCD-hitachi-hc9s12256Dp/m-p/207973#M8504</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2008-03-30T06:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: LCD hitachi hc9s12256Dp</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LCD-hitachi-hc9s12256Dp/m-p/207974#M8505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I have some sample code, but it uses 4 bit mode.&lt;BR /&gt;Quite often interfaces do this so that only 6 bits are used.&lt;BR /&gt;There are 4 data bits, a command/data line, and a strobe. The R/W line is always set to write.&lt;BR /&gt;This controller can do 4-bit or 8-bit transfers.&lt;BR /&gt;&lt;BR /&gt;Can you confirm the connection of your interface?&lt;BR /&gt;What board is it?&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Mar 2008 07:44:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/LCD-hitachi-hc9s12256Dp/m-p/207974#M8505</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2008-03-30T07:44:42Z</dc:date>
    </item>
  </channel>
</rss>

