free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Go to page  [1] 2 3
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
anee
Mon Apr 07 2008, 03:56AM
 User Offline
Registered Member #3763
Joined: Thu Aug 30 2007, 03:56AM

Posts: 17
Thanked 0 times in 0 posts
hey..me havin a similar prod as yun..my lcd displayed da required msg a couple of times...but thereafter its just da bars...i adjusted da contrast,tried programmin da chip again...but nothin...n i checked da voltages at da crystal input..they r fine..so da controller is ok...any suggestions...plz...this is urgent...i need to submit da proj in 3 days..

thanks in advance


Back to top


geetikagupta
Mon Apr 07 2008, 10:47AM
 User Offline
Registered Member #6257
Joined: Sun Feb 24 2008, 11:40PM

Posts: 34
Thanked 4 times in 4 posts
well, im using d following assembly language code in my project(using AT89S52),
if dis is wat u require, then hav a look, its working fine in my project




;LCD PORT DEFINITIONS
DATAPORT EQU P0
EN EQU P1.2
RW EQU P1.1
RS EQU P1.0
D7 EQU P0.7

ORG 0000h
LJMP MAIN


MAIN:

MOV DATAPORT,#0FFH
ACALL LCD216 ;LCD INITIALISATION
ACALL LCDCLR
ACALL RETHOME
ACALL DONCOFF ;LCD INITIALISED
ACALL LCDCLR
ACALL FCBFL
ACALL COMMAND
MOV DPTR,#TABLE15
ACALL WRITE
ACALL FCBSL
ACALL COMMAND
MOV DPTR,#TABLE25
ACALL WRITE
RET

TABLE15: DB 'RESULT MODE',0 ;U MAY WRITE HERE WATEVER U WAN2 DISPLAY
TABLE25: DB 'STARTING...',0








;LCD ROUTINES

CHKBUSY: ;Checks for the status of the LCD
SETB D7
CLR RS
SETB RW

LOOP:
CLR EN
SETB EN
JB D7,LOOP
RET

DISPLAY:
ACALL CHKBUSY
MOV DATAPORT,A
SETB RS
CLR RW
SETB EN
CLR EN
RET

COMMAND:
ACALL CHKBUSY
MOV DATAPORT,A
CLR RS
CLR RW
SETB EN
CLR EN
RET

LCD216:
MOV A,#38H ;FORCES 2 X 16 MATRIX
ACALL COMMAND
RET

LCDCLR:
MOV A,#01H
ACALL COMMAND
RET

RETHOME:
MOV A,#02H ;RETURN HOME
ACALL COMMAND
RET

DONCOFF:
MOV A,#0CH
ACALL COMMAND
RET

DONCB:
MOV A,#0FH
ACALL COMMAND
RET

FCBFL:
MOV A,#80H
ACALL COMMAND
RET

FCBSL:
MOV A,#0C0H
ACALL COMMAND
RET

WRITE:
CLR A
MOVC A,@A+DPTR
JZ BACK2
ACALL DISPLAY
INC DPTR
JMP WRITE

BACK2: RET



END


sorry for those irritating tabs n identations
Back to top



This post has been thanked 1 time
 anee 
geetikagupta
Mon Apr 07 2008, 10:54AM
 User Offline
Registered Member #6257
Joined: Sun Feb 24 2008, 11:40PM

Posts: 34
Thanked 4 times in 4 posts
waaauuu....., dis is good, no iritating tabs n identations, d windows "notepad" makers need to learn smthng frm here...
Back to top



This post has been thanked 1 time
 anee 
anee
Mon Apr 07 2008, 10:56AM
 User Offline
Registered Member #3763
Joined: Thu Aug 30 2007, 03:56AM

Posts: 17
Thanked 0 times in 0 posts
hey...thanks...i don think anythin's wrong wid my code..but still...will try usin urs n check...thanks again..n yes...no tabs..:)...i was wonderin at tabs u talkin abt...
Back to top


pdi33
Mon Apr 07 2008, 11:57AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 655
Thanked 144 times in 140 posts
well, either ur code has some problem or ur hardware. so try sending ur circuit and/or ur code and maybe we can find the bug which is bugging u

* inspired to develop,developing to inspire *
Back to top



This post has been thanked 1 time
 anee 
pdi33
Mon Apr 07 2008, 12:09PM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 655
Thanked 144 times in 140 posts
well i saw ur code from the other forum topic. looks fine to me. can u send the circuit so that we can have an idea about how it is wired?.check the following:
1. power supply. preferably connect a 0.1uF decoupling cap across vcc and gnd and as close to microcontroller as possible.
2. connct two 33pF caps across the xtal and gnd.

* inspired to develop,developing to inspire *
Back to top



This post has been thanked 1 time
 anee 
sashijoseph
Mon Apr 07 2008, 07:23PM

 User Offline
Registered Member #5870
Joined: Mon Feb 04 2008, 06:26PM

Posts: 552
Thanked 124 times in 117 posts
And have you hooked up a proper power-on reset ckt?
Try checking loose connections to the LCD.

Let there be music........
Back to top



This post has been thanked 1 time
 anee 
Amit Radha
Mon Apr 07 2008, 07:47PM
 User Offline
Registered Member #4203
Joined: Sun Sep 30 2007, 04:52AM

Posts: 205
Thanked 2 times in 2 posts
To add onto what pdi33 said, i suggest u use 0.1uF tantalum caps. They make a world of a change.
Check the supply o/p on the board depending on how well ur board is ul come to know how noisy ur gnd or vcc is. A friend of mine had a terrible time cleaning his ground
I was lucky dint face that problem.

Dont worry ul get amazing advice over here, have faith... I have learnt alot from this forum.

Good luck
Back to top



This post has been thanked 1 time
 anee 
sashijoseph
Mon Apr 07 2008, 08:41PM

 User Offline
Registered Member #5870
Joined: Mon Feb 04 2008, 06:26PM

Posts: 552
Thanked 124 times in 117 posts
Oops.....when you can,avoid tantalums like plague.They are prone to leakage and when compared to ceramics are fairly 'slow'.They do have a speed advantage over hefty electrolytics but when choosing between 0.1uF ceramic or tant' always prefer ceramics.Ceramics also have a lower self inductance and are non-polar whereas tants' are essentially polarized(correct me if I'm wrong) and may lead to mishaps when reverse connected.They do have a size advantage over electrolytics though.
Amit..where did you get this info yaar?

Let there be music........
Back to top



This post has been thanked 1 time
 anee 
anee
Tue Apr 08 2008, 03:58AM
 User Offline
Registered Member #3763
Joined: Thu Aug 30 2007, 03:56AM

Posts: 17
Thanked 0 times in 0 posts
thanks all...hey pdi33...my hardware's pretty simple...lcd on p1 n da 3 control signals from p3.0,3.1,3.2...i forgot abt da decoup capa completely...is it dat imp...will add it n try again today...n i m average at solderin,but shashijoseph i checked da continuity on each pin..should i do anythin else...n where can i get good moderately priced dev boards...atleast i won't hav to worry abt da solderin then...
thanks again...
Back to top


Go to page  [1] 2 3  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems