PDA

View Full Version : what is the bit instruction to get to LCD line2



EDWARD
- 20th May 2005, 07:31
How do i get the cursor down to the 2nd line?

i have a 2 line lcd that im using in 4 bit mode. i cant seem to diplay any data on the lower half of the screen (line 2).

i have looked all over but can only find the home command to be the closest thing.( which takes the cursor to line 1 cell 1)

i cant use any of the lcdout feature cause my pcb is wired weird. I need the actually byte command sent to the instruction registers on the LCD.


have i over looked something? because if i just keep displaying on the top line it doesnt "Wrap" the text down to line 2.

BTW, i got almost all of my project done, just wanted to say thanks for all the help so far.

Acetronics2
- 20th May 2005, 08:15
The Manual !!!!

mister_e
- 20th May 2005, 16:37
with LCDOUT $FE,$C0 so i guess your routine must send only $C0 to the LCD... OR the same way when you do the LCD initialisation at start-up time.

Dwayne
- 20th May 2005, 19:57
Hello Edward,

If I am correct, were you not working on your own LCD routine??

If so, Treat it exactly like the LCDout....

Send a $FE, then a $C0 (if you have a routine) like the one I posted...
If not, turn on your Command/Data pin to Command, and write a $CO.

Dwayne

EDWARD
- 21st May 2005, 02:47
i havent tried it yet but i think you are correct. yes dwayne i im doing "custom" lcd routines, great memory my man.

thats why i cant use the lcdout function.

what manual? i have the hd44780 commands sheet, i was having trouble interprting what the command actualy did, i also went to like 5 different webpages i found listed through out this forum to try and find a laymans description of what setting the dd reisters and stuff actually does.

http://www.geocities.com/SiliconValley/Circuit/8882/lcd/commands.htm
http://home.iae.nl/users/pouweha/lcd/lcd.shtml
http://www.perfectlcd.com/FAQ_LCD_tech_brief_initializing_character_module.h tm

so dont get so mad at people Ace.

Melanie
- 21st May 2005, 03:06
>> what manual?

All the valid LCD I/O commands (certainly the cursor line-locating commands) are in the PICBasic manual that came with your PBP software (also available from the MeLabs website).

Dwayne
- 23rd May 2005, 05:26
Hello Edward,

Edward>>i havent tried it yet but i think you are correct. yes dwayne i im doing "custom" lcd routines, great memory my man.

thats why i cant use the lcdout function.

what manual? i have the hd44780 commands sheet, i was having trouble interprting what the command actualy did, i also went to like 5 different webpages i found listed through out this forum to try and find a laymans description of what setting the dd reisters and stuff actually does<<

I understand why it can be very confusing... Since you are not using the LCDout, you have no "Manual" to go by... Thus, it CAN be very confusing. But!!! the LCD commands (which you probably didn't know) are almost exactly like the LCDout commands in the PBP manual that Melabs puts out. The only thing that will be different, is if you write to the interal memory, or something out of the ordinary. But simple LCDout commands will work without the LCDout... just make sure you have the Data/Command switch in the right place.... Most of the time it is in Data mode... So that you will write DATA out to your LCD for display. The only time it is in Command mode would be switching LCD lines, or Clearing the LCD display with a Dec 1. (Dec 13 will turn on and clear your display). I also understand on the interpreting the commands!...If you want, I have a site someplace that does a great job of telling all the commands of the LCD...in Command mode. I will look it up, if you would like me to, and give you the URL.

Dwayne (congradulations on your project.)

Acetronics2
- 23rd May 2005, 07:54
Hi, Edward

I'm sorry for my mistake : your question was nos so clear, as it was not a PBP Background ... I always think we are on a PBP Forum ...

Yes, I become a bit angry these times : reading here pages and pages of code with the same questions : where is my error or ( can you ) do it for me ??? or ground level Questions showing the manual ( humour ...) has never been opened, is RATHER BORING.

Regards
Alain

BigWumpus
- 24th May 2005, 11:19
I think you have a display with 2 lines of 16 characters.
On the backside of the display you can find only one drop of black plastic.

The Controller (under the plastic) can NOT manage these display in the desired way. The display ist broken into 4 parts of 8 characters.

look at this:
-----
;Display clear
Disp_Clr:
LCDOUT $FE,1:Disp_Zeile2=0:Return
;goto the second (right) part of a line
Disp_Tab:
LCDOUT $FE
IF Disp_Zeile2 THEN
LCDOUT $C8
ELSE
LCDOUT $88
ENDIF
return
;goto the second line
Disp_LF:
LCDOUT $FE,$C0:Disp_Zeile2=1
Return
-----