Searching \ for '[PIC]: Sending a whole string to a LCD?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/lcd/pic.htm?key=lcd
Search entire site for: 'Sending a whole string to a LCD?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Sending a whole string to a LCD?'
2001\07\05@200848 by Thomas N

picon face
Hi everyone,
I read the Ap Note AN587 (Interface to a LCD) from Microchip and it shows
two ways to send character to the LCD:

1.  The hard way
       movlw   'M'
       call    send_char
       movlw   'i'
       call    send_char
       ........

2.  The easy way
       call    table
       .....
       call    send_char
       .....
table
       .....
       retlw   'M'
       retlw   'i'
       ......

Question:  Is there an easier way?  Is it possible for me to type to whole
string, then make ONE call to certain routine, and the whole string is
displayed on the LCD?

Please help!
Thomas
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu


2001\07\05@205105 by Jose S. Samonte Jr.

picon face
I think that you can use:

DT 'HELLO'

...

Thomas N <.....thomasn101KILLspamspam@spam@HOTMAIL.COM> wrote:
Hi everyone,
I read the Ap Note AN587 (Interface to a LCD) from Microchip and it shows
two ways to send character to the LCD:

1.  The hard way
       movlw   'M'
       call    send_char
       movlw   'i'
       call    send_char
       ........

2.  The easy way
       call    table
       .....
       call    send_char
       .....
table
       .....
       retlw   'M'
       retlw   'i'
       ......

Question:  Is there an easier way?  Is it possible for me to type to whole
string, then make ONE call to certain routine, and the whole string is
displayed on the LCD?

Please help!
Thomas
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu


2001\07\05@205734 by Jose S. Samonte Jr.

picon face
Made a mistake, sorry... :-(

I think it should be like this:

TABLE  addwf PCL,w
      DT "HELLO"
     

...


Thomas N <EraseMEthomasn101spam_OUTspamTakeThisOuTHOTMAIL.COM> wrote:
Hi everyone,
I read the Ap Note AN587 (Interface to a LCD) from Microchip and it shows
two ways to send character to the LCD:

1.  The hard way
       movlw   'M'
       call    send_char
       movlw   'i'
       call    send_char
       ........

2.  The easy way
       call    table
       .....
       call    send_char
       .....
table
       .....
       retlw   'M'
       retlw   'i'
       ......

Question:  Is there an easier way?  Is it possible for me to type to whole
string, then make ONE call to certain routine, and the whole string is
displayed on the LCD?

Please help!
Thomas
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
@spam@piclist-unsubscribe-requestKILLspamspammitvma.mit.edu


2001\07\05@210817 by Jose S. Samonte Jr.

picon face
I can't remember if I got right, but I think that 'DT' is a short form of a
lot of RETLW instructions in a line so

DT    "HELLO"

is equivalent to

RETLW    'H'
RETLW    'E'
RETLW    'L'
RETLW    'L'
RETLW    'O'

...

Thomas N <KILLspamthomasn101KILLspamspamHOTMAIL.COM> wrote:
Hi everyone,
I read the Ap Note AN587 (Interface to a LCD) from Microchip and it shows
two ways to send character to the LCD:

1.  The hard way
       movlw   'M'
       call    send_char
       movlw   'i'
       call    send_char
       ........

2.  The easy way
       call    table
       .....
       call    send_char
       .....
table
       .....
       retlw   'M'
       retlw   'i'
       ......

Question:  Is there an easier way?  Is it possible for me to type to whole
string, then make ONE call to certain routine, and the whole string is
displayed on the LCD?

Please help!
Thomas
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamBeGonespammitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
TakeThisOuTpiclist-unsubscribe-requestEraseMEspamspam_OUTmitvma.mit.edu


2001\07\06@005711 by Jose S. Samonte Jr.

picon face
Or am I wrong, peeps?... :-(


"Jose S. Samonte Jr." <RemoveMEdyoweespamTakeThisOuTUSA.NET> wrote:
I can't remember if I got right, but I think that 'DT' is a short form of a
lot of RETLW instructions in a line so

DT    "HELLO"

is equivalent to

RETLW    'H'
RETLW    'E'
RETLW    'L'
RETLW    'L'
RETLW    'O'

..

Thomas N <thomasn101EraseMEspam.....HOTMAIL.COM> wrote:
Hi everyone,
I read the Ap Note AN587 (Interface to a LCD) from Microchip and it shows
two ways to send character to the LCD:

1.  The hard way
       movlw   'M'
       call    send_char
       movlw   'i'
       call    send_char
       ........

2.  The easy way
       call    table
       .....
       call    send_char
       .....
table
       .....
       retlw   'M'
       retlw   'i'
       ......

Question:  Is there an easier way?  Is it possible for me to type to whole
string, then make ONE call to certain routine, and the whole string is
displayed on the LCD?

Please help!
Thomas
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspammitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamEraseMEmitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspam_OUTspamKILLspammitvma.mit.edu

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\07\06@023943 by Quentin

flavicon
face
Yes, Jose. You are correct. :)

For Thomas, I would add:

DT    "HELLO",0

is equivalent to

RETLW    'H'
RETLW    'E'
RETLW    'L'
RETLW    'L'
RETLW    'O'
RETLW    0

You get each character using table lookup (Microchip app notes and
piclist.com for examples), send it to the LCD (also app notes and
piclist.com), get the next one and so on until you get the RETLW 0. Then
stop.

Quentin

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\07\06@040742 by Jose S. Samonte Jr.

picon face
Thank you so much!!! :-)
A beginner like me, really so much APPRECIATES that!!!

Quentin <RemoveMEqscTakeThisOuTspamspamICON.CO.ZA> wrote:
Yes, Jose. You are correct. :)

For Thomas, I would add:

DT    "HELLO",0

is equivalent to

RETLW    'H'
RETLW    'E'
RETLW    'L'
RETLW    'L'
RETLW    'O'
RETLW    0

You get each character using table lookup (Microchip app notes and
piclist.com for examples), send it to the LCD (also app notes and
piclist.com), get the next one and so on until you get the RETLW 0. Then
stop.

Quentin

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\07\06@115025 by thomas

picon face
Thank you Jose and Quentin for your advice.  I will try these code this
weekend to see if they works!
Thomas
{Original Message removed}

2001\07\06@121824 by Jose S. Samonte Jr.

picon face
Glad to be of help, eventhough I'm also a beginner...
Good luck!!!

thomas <EraseMEthomasn101spamspamspamBeGoneHOTMAIL.COM> wrote:
Thank you Jose and Quentin for your advice.  I will try these code this
weekend to see if they works!
Thomas
{Original Message removed}

2001\07\07@061023 by Peter L. Peres

picon face
; variable declarations
 CBLOCK <somwhere>
 Fvector_index
 ENDC

; Subroutine to return 1 string char
Sstring_lookup:
 movf  Fvector_index, w
 incf  Fvector_index, f
 movwf PC

; String(s)
Shello_world:
 dt    "Hello, World!\n",0     ; the ending zero is important!

; Main code

send_hellow:
 ; ... more code here
 movlw Shello_world
Sputs:
 movwf Fvector_index

send_again:
 call  Sstring_lookup
 iorlw 0                       ; set flags
 btfsc STAUS,Z                 ; last one ? (0)
 goto  done                    ; jes, jump
 call  send_char
 goto  send_again

done:

This is for 12C pics and code in page 0 on 16C. Usually the code at
send_hellow is called puts, done is replaced by a retlw, and is entered
with the address of the string in W. This is just a convention, do as you
please.

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...