Exact match. Not showing close matches.
PICList
Thread
'[EE] HD44780 - 2 line/1 line effects?'
2007\09\25@164353
by
Paul Anderson
2007\09\25@171111
by
Howard Winter
Paul,
On Tue, 25 Sep 2007 14:43:48 -0600, Paul Anderson wrote:
> I recently bought this LCD from sparkfun electronics:
> www.sparkfun.com/commerce/product_info.php?products_id=709#
>
> The driver chip is compatible with the HD44780. If you set the
> function set for this chip to 1 line, instead of 2 line, even though
> it is driving a 2 line display, would it still display properly?
Rather depends what you mean by "Properly"! These controllers are designed to cope with much larger displays, and you'll find that line 2 doesn't follow on from
line 1 in the addressing, for example, so even as you bought it you may find it doesn't behave quite how you expect. As long as you only display the first 16
positions, it should work fine (the display will be on the top line of course, not in the middle of the display).
Why do you want to do that, by the way? What are you expecting to be different if you tell it it only has 1 line?
Cheers,
Howard Winter
St.Albans, England
2007\09\25@172656
by
Bob Blick
--- Paul Anderson <.....wackyvorlonKILLspam
@spam@gmail.com> wrote:
> I recently bought this LCD from sparkfun
> electronics:
>
www.sparkfun.com/commerce/product_info.php?products_id=709#
>
> The driver chip is compatible with the HD44780. If
> you set the
> function set for this chip to 1 line, instead of 2
> line, even though
> it is driving a 2 line display, would it still
> display properly?
You'll only get one line, and if you'd previously
adjusted the contrast when it was set to 2 lines,
you'll need to readjust.
And I think it also reduces the instruction time, but
it's been a while since I looked that deeply into the
docs.
Cheerful regards,
Bob
2007\09\25@172931
by
Bob Blick
2007\09\25@191732
by
Jinx
> And I think it also reduces the instruction time, but it's been
> a while since I looked that deeply into the docs
I've never even thought to set a 16x2 as 16x1 so had a look
in the 44780 datasheet to get an idea of why you might do it
Might be wrong (distinct possibility, but I have the Hitachi LCD
manual/big book), AFAICT there's no reason or advantage.
Everything seems to be the same - execution time, scrolling,
display addresses, etc. No notes about "If you select 16x1 this
happens..."
Is there some aesthetic reason for a backlit negative display
in 16x1 rather than 16x2 ?
2007\09\25@194033
by
Bob Blick
--- Jinx <.....joecolquittKILLspam
.....clear.net.nz> wrote:
> > And I think it also reduces the instruction time,
> but it's been
> > a while since I looked that deeply into the docs
>
> I've never even thought to set a 16x2 as 16x1 so had
> a look
> in the 44780 datasheet to get an idea of why you
> might do it
>
> Might be wrong (distinct possibility, but I have the
> Hitachi LCD
> manual/big book), AFAICT there's no reason or
> advantage.
>
> Everything seems to be the same - execution time,
> scrolling,
> display addresses, etc. No notes about "If you
> select 16x1 this
> happens..."
Ahh, a challenge:)
It's in typical obscure wording. Here it is, on page
249 of my book. Execution time is listed in two
columns, one when in single line mode, fOSC = 250KHz,
the other when in two-line mode, fOSC = 160KHz. Many
of the parameters are three times faster in single
line mode, whether using 5x10(1/11 duty cycle)or
5x7(1/8 duty cycle) font. Two line mode is always 5x7
with 1/16 duty cycle.
Cheerful regards,
Bob
2007\09\25@205206
by
Jinx
> It's in typical obscure wording. Here it is, on page
> 249 of my book. Execution time is listed in two
> columns, one when in single line mode, fOSC = 250KHz,
> the other when in two-line mode, fOSC = 160KHz. Many
> of the parameters are three times faster in single
> line mode, whether using 5x10(1/11 duty cycle)or
> 5x7(1/8 duty cycle) font. Two line mode is always 5x7
> with 1/16 duty cycle.
Well, that's interesting to know. I've looked through the Hitachi
book again, trying to find some direct or implied link between
lines and speed but nothing. Not for the 44100 or 66780 either.
Every note or test case is cited with fosc = 250kHz, with no
indication that speed is related to 1 or 2 lines. Certainly from this
data you'd not expect any significant operational difference. In
fact if you look at the Frame Frequency diagrams, you might
conclude that there is likely no difference between 1/8 and 1/16
Duty Cycle. 1/8 takes 400 clocks and 1/16 takes 200 clocks
to give each a FF of 78.1Hz
2007\09\25@215144
by
Bob Blick
Jinx wrote:
>> It's in typical obscure wording. Here it is, on page
>> 249 of my book. Execution time is listed in two
>> columns, one when in single line mode, fOSC = 250KHz,
>> the other when in two-line mode, fOSC = 160KHz. Many
>> of the parameters are three times faster in single
>> line mode, whether using 5x10(1/11 duty cycle)or
>> 5x7(1/8 duty cycle) font. Two line mode is always 5x7
>> with 1/16 duty cycle.
>
> Well, that's interesting to know. I've looked through the Hitachi
> book again, trying to find some direct or implied link between
> lines and speed but nothing. Not for the 44100 or 66780 either.
> Every note or test case is cited with fosc = 250kHz, with no
> indication that speed is related to 1 or 2 lines. Certainly from this
> data you'd not expect any significant operational difference. In
> fact if you look at the Frame Frequency diagrams, you might
> conclude that there is likely no difference between 1/8 and 1/16
> Duty Cycle. 1/8 takes 400 clocks and 1/16 takes 200 clocks
> to give each a FF of 78.1Hz
>
Yes, the docs are quite obscure. I have never measured the execution
times to compare, but I suspect running in 2-line mode really does slow
things down even though it maintains the same frame frequency. Likely
the accessing of memory both for display generation and processing is
the reason it takes so much longer in 2 line mode.
I also wonder whether the 160KHz and 250KHz info relates to particular
applications. There is some other info about the 44780 in the old
display data sheets, in particular the L2570 display which is a huge
document, unfortunately I only have a hard copy or I'd make it available.
And of course with all the chip revisions and copies, the data sheet is
only a starting point.
Cheerful regards,
Bob
2007\09\25@222537
by
Jinx
> I have never measured the execution times to compare, but I
> suspect running in 2-line mode really does slow things down
I'm LCD-ing a project in a day or two and will have a fiddle
with that. It may be just of academic interest as I guess you'd
use the display in 1 or 2 lines and you're stuck with the speed
for each
2007\09\26@054245
by
Alan B. Pearce
>Is there some aesthetic reason for a backlit negative display
>in 16x1 rather than 16x2 ?
He has a 16x2 while doing development - simply because he already has it,
but the end product will use only 16x1 ??
2007\09\26@054446
by
Jinx
> suspect running in 2-line mode really does slow things down even
> though it maintains the same frame frequency
Well, I've measured a few cases and find no difference with this
particular 16x2 and a 40MHz 18F2520. Time of execution is
started at 'bsf marker' and ended at 'bcf marker'
1-line write and busy periods
Single character 42.91us
Clear screen 1584us
Change print position 24us
2-line write and busy periods
Single character 42.91us
Clear screen 1584us
Change print position 24us
Interestingly, to the real geeks, is that single-character write time
is shorter after a command write. For example busy period for
"A" after clearing the screen or changing print position is only
35.7us, whereas busy period for "B" after "A" takes 42.91us
There's a 1ms delay between character writes (msdelay) but just
3us between command write and character write ( ie the 4 lines
after ';==== code' )
So there ya go
;==== set-up
mov macro litval,file ;movlw then movwf
movlw litval
movwf file
endm
disp macro litval ;display character
movlw litval
call write_d
endm
clrscrn macro ;clear LCD
movlw 0x01
call write_c
endm
lcd_pos macro litval ;set display position
movlw litval-1
call address
endm
ln1 = 0x00 ;line1 start address
ln2 = 0x40 ;line2 start address
;==== code
clrscrn
disp "*" ;ready
call line2
disp "2" ;line 2 off/on indicator
go btfsc button ;start button
bra go
then either
clrscrn
call msdelay
clrscrn
call msdelay
clrscrn
call msdelay
or
disp "A"
call msdelay
disp "B"
call msdelay
lcd_pos ln1+.9
disp "C"
call msdelay
line1 movlw 0x00 ;line 1, column 0
call address
return
line2 movlw 0x40 ;line 2, column 0
call address
return
address addlw 0x80 ;set high bit of address command
call write_c
return
write_c bcf rs ;write command
bra d_out
write_d bsf rs ;write data
usec
d_out bsf marker
movwf latb ;write to port
usec
bcf rw
usec
bsf en
usec
bcf en
usec
bsf rw ;set up for Busy Flag read
usec
bcf rs
usec
clrf portb
usec
mov b'10000000',trisb
bsf en
usec
getbusy btfsc busy ;loop until Busy Flag clear
bra getbusy
bcf marker
bcf en
usec
bcf rw
mov b'00000000',trisb
return
2007\09\26@174246
by
Paul Anderson
On 9/26/07, Alan B. Pearce <EraseMEA.B.Pearcespam_OUT
TakeThisOuTrl.ac.uk> wrote:
> >Is there some aesthetic reason for a backlit negative display
> >in 16x1 rather than 16x2 ?
>
> He has a 16x2 while doing development - simply because he already has it,
> but the end product will use only 16x1 ??
>
>
It's actually bit sillier than that. The end product will be using a
PIC16F88 microcontroller to drive the LCD, but I wanted to get a feel
for driving the LCD on an Arduino board before moving to the F88.
I've wired up the LCD, and I'm using code from here:
http://www.arduino.cc/en/Tutorial/LCD8Bits
The backlight is on, I added a line of code to turn on a status LED so
I know it's up and running, but nothing. I've doublechecked wiring
and don't see anything wrong with it so far. There are two possible
issues. First, is in the code communicating to the LCD. That may
have a typo or something and be sending the wrong signals(I notice the
datasheet SparkFun gives for the module likes to list instruction as
big endian, while the arduino code is talking small endian). Second,
the contrast. I haven't a potentiometer handy, so I've tried three
configurations: Pulled low, pulled high, and on a resistive voltage
divider that should land it about half of the 5v supply.
I'm thinking either the code is messed up or I have the contrast wired
totally wrong.
Any thoughts?
--
Paul Anderson
VE6HOP
wackyvorlon
spam_OUTgmail.com
http://www.oldschoolhacker.com
"May the electromotive force be with you."
2007\09\26@185829
by
Jinx
> Any thoughts?
Arduino say "the pinout for LCD displays is standard"
- DI, RW, DB0..DB7, Enable
I say the standard is more like
0V V+ VO RS R/W En DB0-DB7
(although I do have one LCD with Arduino's pinout)
More... (looser matching)
- Last day of these posts
- In 2007
, 2008 only
- Today
- New search...