[TI ASM] Best way to display a 6x8 character?

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

Post Reply
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

[TI ASM] Best way to display a 6x8 character?

Post by benryves »

I currently have 2 text modes: 12x8 (using 8x8 characters) and 24x10 (using 4x6 characters). You can't get much on-screen in 12x8 and the characters in 24x10 are quite small, so I'd like to have a medium text mode of 16x8 (6x8 characters).

I'm trying to work out the best way to do it. My current bet is on storing the character with each byte being one column and drawing the character pixel-by-pixel from left-to-right, going from the top to the bottom each time, but I fear this would be too slow. Packing the character's 6 bits into a byte is quite messy, unfortunately...

Edit kv83: Added help tag :)
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

Why don't you simply put the LCD in 6-bit mode? That way each byte corresponds to 6 bits on the display. Of course that's only good if speed is more important than memory usage.
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

CoBB wrote:Why don't you simply put the LCD in 6-bit mode? That way each byte corresponds to 6 bits on the display. Of course that's only good if speed is more important than memory usage.
Good thinking :)
I hadn't thought of that at all. However, when it would come to mixing text/graphics, it would make things quite a bit more complex (not to mention having to have different routines to copy the video buffer). I'll have to see.
pacHa
Sir Posts-A-Lot
Posts: 190
Joined: Sun 09 Jan, 2005 9:51 am
Contact:

Post by pacHa »

May I ask what's exactly this 6-bit mode you're speaking of ?
Image
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

The LCD has two different word length modes. In 8-bit mode the byte sent to the data port affects 8 pixels, and the Y counter steps in 8-pixel units, while in 6-bit mode only the upper 6 bits of the data byte go to the LCD, and the measure of the Y counter is changed accordingly as well, by going from 0 to 15 on the visible screen instead of just 11. 6-bit mode is set by sending $00 to the LCD command port, 8-bit by sending $01. Check out the datasheet for the details.
pacHa
Sir Posts-A-Lot
Posts: 190
Joined: Sun 09 Jan, 2005 9:51 am
Contact:

Post by pacHa »

Complicated hardware stuff %)
Nah, joking. Thanks for the explanation.
Image
lecks
Extreme Poster
Posts: 484
Joined: Fri 09 Sep, 2005 1:56 am

Post by lecks »

lol i keep thinking yuo have to download money into ur calc every time i read this.
Post Reply