Got the 6x10 font working!· I think it's pretty legible too.
Gives 80 columns by 27 rows (plus top two lines of 28th row).
There's one bug that I'm having trouble nailing down though...· If you set the colors to white on black anywhere on the screen, the screen goes unstable.· It's driving me crazy!
1) Landscape format 60x34 characters with 8x8 pixel font.
Can be switched between 60x17 and 60x34 mode while running, this allows a zoom mode.
2) Portrait format 45x40 characters with a 6x8 font and 4 empty lines between rows.
Both allow to define the Background color and an individual color for every character out of all 64 possible colors.
There is also an Inverse-Bit which allows to swap Fore-and Backgroundcolor i.e for cursors and Block selection.
For both, I have written a TV_Text compliant layer. This makes it easy to replace the TV-Monitor by this TFT in all applications
which use TV_Text (or VGA_Text or PC_Text).
The text drivers have an additional methode: button(stringptr) which allows to draw a text with a border around it.
The Text drivers include a little Testcode for demonstration. This Testcode can be deleted (or commented out) to get
a clean driver object.
Rayman said...
Here's some screenshots of Ariba's fonts (Nice Work!):
(Think I need to get a tripod out to do this better...)
I was watching last night's work Ariba, and I liked it, especially the driver TSD_rot6x8.
Another thing is the assembly code looks so simple. Place the BL code in Spin was also a good idea, but had to write a little function to change the brightness, for example:
It'sa good idea to separate the code from the screen and the BL, because I use another and because in the future you can still upgrade with minimal modifications and using the same functions (API).
Yeah, that's in inherent problem with an odd number of rows (17)... Not quite sure what to do about that...
Probably should make #rows either 16 or 18...
Ariba said...
Landscape format 60x34 characters with 8x8 pixel font.
Can be switched between 60x17 and 60x34 mode while running, this allows a zoom mode.
Is it possible to do a native 8x16 font (rather than a 8x8 with the rows doubled)? I am trying to sort through Ariba's driver, but I am not very comfortable how the video generation works yet. I am using the driver in full character height (rows = 17, char height = 2), but it would be awesome to have smoother characters.
Thanks both Rayman and Ariba for your efforts on this display
This driver is a little special in that the font is in the CogRAM. That's why the access of the single font-bytes is complicated.
A 8x16 font would not fit in CogRAM, so another technik is needed.
I have also a driver which accesses font data from MainRAM, perhaps an 8x12 font (from the VGA drivers) is a good size?
Finally got my LCD and (Mctrivia) breakout board hooked up, but the display isnt right and I have no idea why.
On Ray's Grafx demo the top title bar it pretty stable, but gets echod for want of a better desription twice below it, and there is lots of flickering of the rest of the screen. Here is a video of it·; as you can see the animated lines in background appear to move OK behind the corruption.
The paint program looks semi normal but the image is clearly not right, and the VGA demo program looks barley recognisable (see attached images)
Can anyone please suggest what the problem might be?
My pins are set as follows:
BackLightPin=11 · DisplayOnPin=8 · PixelClockPin=10 · DataEnablePin=9 · TouchIrqPin=27· 'This pin is really optional, but touchscreen sets this whenever screen is touched · NotUsedPin=26·· 'Need to define one pin that is not to be used for LCD (can still be used for anything else) · VgaPins=%000_111 'RGB and syncs connected to P0-7
I have double checked all pins are connected correctly and tried 3 different LCDs, and just cant find anything wrong.
Well, maybe it just won't work with 9" wires... Perhaps something is coupling to the sync signals...
One thing I'd try is putting 100-Ohm (or 1000-Ohm)·to ground resistors on the sync signals at the breakout board.· That should reduce the effects of any capacitive coupling to the sync signals...
I modified the original 8x16 font Rayman posted (thanks again!) to make some a basic GUI. I modified the first 30 characters for the GUI elements, and slightly modified the 0-9, A-Z, and a-z.
Here are the functions I added to the driver test:
'UpdateProgressBar
'Creates and updates a progress bar
'Call first time with percent of 0 to create, afterwards call with percent
PUB UpdateProgressBar(percent, barcolor) | columns, oldcolor
columns := (percent * 40) / 100
oldcolor := color
color := barcolor
if columns == 0
SetPos(10, 14)
print($01)
repeat 38
print($02)
print($03)
elseif columns == 1
SetPos(10, 14)
print($04)
elseif columns == 40
SetPos(49, 14)
print($06)
else
SetPos(columns + 9, 14)
print($05)
color := oldcolor
'CreateButton
'Creates button using supplied text, framecolor, and text color
PUB CreateButton(text, framecolor, textcolor) | oldcolor
oldcolor := color
color := framecolor
Print($08)
repeat strsize(text)
Print($09)
Print($0A)
row++
col -= strsize(text) + 2
Print($07)
color := textcolor
PrintStr(text)
color := framecolor
Print($0B)
row++
col -= strsize(text) + 2
Print($0E)
repeat strsize(text)
Print($0D)
Print($0C)
col++
row -= 2
color := oldcolor
'SetPos
'Moves cursor to specific column and row
PUB SetPos(x, y)
col := x
row := y
Yesterday I went through ALL the posts on this subject. Phew, was I beat after that. Was looking for some info, some of which I found, some not.
Where is the Prop <=> breakout board signals listed. I see some signal names on the b/o board, but that doesn't tell me what the Prop I/Os are needed for them. Is there a table somewhere; I didn't see how the Prop-to-breakout board should be wired? I will be using the original Prop Protoboard.
Unfortunately the orientation of the LCD flat cable below the display (6 o'clock position) and the available edge pads on the Prop Protoboard are a bit awkward. That seems to be quite often the case, in my experience. Makes the LCD upside down, closer to the viewer, below the Protoboard.
From the photos I saw looking through all the posts, this display should be a very good one. Photos don't always do justice to the actual display.
I plan to have a SD card on this Protoboard also. So I hope there are sufficient I/Os left over for other interfaces.
Well, the main thing is that the color and sync pins have to be used the same way as with the VGA driver... I think this means they have to be in a group of 8 pins. Choices are pins P0...P7 or P8...P15 or P16...P23 etc. VSync has to be the lowest number pin and HSync the next lowest.
All the other signals can be on any pin you like...
Also, for the protoboard, it's probably better to use the +5V for the backlight voltage (AVDD), although you could also use the same 3.3V as for DVDD...
Peter said...
Well, the main thing is that the color and sync pins have to be used the same way as with the VGA driver... I think this means they have to be in a group of 8 pins. Choices are pins P0...P7 or P8...P15 or P16...P23 etc. VSync has to be the lowest number pin and HSync the next lowest.
All the other signals can be on any pin you like...
Sorry to be a pain, but I've not worked with any VGA and your information isn't very helpful. I have looked at the PSB demo code and need to study that, maybe, more to understand. For some reason, this interface seems so vague. I'm trying to draw up the Prop to breakout board wiring for those 20 pins; can't get very far. Don't know what the PSB is really; hopefully the code can be used for a demo. Or is there a better selection?
Thank you for the info on the backlight supply being better on +5v; lesser load on the input current I'd suppose. Would help if I looked up the data sheet on what that IC is.
Hmm...· Well, since PSB is almost out the door, I'll post a couple schematics here, in case you want to copy the pin setup exactly with your protoboard:
I reread Ray's 12:36 pm post over and over, looked at that PSB demo source and the breakout board. Finally I figured out what you wrote. (sorry I called you 'Peter'; had two posts to get out and I goofed.)
Those 'middle eight signals, on pins 9 - 16, R1, R0, G1, G0, B1, B0, HSync and VSync are the color and sync signals you referred to. So, I come back and find Ray and tdeyle show me what they have.
Had I dealt with VGA before, I'm sure it would have made loads more sense. (How does all the 60 conductors from the LCD get transformed down to under 20 signals and pwr/ground, I'm wondering?) I suppose only 2 signals/color, this limits the colors to 64 color at any one time.
Below is what I think is one way to interface the 4.3" LCD breakout board to a Prop. (I used Rayman's rough schematic to understand the purpose and organization of the Prop signals vs. the breakout board (silk screened) names at header zone J1. I trust it was correct.)
Does my list below appear to be correct? I prefer to NOT wire up this i/f with unknown errors! Thank for any help or suggestions to improve it.
Looking at the PSB_LcdDriver source listing it has PCLK on A25 and DE on A26 (opposite to what I first found...somewhere; maybe a reading error?)
Also, WHY is there a "...Need to define one pin as NOT used"? That would be difficult to 'discover' a need for doing such.
I'm about to wire up this i/f and hope to have the documentation, at least, correct to begin with.
It appears if the breakout board is plugged in upside down, the the LCD would display 6 o'clock down and the Prop Protoboard in 'normal' position. That is the breakout would have the header pins or socket on the component side. The module then could be attached with double-sided tape to the back of the b/o board nicely. Do you see any problem doing that?
The "not used pin" is needed in order to get a pixel clock that is 180 degrees out of phase with the pixels...
Needed that so as to not violate setup and hold times for the display color inputs...
Should work upside down. Looking forward to hearing about your results...
Comments
Here is this font conditioned to copy into a Spin source.
I have adapted one of my Text drivers to the font, but I am not totally convinced....
I will post first my Text Drivers which use other fonts.
Andy
Gives 80 columns by 27 rows (plus top two lines of 28th row).
There's one bug that I'm having trouble nailing down though...· If you set the colors to white on black anywhere on the screen, the screen goes unstable.· It's driving me crazy!
Anyway, for now, don't use white on black!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
1) Landscape format 60x34 characters with 8x8 pixel font.
Can be switched between 60x17 and 60x34 mode while running, this allows a zoom mode.
2) Portrait format 45x40 characters with a 6x8 font and 4 empty lines between rows.
Both allow to define the Background color and an individual color for every character out of all 64 possible colors.
There is also an Inverse-Bit which allows to swap Fore-and Backgroundcolor i.e for cursors and Block selection.
For both, I have written a TV_Text compliant layer. This makes it easy to replace the TV-Monitor by this TFT in all applications
which use TV_Text (or VGA_Text or PC_Text).
The text drivers have an additional methode: button(stringptr) which allows to draw a text with a border around it.
The Text drivers include a little Testcode for demonstration. This Testcode can be deleted (or commented out) to get
a clean driver object.
Andy
Had to resort to using 16 bytes for each character because inner waitvid loop wasn't fast enough to do a x10 multiply...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
(Think I need to get a tripod out to do this better...)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
I was watching last night's work Ariba, and I liked it, especially the driver TSD_rot6x8.
Another thing is the assembly code looks so simple. Place the BL code in Spin was also a good idea, but had to write a little function to change the brightness, for example:
It'sa good idea to separate the code from the screen and the BL, because I use another and because in the future you can still upgrade with minimal modifications and using the same functions (API).
The driver / Demo "PSB Paint", seems to have a bug with "newline" at the end of the last lines display becomes unstable.
Try:
Probably should make #rows either 16 or 18...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Is it possible to do a native 8x16 font (rather than a 8x8 with the rows doubled)? I am trying to sort through Ariba's driver, but I am not very comfortable how the video generation works yet. I am using the driver in full character height (rows = 17, char height = 2), but it would be awesome to have smoother characters.
Thanks both Rayman and Ariba for your efforts on this display
This driver is a little special in that the font is in the CogRAM. That's why the access of the single font-bytes is complicated.
A 8x16 font would not fit in CogRAM, so another technik is needed.
I have also a driver which accesses font data from MainRAM, perhaps an 8x12 font (from the VGA drivers) is a good size?
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Post Edited (Rayman) : 12/31/2009 10:58:44 PM GMT
Finally got my LCD and (Mctrivia) breakout board hooked up, but the display isnt right and I have no idea why.
On Ray's Grafx demo the top title bar it pretty stable, but gets echod for want of a better desription twice below it, and there is lots of flickering of the rest of the screen. Here is a video of it·; as you can see the animated lines in background appear to move OK behind the corruption.
The paint program looks semi normal but the image is clearly not right, and the VGA demo program looks barley recognisable (see attached images)
Can anyone please suggest what the problem might be?
My pins are set as follows:
BackLightPin=11
· DisplayOnPin=8
· PixelClockPin=10
· DataEnablePin=9
· TouchIrqPin=27· 'This pin is really optional, but touchscreen sets this whenever screen is touched
· NotUsedPin=26·· 'Need to define one pin that is not to be used for LCD (can still be used for anything else)
· VgaPins=%000_111 'RGB and syncs connected to P0-7
I have double checked all pins are connected correctly and tried 3 different LCDs, and just cant find anything wrong.
Thanks
Anthony
ry.david:· The 8x16 font code is slightly different...· I'll post it and the input file here.
The input file is the output of a·program called "xFont" for Palm Pilot development (you can still download it from the web).
xFont puts out a .pfn file that I just rename to .txt so I can edit it with notepad more easily...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
One thing I'd try is putting 100-Ohm (or 1000-Ohm)·to ground resistors on the sync signals at the breakout board.· That should reduce the effects of any capacitive coupling to the sync signals...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Here are the functions I added to the driver test:
It's based on 8x8 tiles, stored in 4-color mode, like the Parallax ROM font.
This way, one can mix in 2-bit color tiles with the regular font...
The dat generator program now recognizes "GLYPH2" as a 2-bit color glyph (see first two characters in this example).
This should make it easier to add fancy looking buttons, etc...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Could you please explain the longs defined under vga colors? I am assuming they are in binary as RRGGBBxx? How do the bytes 0-3 within each long work?
Thanks!
Ryan
http://www.rayslogic.com/propeller/Programming/Colors.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Yesterday I went through ALL the posts on this subject. Phew, was I beat after that. Was looking for some info, some of which I found, some not.
Where is the Prop <=> breakout board signals listed. I see some signal names on the b/o board, but that doesn't tell me what the Prop I/Os are needed for them. Is there a table somewhere; I didn't see how the Prop-to-breakout board should be wired? I will be using the original Prop Protoboard.
Unfortunately the orientation of the LCD flat cable below the display (6 o'clock position) and the available edge pads on the Prop Protoboard are a bit awkward. That seems to be quite often the case, in my experience. Makes the LCD upside down, closer to the viewer, below the Protoboard.
From the photos I saw looking through all the posts, this display should be a very good one. Photos don't always do justice to the actual display.
I plan to have a SD card on this Protoboard also. So I hope there are sufficient I/Os left over for other interfaces.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
All the other signals can be on any pin you like...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Sorry to be a pain, but I've not worked with any VGA and your information isn't very helpful. I have looked at the PSB demo code and need to study that, maybe, more to understand. For some reason, this interface seems so vague. I'm trying to draw up the Prop to breakout board wiring for those 20 pins; can't get very far. Don't know what the PSB is really; hopefully the code can be used for a demo. Or is there a better selection?
Thank you for the info on the backlight supply being better on +5v; lesser load on the input current I'd suppose. Would help if I looked up the data sheet on what that IC is.
Thanks for any further guidance.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
I reread Ray's 12:36 pm post over and over, looked at that PSB demo source and the breakout board. Finally I figured out what you wrote. (sorry I called you 'Peter'; had two posts to get out and I goofed.)
Those 'middle eight signals, on pins 9 - 16, R1, R0, G1, G0, B1, B0, HSync and VSync are the color and sync signals you referred to. So, I come back and find Ray and tdeyle show me what they have.
Had I dealt with VGA before, I'm sure it would have made loads more sense. (How does all the 60 conductors from the LCD get transformed down to under 20 signals and pwr/ground, I'm wondering?) I suppose only 2 signals/color, this limits the colors to 64 color at any one time.
Thanks for clearing up my fog.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
Below is what I think is one way to interface the 4.3" LCD breakout board to a Prop. (I used Rayman's rough schematic to understand the purpose and organization of the Prop signals vs. the breakout board (silk screened) names at header zone J1. I trust it was correct.)
Does my list below appear to be correct? I prefer to NOT wire up this i/f with unknown errors! Thank for any help or suggestions to improve it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
Looking at the PSB_LcdDriver source listing it has PCLK on A25 and DE on A26 (opposite to what I first found...somewhere; maybe a reading error?)
Also, WHY is there a "...Need to define one pin as NOT used"? That would be difficult to 'discover' a need for doing such.
I'm about to wire up this i/f and hope to have the documentation, at least, correct to begin with.
It appears if the breakout board is plugged in upside down, the the LCD would display 6 o'clock down and the Prop Protoboard in 'normal' position. That is the breakout would have the header pins or socket on the component side. The module then could be attached with double-sided tape to the back of the b/o board nicely. Do you see any problem doing that?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
The "not used pin" is needed in order to get a pixel clock that is 180 degrees out of phase with the pixels...
Needed that so as to not violate setup and hold times for the display color inputs...
Should work upside down. Looking forward to hearing about your results...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm