Go Down

Topic: Scrolling text question. (Read 766 times) previous topic - next topic

JohnSan

(Sorry for the rather long question).

I have a 5m strip (160 leds) of LPD8806 type addressable led, I'm using for testing at the moment. (Some great colours and patterns while learning more Arduino coding and using librarys etc).
I'm considering a srolling text display which is probably going to be 10 columns of 16 leds.

Now for the characters:-
All bitmap arrays I've come across seem to be arranged  column x row.
Typically taking 7 bytes per character. (Unless going for a larger font).

E.G. For a exclamation mark,(!) the following is for a 5 by 7 'font'.

Where X=On   and $ signifies Hex
       displays something like this

$20,  ..X.....   
$20,  ..X.....
$20,  ..X.....
$20,  ..X.....
$20,  ..X.....
$00,  ........
$20,  ..X.....

The 3 LSBits are usually 0 which is used for gaps between characters.

As I understand it:-

To gradually move the characters onto a display matrix, each bit in each of the 7
bytes,starting with the MSbit, has to be checked to see if it is ON, then the next and
so on, as each column is moved onto the display grid (or display buffer first) and then the relevent led turned on.

I've been thinking, if I created a font bitmap row x column, (instead of column x row), it wouldn't be necessary to do the bit checking and I could just index the column data straight into the display (buffer) column.

So the same data for an exclamation mark would be

$00,$00,$FD,$00,$00,$00,$00,


Has anyone any ideas on this or can see any pitfalls?
Or is it maybe common and I've just not come across it?

Thanks.
John.

I'll be glad when I've had enough!

PaulS

Quote
Has anyone any ideas on this or can see any pitfalls?

Certainly makes the job easier.

There is code for generating font data in the column x row format, which you'd need to modify to get the row x column format, but that shouldn't be too hard.

For a 10 * 16 grid, you probably don't want a 5 x 7 font, though. The top and bottom rows would never be lit.

JohnSan

I was thinking of going with 5 x 12 or maybe 5 x 14 for the font size.
The scrolling text part of the project, is really a 'very nice to have' additional feaure. So I'm not too concerned about a row or two not being used.
Although, as you rightly say, 5 x 7 would be a waste and probably difficult to read, given the strips will be mounted maybe 4 or 5 inches apart.

As long as there are no real negatives, I'll push on with creating the 'sideways' font.

Thanks.
I'll be glad when I've had enough!

JohnSan



There is code for generating font data in the column x row format, which you'd need to modify to get the row x column format, but that shouldn't be too hard.



I think the normal font data is referred to as a raster font isn't it? Probably the way a TV screen picture was created by a raster dot.

You mention some code for generating the 'other' type is available.
Would you have any link to it - what does it run on?

I've created an excel spreadsheet, based on a hex file for a 5 x 7 font I have. I'm then 'upscaling' - doing it 'by hand' to 5 x 14. (Or should that be 14 x 5)?.

I've done the basic spreadsheet structure. Scaling the column and row widths, to simulate the final layout construction, it does provide a reasonable visual idea of how characters will look. (Bearing in mind, the odd pixel height to width ratio i'm using).

The font should eventually just fit in the 1k of EEPROM on the Uno, using characters 30 to 126 (dec).
IE.  94 characters at 10 bytes / char.

Only done 4chars at the moment :(  but now concentrating on the code to display it.
Adafruit have done a good job with the LPD8806 library. It seems to work a treat.

I'll be glad when I've had enough!

Go Up