LCDproc development and user support list

Text archives Help


[Lcdproc] Some help with multiple heartbeat characters


Chronological Thread 
  • From: ethan.dicks at gmail.com (Ethan Dicks)
  • Subject: [Lcdproc] Some help with multiple heartbeat characters
  • Date: Wed, 6 Apr 2016 15:51:52 -0400

On Wed, Apr 6, 2016 at 2:37 PM, ZV <zv at ziva-vatra.com> wrote:
> Hey All,
>
> I am in the process of writing an implementation of the pic-an-lcd
> protocol for the Arduino (https://github.com/ZivaVatra/ArduLCD), and
> have been testing with lcdproc.

Wow... that's reaching back.

I wrote the original pic-an-lcd driver, many, many years ago. I still
have my hardware but I admit I haven't plugged it in in a long time
(not since serial ports started disappearing from computers).

> I have got a version working, however I seem to have the heartbeat
> appearing multiple times. I don't think it is corruption because the
> heartbeat glyph is always alternating with other full blocks, and there
> are no other out of place characters, or
> garbage on the display. This only happens on bar graphs, and places
> where I would expect there to be full blocks.

I don't know how well you know the HD44780, so please excuse me if I
go over something that you already know.

First, if this is with vbars, this is not unexpected behavior. If
it's with hbars, then that's not expected.

There are 8 user-definable chars in the HD44780 (and compatible
clones). Heartbeat uses one of them (0x07), and the bargraphs and
bignums use a bunch. In particular, you can't have heartbeat and
bignums or heartbeat and vbars at the same time because the HD44780
doesn't have enough soft chars to do both at the same time
(p->cellwidth is 5, p->cellheight is 8, so hbars use soft chars 0-4
and vbars use soft chars 0-7, leaving none left for the heartbeat).

> If I disable heartbeat, I get just the static hearts, however if I
> enable heartbeat all the hearts beat in unison

That's because the server code isn't changing the character value at
the X,Y location of "the heartbeat" in "screen RAM" (it stays 0x07),
it's updating the "character RAM" for a specific character (0x07) and
anywhere that character happens to be on the X,Y display, the pixel
rendering hardware in the HD44780 "updates" all of the "hearts"
simultaneously.

Look at what HD44780_hbar() and HD44780_vbar() and HD44780_icon() are all
doing.

-ethan

P.S. - after staring at code, it also looks like you shouldn't be able
to have heartbeats on screen when using vbars, so perhaps something
else is going on.




Archive powered by MHonArc 2.6.18.

Top of page