PTP2 With the QT Board it's amazing but also its to big for my........ HELP
jvrproductions
Posts: 61
Hello all and thanks for reading. Well i just start on this world of the propeller 3 months ago and now i have this amazing screen that it's killing me :-)
So far a was able to Write text on the LCD, change the background color, the text color and print a bitmap.
If i understood correctly, the lcd (or the driver) have 300 tiles on each one i can use 2 colors. Some one may PLEASE point me to where i can learn how to send data to each tile? I dont want video or any type of movement at this time i just one to fill pixels on specific colors and spaces of each tile...
Thanks a lot for any help
So far a was able to Write text on the LCD, change the background color, the text color and print a bitmap.
If i understood correctly, the lcd (or the driver) have 300 tiles on each one i can use 2 colors. Some one may PLEASE point me to where i can learn how to send data to each tile? I dont want video or any type of movement at this time i just one to fill pixels on specific colors and spaces of each tile...
Thanks a lot for any help
Comments
Basically, the same capabilities and limitations are there although the resolution is fixed.
It sounds like you want to do graphics... One way to do that is with the Graphics.spin object.
Look at the PTP2 paint example to see how to use it.
Another way is to come up with custom tiles. I have 2-bit and 1-bit custom tile generators:
http://www.rayslogic.com/propeller/Programming/2BitBitmap.htm
One other experimental way is to use external memory to hold the video buffer.
That is something I'm working on (slowly) with my Flashpoint memory modules...
That is actually the first one of a test batch that you have.
I was on the fence about doing a production run, but now I think I will...
It is a little complex, but I think you can do it.
You can use the Prop2BitBitmap to create a .dat file with your bitmap.
Add it with the others between "UserCharStart" and "UserCharEnd" in the DAT 'Bitmap Data section.
draw it on the screen using the Bitmap2Bit function.
If you can't figure it out, let me know and I'll give you that "clean" example...
1- i and getting the colors from the lcd driver where for example: where %11blue, %111green and %111red bits white it's easy and black its easy to because will be all 0's instead of 1's but if i want to create and specific color, from where i can get the bits numbers?
2- I am trying to understood the Schematic http://www.rayslogic.com/Propeller/Products/PTP2/PTP2_Sched1.png in order to know what pin are un-used but if i read correctly there are no un-used pins?
Thanks for any help...
Anyway, some colors are predefined in the PTP2_LcdDriver object:
So, it's just a binary number here 0..3 for blue and 0..7 for red and green that are just shifted and added up.
The Prop2BitBitmap tool doesn't assign colors, just a number in the range 0..3 to each color.
The LCD driver (just like TV and VGA) uses an array of 64 colors set. Each set is a long with 4 byte values in it.
Anyway, you need to create the color set and move it to the colors array...
For the PTP2 Paint example, I've provided a more easy way to do this with the SetGraphicsColor function:
Here you see I'm creating color set #16 with colors white, red, green and black.
If these were the colors you want, you then just use the Bitmap2Bit function with 16 for the color.
If you have a 24-bit color from a PC then you have 8 bits of red, blue and green with each in the range from 0 to 255.
You can use the RGB function of the PTP2_LcdDriver to convert this color to the nearest equivalent for PTP2.