More LCD Questions
Archiver
Posts: 46,084
Hi all, again,
Just wanted to know how to display a variable, such as the number I get
from my sonar module on to my LCD unit.
BS2 controller HD44780 compatible LCD.
Thanks
-Mike
[noparse][[/noparse]Non-text portions of this message have been removed]
Just wanted to know how to display a variable, such as the number I get
from my sonar module on to my LCD unit.
BS2 controller HD44780 compatible LCD.
Thanks
-Mike
[noparse][[/noparse]Non-text portions of this message have been removed]
Comments
Jon at parallax will have a few pointers, but also have a look at my page:
http://www.lennard.net.nz/electronics/lcd.html
My simple Datalogger on another page also has code in it that does what you
are after.
Cheers,
Ben.
> From: "Mike Dillon" <laxboy687@e...>
> Reply-To: basicstamps@yahoogroups.com
> Date: Sun, 30 Mar 2003 21:09:27 -0500
> To: <basicstamps@yahoogroups.com>
> Subject: [noparse][[/noparse]basicstamps] More LCD Questions
>
> Hi all, again,
> Just wanted to know how to display a variable, such as the number I get
> from my sonar module on to my LCD unit.
> BS2 controller HD44780 compatible LCD.
> Thanks
>
> -Mike
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
> of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
-Mike
Original Message
From: Ben [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=jkhYGxWxoroBmE1LgG7ONIM93EPpo9f2tffBlvP5OM0PpcuEw7ViBZMaYxijpEObzW1ptZrBxl_BzPTQr70avosttrY]ben.lennard@p...[/url
Sent: Sunday, March 30, 2003 9:24 PM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] More LCD Questions
Hi Mike,
Jon at parallax will have a few pointers, but also have a look at my
page:
http://www.lennard.net.nz/electronics/lcd.html
My simple Datalogger on another page also has code in it that does what
you
are after.
Cheers,
Ben.
> From: "Mike Dillon" <laxboy687@e...>
> Reply-To: basicstamps@yahoogroups.com
> Date: Sun, 30 Mar 2003 21:09:27 -0500
> To: <basicstamps@yahoogroups.com>
> Subject: [noparse][[/noparse]basicstamps] More LCD Questions
>
> Hi all, again,
> Just wanted to know how to display a variable, such as the number I
get
> from my sonar module on to my LCD unit.
> BS2 controller HD44780 compatible LCD.
> Thanks
>
> -Mike
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject
and Body
> of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
I'm stil trying to get my variable to display, and I have been playing
with for a week now and I'm still getting nothing, would you mind
looking at my code? If so here it is:
'{$STAMP BS2}
A2Ddata con 12
A2Dclock con 11
A2Dcs con 10
DB0 CON 0
DB1 CON 1
DB2 CON 2
DB3 CON 3
RS CON 4
E CON 5
CLRLCD CON $01
CRSRHM CON $02
CRSRLF CON $10
CRSRRT CON $14
DISPLF CON $18
DISPRT CON $1C
DDRAM CON $80
msg data "voltage is... "
CHAR VAR BYTE
INDEX VAR BYTE
stuff var byte
result var byte
mVolts var word
Intialize:
High A2Dcs
LCDinit:
DIRL = %00111111
OUTS = %0000
HIGH 8
LCDinit1:
PAUSE 500
OUTA = %0011
PULSOUT E, 1
PAUSE 5
PULSOUT E, 1
PULSOUT E, 1
OUTA = %0010
PULSOUT E, 1
CHAR = %00101000
gosub LCDCMD
CHAR = %00001100
GOSUB LCDCMD
CHAR = %00000110
GOSUB LCDCMD
CHAR = CLRLCD
GOSUB LCDCMD
Main:
Gosub Read_0831
Mvolts = result */ $139C
Char = ClrLCD
gosub LCDCMD
CHAR = CRSRHM
GOSUB LCDCMD
For Index = 0 to 2
READ Msg + index, CHAR
GOSUB LCDWR
next
Gosub LCDln2
For Index = 0 to 15
read mvolts + index , char
gosub LCDWr
next
debug home
debug "adc....", dec result, " ",cr
debug "volts..", dec mvolts dig 3, ".", dec mvolts
pause 100
goto main
read_0831:
low a2dcs
shiftin A2Ddata, A2Dclock, MSBpost, [noparse][[/noparse]result\9]
High A2Dcs
return
LCDCMD: LOW RS
LCDWR: OUTA = CHAR.HIGHNIB
PULSOUT E, 1
OUTA = CHAR.LOWNIB
PULSOUT E, 1
HIGH RS
RETURN
LCDLN2:
Low RS
Low E
Char = 192
gosub LCDCMD
High E
High RS
return
Original Message
From: Ben [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=QcBhnqiYOEBCcH6WZeihS2dECVAuZQBCHJImHsX7sW8jhGUPyHB79ISL_Hx9zaSaNshaiG3xUMbgaLXomWbTjxDI03o]ben.lennard@p...[/url
Sent: Sunday, March 30, 2003 9:24 PM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] More LCD Questions
Hi Mike,
Jon at parallax will have a few pointers, but also have a look at my
page:
http://www.lennard.net.nz/electronics/lcd.html
My simple Datalogger on another page also has code in it that does what
you
are after.
Cheers,
Ben.
> From: "Mike Dillon" <laxboy687@e...>
> Reply-To: basicstamps@yahoogroups.com
> Date: Sun, 30 Mar 2003 21:09:27 -0500
> To: <basicstamps@yahoogroups.com>
> Subject: [noparse][[/noparse]basicstamps] More LCD Questions
>
> Hi all, again,
> Just wanted to know how to display a variable, such as the number I
get
> from my sonar module on to my LCD unit.
> BS2 controller HD44780 compatible LCD.
> Thanks
>
> -Mike
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject
and Body
> of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/