Go Down

Topic: TVout (Read 882 times) previous topic - next topic

baum

Continuing my posts about the TVout library:

Check out the wiki for creating bitmaps.
http://code.google.com/p/arduino-tvout/wiki/Bitmaps

Here's the TVout Logo:
Code: [Select]
#include "TVOlogo.h"
PROGMEM const unsigned char TVOlogo[] = {
96,32,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,
0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,
0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x10,0x38,
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x04,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x40,0x02,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x80,0x02,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x02,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xC2,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x42,
0x4F,0xFF,0x60,0x18,0x00,0x00,0x00,0x00,0x17,0xFF,0xFF,0x42,
0x4F,0xFF,0x60,0x18,0x00,0x00,0x00,0x30,0x14,0x00,0x01,0x42,
0x40,0x60,0x60,0x18,0x00,0x00,0x00,0x30,0x14,0x70,0x71,0x42,
0x40,0x60,0x30,0x30,0x00,0x00,0x00,0x30,0x14,0x88,0x89,0x42,
0x40,0x60,0x30,0x30,0x3E,0x06,0x0C,0xFE,0x15,0x05,0x25,0x42,
0x40,0x60,0x30,0x60,0xFF,0x86,0x0C,0xFE,0x15,0x72,0x75,0x42,
0x40,0x60,0x18,0x60,0xC1,0x86,0x0C,0x30,0x15,0x05,0x25,0x42,
0x40,0x60,0x18,0x61,0x80,0xC6,0x0C,0x30,0x14,0x88,0x89,0x42,
0x40,0x60,0x18,0xC1,0x80,0xC6,0x0C,0x30,0x14,0x70,0x71,0x42,
0x40,0x60,0x0C,0xC1,0x80,0xC6,0x0C,0x30,0x14,0x00,0x01,0x42,
0x40,0x60,0x0C,0xC1,0x80,0xC6,0x0C,0x30,0x17,0xFF,0xFF,0x42,
0x40,0x60,0x0F,0x81,0x80,0xC6,0x0C,0x30,0x10,0x00,0x00,0x42,
0x40,0x60,0x07,0x80,0xC1,0x87,0x1C,0x30,0x15,0x40,0x15,0x42,
0x40,0x60,0x07,0x80,0xFF,0x83,0xFC,0x3E,0x12,0x8A,0x8A,0x42,
0x40,0x60,0x03,0x00,0x3E,0x01,0xEC,0x1E,0x15,0x40,0x15,0x42,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x42,
0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xC2,
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,
0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,
0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,
0x00,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};



Now since the TVout library only supports black and white, I should only see white (0xFF) and black (0x00). So why do I see all these other colors, like dark blue (0x42)?

Thanks for any help!

mdmetzle

TVout uses a 1bit encoding.  So each byte contains 8 pixels worth of data.
ie 0x00 = 8 black pixels and 0xff = 8 white pixels.

baum

And how is that encoded?
Is it

bit (1, 2, 3, 4, 5, 6, 7, 8}

or

bit (1, 2, 3,
      4, 5, 6
      7, 8, 9)
?

mdmetzle

lets say we have a 16pixel line: pixel 0,1,2..15
it would be encoded like so:

byte1{0,1,2,3,4,5,6,7} byte2{8,9,10,11,12,13,14,15}

Each line must be a multiple of 8 pixels.

baum


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy