lcd turns off after displaying some garbage value

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

lcd turns off after displaying some garbage value

ソリューションへジャンプ
17,904件の閲覧回数
nova0809
Contributor III
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.


plz help if somebody has any idea

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.

i'm attaching the circuit diagram of lcd interface .i2c communication is used between pt2258 volume controller and microcontroller.
ラベル(1)
1 解決策
15,017件の閲覧回数
nova0809
Contributor III

Hello all,

               the problem is finally solved.there was a small problem with the detect repeat pulse subroutine in my code.i was totally ignoring it .there was no problem with the circuit.there was no noise issue.it was a small n  simple thing that was being ignored.all ur posts helped me learn alot of things.so im highly grateful to u.

  

thank u all ,

元の投稿で解決策を見る

0 件の賞賛
返信
47 返答(返信)
1,244件の閲覧回数
nova0809
Contributor III

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.

0 件の賞賛
返信
1,244件の閲覧回数
bigmac
Specialist III

Hello Amit,


nova0809 wrote:

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.


With your present code attachment, I don't think it is possible to give any help.  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.  It is even difficult to see at a glance where each sub-routine begins and ends.  In many instances, there are no comments given about the specific initialisation of the various peripheral registers.  Debugging the code would be a nightmare IMHO.
 
Using long sequences of NOPs to generate delays is probably inefficient, but also makes the code more difficult to follow.  If you must use this method, it is better to create macros for different delay amounts, and call the macros within your sub-routines. 
 
I you wish further comment about your specific LCD problem, I suggest that you limit the scope by attaching a code snippet that is relevant to the problem.  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.  Many more comments as to your intent might be added.
 
Regards,
Mac

0 件の賞賛
返信
1,244件の閲覧回数
nova0809
Contributor III
0 件の賞賛
返信
1,244件の閲覧回数
bigmac
Specialist III

Hello,

 

Firstly, there is contradictory data given within the datasheet for the LCD module.  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.  I suspect that the first voltage range is the correct one.

 

However, I notice that you are not feeding Vdd from a regulated source, but are using a  resistive voltage divider supplied from 12 volt, which effectively gives a 600 ohm source resistance.  Why not feed Vdd from the same 5 volt (regulated?) source that supplies the MCU device?  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.

 

What you are doing at pins 15 and 16 of the display totally escapes me.  Apparently these pins provide current to the display backlight, with pin 16 being designated LED- (assuming the datasheet is correct).  I would expect this pin should not have +12 volt connected via a series resistor.  I would also expect that the LED+ pin should not be connected to the V0 pin, via a resistor.

 

I think that you need to clean up these hardware issues before investigating any coding problems.  Normally, the V0 pin would be supplied via a preset potentiometer, or some other variable voltage source, to provide for contrast adjustment.  The V0 level is usually quite sensitive.

 

In your later post, you mention the presence of a relay, which is not apparent within your schematic.

 

Regards,

Mac

 

0 件の賞賛
返信
1,244件の閲覧回数
nova0809
Contributor III

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 .

0 件の賞賛
返信
1,244件の閲覧回数
peg
Senior Contributor IV

Hello,

 

Or another guess is noise corrupting the setup registers.

I have just had this problem a week ago.

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.

 

0 件の賞賛
返信