<?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>8-bit MicrocontrollersのトピックRe: LCD turns off after displaying some garbage value</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220788#M19198</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;nova0809 wrote:&lt;BR /&gt;&lt;P&gt;as far as pin 15 is concerned ,i followed the following pdf.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The description of pins 15 and 16 within the document&amp;nbsp;are so contradictory, it is useless.&amp;nbsp; I suspect it is a translation problem from Chinese.&amp;nbsp; I&amp;nbsp;assume that pins 15 and 16 operate independently from the remainder of the interface.&amp;nbsp; Using a series resistor to limit the current through the backlight to a few mA, you can experimentally determine what polarity of the 12 volt source&amp;nbsp;is required - the backlight will glow when the polarity is correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to turn off the backlight when Vdd is removed, I suggest that you switch the backlight using a simple transistor or MOSFET switch.&amp;nbsp; If the backlight pins are floating, you could use a NPN or N-channel switch inserted between cathode and ground.&amp;nbsp; The base (or gate) would be switched by the Vdd line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also notice that the Vdd limits specified within&amp;nbsp;the referenced&amp;nbsp;document are tighter than the previous datasheet.&amp;nbsp; Even more reason that Vdd should be regulated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With regard to your relay driver circuit, as shown in the most recent schematic, I would suggest a change.&amp;nbsp; The 100uF bulk capacitor, currently connected across the relay coil, would be better connected between the top of the relay coil and ground.&amp;nbsp; This will then&amp;nbsp;absorb the return current surge when the commutating diode across the relay coil conducts, and will reduce the sluggishness of the relay turn-off due to the capacitor.&amp;nbsp; With the current arrangement there will also be an unnecesssary current surge through the transistor switch during turn-on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another likely issue with the relay driver is that you currently provide only about 0.4 mA of base drive current to the BD139.&amp;nbsp; In&amp;nbsp;the worst case this may provide a maximum collector current in the vicinity of 10mA, which maybe insufficient for the relay.&amp;nbsp; In this instance, I might consider a resistor value of 2k2, or maybe even lower.&amp;nbsp; The port pin should use the high current drive setting.&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Sep 2010 21:38:17 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2010-09-06T21:38:17Z</dc:date>
    <item>
      <title>lcd turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220775#M19185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE cellpadding="5" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style=""&gt;i'm using winstar 16*2 char lcd for displaying volume byte on screen.this lcd is interfaced with MC9S08SE8 MCU.i'm controlling the volume by pt2258 .after running the asm program and increasing the volume by remote .it is displaying the correct sequence of volume bytes but when i continue to press the volume button it abruptly stops displaying the correct sequence and displays garbage characters and then the lcd display is turned off.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;plz help if somebody has any idea&lt;BR /&gt;&lt;BR /&gt;if someone has problem understanding the bug ,i can provide asm code.feel free to ask.actually its quite long and will take space.morover the code seems to work fine.&lt;BR /&gt;&lt;BR /&gt;i'm attaching the circuit diagram of lcd interface .i2c communication is used between pt2258 volume controller and microcontroller.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 14:47:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220775#M19185</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-04T14:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220776#M19186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I didn't even look at your circuit because if the LCD works OK for some numbers, it's very unlikely for this to be a hardware issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would help if you provided some code, because without it one can only guess.&amp;nbsp; And here's one such guess:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My guess is that your printing routine is incorrect (e.g., it converts binary to ASCII decimal incorrectly), and as the number increases it starts displaying 'funny' characters.&amp;nbsp; Also, writing an 'infinite' string may end up clearing your display.&amp;nbsp; I'm not saying this is what happens, I'm only guessing.&amp;nbsp; Another possibility is that you have unbalanced stack operations some place, and they become evident after the routine has executed a few times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Sep 2010 21:16:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220776#M19186</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2010-09-04T21:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220777#M19187</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;Or another guess is noise corrupting the setup registers.&lt;/P&gt;&lt;P&gt;I have just had this problem a week ago.&lt;/P&gt;&lt;P&gt;For some reason these style of display get corrupted into a mode where as you keep writing to the display, something happens, just not what you would like or can read.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Sep 2010 04:24:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220777#M19187</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2010-09-05T04:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: lcd turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220778#M19188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, and welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keep in mind that, for the LCD display controller you are using, the character set includes many blank locations, and the upper page (bit-7 is set) also includes a group of Japanese style characters that might be interpreted as "garbage".&amp;nbsp; I think that you will need to analyse what byte values are actually being&amp;nbsp;sent to the display, using break point or single stepping debug techniques.&amp;nbsp; This is likely to be a little more complicated because you are&amp;nbsp;using 4-bit operating mode for the display.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the correct sequence always cease at the same point?&amp;nbsp; If this is the case, I would suspect that your conversion algorithm to drive the display does not work for all volume values.&amp;nbsp;Does the volume level still continue to increment after&amp;nbsp; the displayed value goes haywire?&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 05 Sep 2010 08:48:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220778#M19188</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-09-05T08:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220779#M19189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank u all for replying.i wasnt online to reply back.i forgot to mention one thing.the lcd screen gets blanked but it has a dc signal on its pin no 2 as in the image i have attached.this doesnt happen after a specific no. of volume button press.Also it happens anywhere in the sequence after a variable&amp;nbsp;no. of button pressings.the volume control by pt2258 works correctly and provides correct change in volume as per code.morover the relay gets switched off but continues to have some dc on its pin.i'm providing the asm code .its long hence i was reluctant to upload.i have attached some part of it and i just hope it will b useful.the lcd display module no. is WH1602B.and the garbage its showing are in the following sequence..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;k k ; + ; ;&lt;/P&gt;&lt;P&gt;[[ ;;&lt;/P&gt;&lt;P&gt;{ k k ; + ; ;&lt;/P&gt;&lt;P&gt;and then the screen gets blank with the sound of relay getting turned off.but there is still some dc signal on relay pins .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 12:40:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220779#M19189</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-06T12:40:19Z</dc:date>
    </item>
    <item>
      <title>the character generator pattern for lcd</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220780#M19190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 13:31:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220780#M19190</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-06T13:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: the character generator pattern for lcd</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220781#M19191</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;Firstly, there is contradictory data given within the datasheet for the LCD module.&amp;nbsp; Section 5 specifies the Vdd range 4.5 - 5.5 volt, whereas Section 7 suggests that Vdd should be at a level of 3.0 volt.&amp;nbsp; I suspect that the first voltage range is the correct one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I notice that you are not feeding Vdd from a regulated source, but are using a&amp;nbsp; resistive voltage divider supplied from 12 volt, which&amp;nbsp;effectively gives a 600 ohm source resistance.&amp;nbsp; Why not feed Vdd from the same 5 volt (regulated?) source that supplies the MCU device?&amp;nbsp; If the V0 level at pin 3 alters, possibly because of poor regulation at pin 2, this will affect the display contrast, and may well be part of the problem, should the display current draw fluctuate.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you are doing at pins 15 and 16 of the display totally escapes me.&amp;nbsp; Apparently these pins provide current to the display backlight, with pin 16 being designated&amp;nbsp;LED- (assuming the datasheet is correct).&amp;nbsp;&amp;nbsp;I would expect this pin should &lt;U&gt;not&lt;/U&gt; have +12 volt connected via a series resistor.&amp;nbsp; I would also expect that the LED+ pin should not be connected to the V0 pin, via a resistor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that you need to clean up these hardware issues before investigating any coding problems.&amp;nbsp; Normally, the V0 pin would be supplied via a preset&amp;nbsp;potentiometer, or some other variable voltage source, to provide for contrast adjustment.&amp;nbsp; The V0 level is usually quite sensitive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your later post, you mention the presence of a relay, which is not apparent within your schematic.&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 18:54:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220781#M19191</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-09-06T18:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220782#M19192</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;Just recieved a delivery of Winstar WH1602D today!&lt;/P&gt;&lt;P&gt;Now that you say there is a relay involved, this vitually guarantees that you problem is noise like I hinted at before.&lt;/P&gt;&lt;P&gt;Presumably your back light glows so you have the backlight connected with the correct polarity.&lt;/P&gt;&lt;P&gt;Quite why you have the LCD power coming from a voltage divider off the 12v rather than connnected to the MPU's power supply is beyond me. I have found that the best protection from noise after you have done your best to eliminate it with snubbers and the like is to control the R/W line of the LCD so it is only write as long as it needs to be (a very short time).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 19:28:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220782#M19192</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2010-09-06T19:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: the character generator pattern for lcd</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220783#M19193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there is potential divider n/w at pin2 and not the microcontroller power supply pin because i didnt want the backlight of the lcd to glow when microcontroller is off.so through resistive n/w i fixed the supply voltage at a particular value which could give me required contrast.pin 16 is power supply for backlight,hence +12v suppply.i,m attaching the modified snapshot of the ckt diagram containing the relay part.i also noticed that the problem persists even if i remove the lcd .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 19:56:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220783#M19193</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-06T19:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220784#M19194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as far as pin 15 is concerned ,i followed the following pdf.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 20:02:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220784#M19194</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-06T20:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220785#M19195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do feel free to suggest any hardware modifications which may solve this problem.i'll try to apply and check if that works.in the meantime i'll try to give the powersupply to pin 2 of lcd from microcontroller power supply pin .i''l do that and let u know if that works.do u think the code is ok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 20:21:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220785#M19195</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-06T20:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220786#M19196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When reading from the LCD display memory is not required, it is a very common practice to permanently tie the R/W line low for write only, primarily to&amp;nbsp;minimize the number of interface connections required.&amp;nbsp; My understanding is that only the Enable line is edge-sensitive, and therefore likely to be susceptable to noise impulses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the schematic snippet of the OP does not show the relay driver&amp;nbsp;circuit, we cannot be sure&amp;nbsp;whether a commutating diode has been used across the relay coil.&amp;nbsp; This method does slow the release of the relay, but should minimize any voltage impulse on the release of the relay,&amp;nbsp;provided the diode is fast enough, and provided the relay supply line has sufficient bulk capacitance to absorb the return current pulse.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps the contact side of the relay could be more problematic if being used to switch a heavy inductive load, but I suspect this is probably not an issue for the application in question.&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 20:29:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220786#M19196</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-09-06T20:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220787#M19197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi MAC,&lt;/P&gt;&lt;P&gt;i have attacthed a modified ckt diagram with relay n/w in one of &amp;nbsp;my later posts.i have used commutating diodes.the problem i'm facing is not the correct "switching off"of the relay .the problem is my lcd abruptly stop displaying after a variable no. button presses and the relay makes a sound of switching off but still has some dc on its pin .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 20:43:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220787#M19197</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-06T20:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220788#M19198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;nova0809 wrote:&lt;BR /&gt;&lt;P&gt;as far as pin 15 is concerned ,i followed the following pdf.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The description of pins 15 and 16 within the document&amp;nbsp;are so contradictory, it is useless.&amp;nbsp; I suspect it is a translation problem from Chinese.&amp;nbsp; I&amp;nbsp;assume that pins 15 and 16 operate independently from the remainder of the interface.&amp;nbsp; Using a series resistor to limit the current through the backlight to a few mA, you can experimentally determine what polarity of the 12 volt source&amp;nbsp;is required - the backlight will glow when the polarity is correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to turn off the backlight when Vdd is removed, I suggest that you switch the backlight using a simple transistor or MOSFET switch.&amp;nbsp; If the backlight pins are floating, you could use a NPN or N-channel switch inserted between cathode and ground.&amp;nbsp; The base (or gate) would be switched by the Vdd line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also notice that the Vdd limits specified within&amp;nbsp;the referenced&amp;nbsp;document are tighter than the previous datasheet.&amp;nbsp; Even more reason that Vdd should be regulated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With regard to your relay driver circuit, as shown in the most recent schematic, I would suggest a change.&amp;nbsp; The 100uF bulk capacitor, currently connected across the relay coil, would be better connected between the top of the relay coil and ground.&amp;nbsp; This will then&amp;nbsp;absorb the return current surge when the commutating diode across the relay coil conducts, and will reduce the sluggishness of the relay turn-off due to the capacitor.&amp;nbsp; With the current arrangement there will also be an unnecesssary current surge through the transistor switch during turn-on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another likely issue with the relay driver is that you currently provide only about 0.4 mA of base drive current to the BD139.&amp;nbsp; In&amp;nbsp;the worst case this may provide a maximum collector current in the vicinity of 10mA, which maybe insufficient for the relay.&amp;nbsp; In this instance, I might consider a resistor value of 2k2, or maybe even lower.&amp;nbsp; The port pin should use the high current drive setting.&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 21:38:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220788#M19198</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-09-06T21:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220789#M19199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;nova0809 wrote:&lt;BR /&gt;&lt;P&gt;do feel free to suggest any hardware modifications which may solve this problem.i'll try to apply and check if that works.in the meantime i'll try to give the powersupply to pin 2 of lcd from microcontroller power supply pin .i''l do that and let u know if that works.&lt;FONT color="#ff0000"&gt;do u think the code is ok&lt;/FONT&gt;.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;With your present code attachment, I don't think it is possible to give any help.&amp;nbsp; Each section of code (sub-routine) seems to be devoid of any comments about its purpose, and the manner in which the registers provide entry and exit data to the code is unclear.&amp;nbsp; It is even difficult to see at a glance where each sub-routine begins and ends.&amp;nbsp; In many instances, there are no comments&amp;nbsp;given about the specific initialisation of the various peripheral registers.&amp;nbsp; Debugging the code would be a nightmare IMHO.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Using long sequences of NOPs to generate delays is probably inefficient, but also makes the code more difficult to follow.&amp;nbsp; If you must use this method, it is better to create macros for different delay amounts, and&amp;nbsp;call the macros within your sub-routines.&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;I you wish further comment about your specific LCD problem, I suggest that you limit the scope&amp;nbsp;by attaching a code snippet that is relevant to&amp;nbsp;the problem.&amp;nbsp; I might suggest the routine that communicates with the display module, the code that provides the initialisation sequence for the display, and the code that shows the sequence of the volume data sent to the display.&amp;nbsp;&amp;nbsp;Many more comments as to your intent might be added.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;Regards,&lt;BR /&gt;Mac&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Sep 2010 22:20:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220789#M19199</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-09-06T22:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220790#M19200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;bigmac wrote:&lt;BR /&gt;&lt;P&gt;&lt;EM&gt;Hello Peg,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When reading from the LCD display memory is not required, it is a very common practice to permanently tie the R/W line low for write only, primarily to&amp;nbsp;minimize the number of interface connections required.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, and if the topic of discussion was the how a HD44780 based LCD character module is typically interfaced (or the bleeding obvious) then this comment may even be relevant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;My understanding is that only the Enable line is edge-sensitive, and therefore likely to be susceptible to noise impulses.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;Your understanding and what actually happens in a real world circuit is not necessarily one and the same!&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Since the schematic snippet of the OP does not show the relay driver&amp;nbsp;circuit, we cannot be sure&amp;nbsp;whether a commutating diode has been used across the relay coil.&amp;nbsp; This method does slow the release of the relay, but should minimize any voltage impulse on the release of the relay,&amp;nbsp;provided the diode is fast enough, and provided the relay supply line has sufficient bulk capacitance to absorb the return current pulse.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really!?&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Perhaps the contact side of the relay could be more problematic if being used to switch a heavy inductive load, but I suspect this is probably not an issue for the application in question.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well bugger me!&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Regards,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Mac&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 05:32:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220790#M19200</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2010-09-07T05:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220791#M19201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The more information you add the more it reinforces my theory that your problem is with electrical noise corrupting the LCD module. I have seen this many times in the past and have dealt with it just in the last week with a 9S08GT8A controlled Winstar 1602D, very similar to yours.&lt;/P&gt;&lt;P&gt;You have variously described the problem as "goes blank" and "stop displaying". Which is it? Or is it both?&lt;/P&gt;&lt;P&gt;Can you temporarily remove the relay from circuit and remove any other potential noise sources and still try it?&lt;/P&gt;&lt;P&gt;Does it sometimes work correctly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my experience, once the module becomes corrupted by noise, this is what happens:&lt;/P&gt;&lt;P&gt;Subsequent writes still mostly display something on the screen but not as it should be.&lt;/P&gt;&lt;P&gt;Sometimes it is the correct character but in the wrong location&lt;/P&gt;&lt;P&gt;Mostly it is random characters written anywhere. (Semicolons seem to be popular here)&lt;/P&gt;&lt;P&gt;Usually this comes to a halt after some time and the display is frozen with whatever was displayed last.&lt;/P&gt;&lt;P&gt;Only occasionally will the display actually go completely blank&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you introduce a method where you can reinitialise the display with out resetting your whole programme then usually (but not always) you can restore correct operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The technique with the R/W line I described previously does a very good job or "covering up" this issue.&lt;/P&gt;&lt;P&gt;What I have done is a lot of other things to mitigate the noise actually occurring or affecting the circuit then added this afterwards as a belts and braces approach. However this takes time. So that is why I was suggesting to simply do the R/W change on its own and see if you notice a change as it is very simple/quick to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not tried to analyse your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Sep 2010 06:23:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220791#M19201</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2010-09-07T06:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220792#M19202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp; My project is based on simple NEC protocol based remote control sensing. There is a separate remote control decoding section. There are two modes of operation for which I am CD4052B as switching IC. I am using PT2258 IC for volume operation.&lt;/P&gt;&lt;P&gt;As you can easily guess the MCU have to go to the repeat mode of operation when one is&lt;/P&gt;&lt;P&gt;pressing volume UP/DN key . So there are by pressing the key single time it will go into the relevant sub-routine once &amp;amp; for holding the key for long time it will go repeatedly executing the routine until any limit is reached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see the code is written is assembly level so is a bit lengthy. To make it easy I am separating it into several text files. It will make easier for you to encounter my problem.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;One thing that I will like to add , by reading all of your comments I had just disconnected the lcd module &amp;amp; checked if my code section was OK. But the MCU is still resetting.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;I don’t kno y???&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not attaching the remote control decoding section. If any one wants then I will attach it as it is very lengthy. I am also requesting for any suggestion to simplify my remote control decoding section. At presently I am using the internal CLK of MC9S08SE8 is&lt;/P&gt;&lt;P&gt;5MHZ &amp;amp; creating several loops to match the delaying pulse of NEC protocol &amp;amp; it’s a very lengthy process. &lt;STRONG&gt;&lt;EM&gt;Can any one suggest any easier process by using the MC9S08SE8 MCU?????&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 12:24:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220792#M19202</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-08T12:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220793#M19203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;these are the remaining code sections.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 12:27:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220793#M19203</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-08T12:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: LCD turns off after displaying some garbage value</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220794#M19204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; I had worked out with your suggestions on this topic but the problem still&lt;/P&gt;&lt;P&gt;persists. I think the problem is in the code section. Some stack issue or like that.&lt;/P&gt;&lt;P&gt;Please suggest &lt;STRONG&gt;&lt;EM&gt;ASAP&lt;/EM&gt;&lt;/STRONG&gt; as I don’t have much time to submit my project.&lt;/P&gt;&lt;P&gt;The points that I covered are as below…..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Why not feed Vdd from the same 5 volt (regulated?)&lt;/P&gt;&lt;P&gt;2) Like is to control the R/W line of the LCD so it is only write as long as it needs to be (a very short time).&lt;/P&gt;&lt;P&gt;3) If you need to turn off the backlight when Vdd is removed, I suggest that you switch the backlight using a simple transistor or MOSFET switch.&amp;nbsp; If the backlight pins are floating, you could use a NPN or N-channel switch inserted between cathode and ground.&amp;nbsp; The base (or gate) would be switched by the Vdd line.&lt;/P&gt;&lt;P&gt;4) The 100uF bulk capacitor, currently connected across the relay coil, would be better connected between the top of the relay coil and ground.&amp;nbsp; This will then&amp;nbsp;absorb the return current surge when the commutating diode across the relay coil conducts, and will reduce the sluggishness of the relay turn-off due to the capacitor.&amp;nbsp; With the current arrangement there will also be an unnecessary current surge through the transistor switch during turn-on&lt;/P&gt;&lt;P&gt;&amp;nbsp;5) Another likely issue with the relay driver is that you currently provide only about 0.4 mA of base drive current to the BD139.&amp;nbsp; In&amp;nbsp;the worst case this may provide a maximum collector current in the vicinity of 10mA, which maybe insufficient for the relay.&amp;nbsp; In this instance, I might consider a resistor value of 2k2, or maybe even lower.&amp;nbsp; The port pin should use the high current drive setting.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 14:23:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/lcd-turns-off-after-displaying-some-garbage-value/m-p/220794#M19204</guid>
      <dc:creator>nova0809</dc:creator>
      <dc:date>2010-09-08T14:23:33Z</dc:date>
    </item>
  </channel>
</rss>

