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

Moderators: Ajay Bhargav, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph, ExperimenterUK, DavesGarage
Author Post
Nibs
Fri Jun 12 2009, 07:57AM
 User Offline
Registered Member #18878
Joined: Thu May 28 2009, 11:19AM

Posts: 2
Thanked 0 times in 0 posts
help needed newbie question
following lcd tutorial but don't know where info comes from
code asm
lcd_ data equ P2
lcd_d7 equ P2.7
lcd_rs equ P1.0

after the equ where is it refering to how do i get that info
what does P2,P2.7,P1.0,P1.1,P1.2 mean



Back to top

gopi
Fri Jun 12 2009, 11:49AM
 User Offline
Registered Member #9289
Joined: Fri Jul 25 2008, 05:04AM

Posts: 192
Thanked 12 times in 12 posts
It says that lcd_data is equal to P2. i.e., it is very similar as if like within 'C' language " #define pi 3.14".

Never cry in front of others...........
Don't give them the pleasure of knowing how much they hurt you.
Back to top


This post has been thanked 1 time
 Nibs 
ExperimenterUK
Fri Jun 12 2009, 01:06PM
 User Offline
Registered Member #9602
Joined: Tue Aug 05 2008, 04:15PM

Posts: 1248
Thanked 199 times in 198 posts
Nibs wrote ...

after the equ where is it refering to how do i get that info
what does P2,P2.7,P1.0,P1.1,P1.2 mean


In this case P2 stands for Port 2.
P2.7 means pin 7 of port 2.

The assembler programs already "knows" that P2 means port 2 because some simple
definitions are built in.
Many similar definitions are built into assemblers, you should be able to find them listed in
header files supplied with your program.
Back to top


This post has been thanked 1 time
 Nibs 
Ajay Bhargav
Fri Jun 12 2009, 02:59PM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 7484
Thanked 1324 times in 1248 posts
Nibs, which part of tutorial you feel hard to understand, Do tell me i will improve it.

I think if i add a circuit in that place that will help is it? do give me your feedback.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top

Nibs
Sat Jun 13 2009, 09:55PM
 User Offline
Registered Member #18878
Joined: Thu May 28 2009, 11:19AM

Posts: 2
Thanked 0 times in 0 posts
newbie i had problem understanding the first bit of asm code didn't realise it was defining it to mcu port and portbit the part after equ p2.7 or equ P1.0,P1.2 haden't seen anything defined like that ,only seen lcd_rs equ portD,1 the tutorial helped me so much still a long way to go playing with cursor movement would like to get to display both lines and just stop not loop:bye
LCD_data equ P2 ;LCD Data port
LCD_D7 equ P2.7 ;LCD D7/Busy Flag
LCD_rs equ P1.0 ;LCD Register Select
LCD_rw equ P1.1 ;LCD Read/Write
LCD_en equ P1.2 ;LCD Enable

Back to top

Ajay Bhargav
Tue Jun 16 2009, 06:48AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 7484
Thanked 1324 times in 1248 posts
Nibs, is there anything you find difficult in LCD tutorial? if yes then please do tell me so that i can modify it to make it better to understand.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top

 

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