Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:56 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Maximite with TFT made simple

     Page 1 of 3    
Author Message
bovist

Newbie

Joined: 21/06/2013
Location: Germany
Posts: 11
Posted: 12:39am 22 Jun 2013
Copy link to clipboard 
Print this post

Hello all,

I just got the MMBASIC sources from Geoff (thx for this great project!). Due to his great documentation I was able to tweak it a little, making it work with a cheap Sharp LQ043 TFT (Playstation Portable spare part, available on ebay for around 19 US-$), without any additional hardware (no TFT driver chips etc., just a LED illumination step-up converter LT1932 needed)



Conversion was pretty easy since the SPI outputs the desired clock signal. Connection:

SPI Clock (any SPI channel) to Display Clk
HSYNC to Display HSYNC
VSYNC to Display VSYNC
RED to Display R0..R7, wired together
GREEN to Display G0..G7
BLUE to Display B0..B7
POWER LED port pin by PNP transistor (BC557 as inverter) to Display DISP_ON

Display LEDs need about 20mA @ 22V. Display logic is specified @2.5V, but also works with 3.3V (few mA). Analog Voltage is 5V from LDO regulator input.

I just had to discard the SPI/DMA 4 byte padding to get the display properly aligned. Also a RC delay (5k variable resistor with 47p to Gnd) has to be inserted between HSYNC out and the 3 framing SS inputs. The display is crsip with a resolution of 480 x 272 pixels which yields 22 lines of text. Since the resolution matches the Maximite's, there are no distorted characters.

On the picture attached you see my homegrown Color Maximite (i.e. just the PIC32, PS/2 connector, I2C to my hardware and USB, no other ports yet). Second picture shows a tube testing BASIC prog attached to my tube tester hardware.



If anyone is interested, I can post the mods to video.c (with permission on Geoff) and my schematics. This should also work with other TFTs, although horizontal resolution of 480 is best. The only drawback: You can't use Mode 4 acceptably since it has a different timing (screen is just smaller, rest is blank).



---------------
Greetings,
Carsten Meyer
www.keyboardpartner.de
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 01:09am 22 Jun 2013
Copy link to clipboard 
Print this post

COOL!

http://rittle.org

--------------
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 01:39am 22 Jun 2013
Copy link to clipboard 
Print this post

That is excellent!

I am struggling with getting a display to work that has a resolution of 240x320.
Could you give some pointers how i would possible get that to work.

The other problem is that i have to rotate the screen 90 degrees that is above my understanding of how MMBasic does its video manipulation.
Too busy with too many things. I have it on the shelf for a while. :)

Another display is a 4.3" that has exactly the same resolution of your display.
Can't wait to get that one working. I know have 7" VGA on it, but it is just too big.

I also tried tying a few of those RGB lines to output ports to easily make a screen 'flash'. Great as an attention seeker. You just pull a IO port high to have extra brightness. Can also be usefull for adjusting for ambient light in combination with the backlight.

Needless to say, the interest is SUPER HIGH. :)
Edited by TZAdvantage 2013-06-23
Microblocks. Build with logic.
 
bovist

Newbie

Joined: 21/06/2013
Location: Germany
Posts: 11
Posted: 02:34am 22 Jun 2013
Copy link to clipboard 
Print this post

  TZAdvantage said   That is excellent!

I am struggling with getting a display to work that has a resolution of 240x320.
Could you give some pointers how i would possible get that to work.

The other problem is that i have to rotate the screen 90 degrees that is above my understanding of how MMBasic does its video manipulation.
Too busy with too many things. I have it on the shelf for a while. :)



G'day,

just briefly:

1. You need a datasheet of the display. For some strange reason, display documentation is lousy, even from large manufacturers like Sharp.

2. Don't take the timing diagrams literally. If the clock edge fits, you're almost done. The Sharp display mentioned even works with 50 Hz clock instead of 9 MHz.

Does you 320px display has 240 or 320 px long horizontal lines?


---------------
Greetings,
Carsten Meyer
www.keyboardpartner.de
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 02:39am 22 Jun 2013
Copy link to clipboard 
Print this post

Nice job Bovist, I reckon that size display for $20 would be great for a Caravan Battery Monitor. I'd like to see you post the mods - but who or what is "video.c".
Greg
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 03:18am 22 Jun 2013
Copy link to clipboard 
Print this post

@Bovist,

It has 240px lines.
I used the controller via I2C, but that means you can write to the screen and control it from Basic.
Much better and the goal i wanted is to have it connected through the RGB interface and just display it directly.
The datasheet, a huge one. I have a copy here:

ILITEK 9341

It probably will work the same as you did in principle the difference of course being the different resolution.

I just checked if the display i have still worked with the i2c and it does not.
I'll have to order another one. Maybe i blew it up, but then without blue smoke.


Microblocks. Build with logic.
 
TinkersALot
Regular Member

Joined: 20/11/2012
Location: United States
Posts: 72
Posted: 04:51am 22 Jun 2013
Copy link to clipboard 
Print this post

  bovist said  





If anyone is interested, I can post the mods to video.c (with permission on Geoff) and my schematics. This should also work with other TFTs, although horizontal resolution of 480 is best. The only drawback: You can't use Mode 4 acceptably since it has a different timing (screen is just smaller, rest is blank).




That would be very interesting. Would it be possible to get the "original file" with the edited one so that diff's could be analyzed. I think it could be very interesting to more than a few to have a "how to document" on how to alter the way the display works. The screen of any system is what the users see and so is one of the major sizzlers on the steak.
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 12:05pm 22 Jun 2013
Copy link to clipboard 
Print this post

Well done

That's a fantastic result
Would it be possible to post the complied hex file and a circuit diagram
This looks like the screen Ebay

That LCD connector looks rather small .5mm I think.
In an effort to make it easier for my old eyes I will be using one of these for my build. Breakout PCB
Unless Mick wants to make us a board with the LED driver included

Thanks

John

Edited by jman 2013-06-23
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 01:50pm 22 Jun 2013
Copy link to clipboard 
Print this post

Wow Carsten,

A fantastic addition for us Maximiters to get our teeth into.

Yes please post any further information you have.

I did a quick search for the LT1932 and they are around the $15 each (nearly the price of the screen).

If Geoff is willing, and the changes to the firmware is as simple as Carsten says, then maybe he would add to MMBasic an OPTION command such as OPTION TFT or similar to setup for a TFT module.

  jman said  
Unless Mick wants to make us a board with the LED driver included


HAHA Nice try John, I guess that you are saying a board similar to the breakout board with everything needed as well..

Problem is.... at $15 for the LT1932 and I saw the connector for the display at around $7 ... it would start to become an expensive board ... Then I would have to solder the connector on.... Hmmm interesting,, I wonder... Lets see how the cct pans out first and maybe myself or someone else can do something there..

Carsten, Do you think the timings can be changed to set a Mode 4 screen? I am thinking that It would be great as a little display for a product but the text would be too small for general use if you cant run in mode 4..

I also assume that there are cheap touchscreens that will fit this display as well?

Once again, great work Carsten,

Regards,

Mick








Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 01:54pm 22 Jun 2013
Copy link to clipboard 
Print this post

Cheaper screen from DX


Deal Extreme


John
 
bovist

Newbie

Joined: 21/06/2013
Location: Germany
Posts: 11
Posted: 02:10pm 22 Jun 2013
Copy link to clipboard 
Print this post

  bigmik said   Wow Carsten,

A fantastic addition for us Maximiters to get our teeth into.

Yes please post any further information you have.

I did a quick search for the LT1932 and they are around the $15 each (nearly the price of the screen).

Problem is.... at $15 for the LT1932 and I saw the connector for the display at around $7 ... it would start to become an expensive board ... Then I would have to solder the connector on.... Hmmm interesting,, I wonder... Lets see how the cct pans out first and maybe myself or someone else can do something there..


Mick, the LT1932 is about 3$ here in Europe (Farnell etc). The connector is even cheaper. I think I could make a board for 60$ including display.

Maybe this would make a great project for the magazine I work for (http://www.heise.de/hardware-hacks/)... so PCBs would be rather cheap.

---------------
Greetings,
Carsten Meyer
www.keyboardpartner.de
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2914
Posted: 03:18pm 22 Jun 2013
Copy link to clipboard 
Print this post

Hi Carsten,

  bovist said  
Mick, the LT1932 is about 3$ here in Europe (Farnell etc). The connector is even cheaper. I think I could make a board for 60$ including display.


I just did a quick ebay search on the chip and they were all around the $15 mark

In AUS RS components have them for $5.25 (+10% GST) Free shipping
Element14 (Farnell) have them for $5.70 (+10% GST) Free shipping only over $35 or so

So ebay sellers looking for a huge markup..

The connector I found last night whilst browsing for screens on my iPad... I cant locate them just now... Although I am sure they would be a lot cheaper than $7...

Carsten what is the actual connector spec for the PSP display?

I have just located these screen options:

Same as BOVIST $16.70US inc shipping

or, possibly (not quite the exact same but for a PSP 3000 but cheaper)

Similar - May be suitable $14.99US inc shipping

Or (If PSP 3000 is ok)

Ebay PSP 3000 $13.99 AU ($12.90US) Inc Shipping


Bottom line if the chip is only $6 or so and connector and ancillary parts only a few dollars a suitable adapter board could be made and assembled for about the $25-$30 mark I reckon... and including the display making a complete kit about $45-$50

  bovist said   Maybe this would make a great project for the magazine I work for (http://www.heise.de/hardware-hacks/)... so PCBs would be rather cheap.


Yes, I think it should be published there but I hope you produce an English version as well.

Regards,

Mick


Edited by bigmik 2013-06-24
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 761
Posted: 05:10pm 22 Jun 2013
Copy link to clipboard 
Print this post

Sweet... Just got a panel ordered. This would make a nice panel display for cheaper... I had no idea there was a unit you could interface so easy..! Thanks Bovist for the fine work..!
 
centrex

Guru

Joined: 13/11/2011
Location: Australia
Posts: 320
Posted: 05:56pm 22 Jun 2013
Copy link to clipboard 
Print this post

Can anyone tell me what the size of the screen is as I have never seen a playstation.
MM or inches does not matter.

Thanks
Cliff
Cliff
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 06:00pm 22 Jun 2013
Copy link to clipboard 
Print this post

  centrex said   Can anyone tell me what the size of the screen is as I have never seen a playstation.
MM or inches does not matter.

Thanks
Cliff


Sure take a look at the PDF 2013-06-23_040009_LQ043T3DX02.zip

Regards

John
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 06:55pm 22 Jun 2013
Copy link to clipboard 
Print this post

Isn't there any SPI controlled TFTs with suitable resolution?Edited by kiiid 2013-06-24
http://rittle.org

--------------
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 07:31pm 22 Jun 2013
Copy link to clipboard 
Print this post

@Kiiid

There are many SPI screens available.
Problem is changing the firmware.
I have connected a few as one of my Blox is a TFT module, as i have also some OLED Graphic and text.
I have a 2.8", 4.3" and 7" working with I2C.
For text it is doable, you still need to have a character generator (in software), for graphics like lines,circles, fills etc it is not. MMBasic has all those graphic features but they are not easily translated into I2C commands.
Can forget about sprites. It gets complicated very quick.
And MMBasic has already all these things build into the language. It would be a large waste if that can not be used.
Most TFT screens have a RGB interface which can be used if you have the timing right.
The ones i tested have 262.000 colors and they work on some other hardware i have.
I just got my new scope that is fast enough to figure out how the timings are.
And then this topic. :)

The 2.8" i have that will be the display 'blox' uses about 100ma on a single 3.3v.
It can get its power from the Maximite.
I estimated its cost including touchscreen, enclosure and connector so that it can be connected with the MM vga output around 25US$. Largely depending on how many i buy.
These things you not really buy with paypal. Wire transfer and shipping can be 50% of the costs.




Microblocks. Build with logic.
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 08:13pm 22 Jun 2013
Copy link to clipboard 
Print this post

I know :) It was rather a rhetorical question. However there are many options on the market right now and I don't think it would be practical or even possible to get them all built into the MMBasic. That's why I was pushing for externally executable code, so any driver for specific hardware would be possible to be loaded when it is needed only. Geoff has already implemented the MODULE structure which is a great step in this direction. I hope I will be able to take it a bit further later by adding to his code the ability to execute "pre-compiled" (let's call it so) code, so the provision of any driver will become really possible.

http://rittle.org

--------------
 
bovist

Newbie

Joined: 21/06/2013
Location: Germany
Posts: 11
Posted: 08:39pm 22 Jun 2013
Copy link to clipboard 
Print this post

Ok, I will post the .hex and schem when I'm back home.

  Quote  
That's why I was pushing for externally executable code, so any driver for specific hardware would be possible to be loaded when it is needed only. Geoff has already implemented the MODULE structure which is a great step in this direction. I hope I will be able to take it a bit further later by adding to his code the ability to execute "pre-compiled" (let's call it so) code, so the provision of any driver will become really possible.


Yes, but might be an overkill for the desired task. What should be possible easily is making the timing and resolution constants variable (like CONFIG VIDEO HOR VERT LINE...), also padding bytes on/off. This will fit most displays up to WQVGA, even those with portrait orientation.

For those "upright" displays it may be convenient to swap the x/y coordinates in the pixel setting C routine as well. I'm not shure if every graphic routine in mmbasic uses solely this routine, but if, it should be quite easy to change screen orientation.
---------------
Greetings,
Carsten Meyer
www.keyboardpartner.de
 
bovist

Newbie

Joined: 21/06/2013
Location: Germany
Posts: 11
Posted: 08:16am 23 Jun 2013
Copy link to clipboard 
Print this post

  bigmik said  
or, possibly (not quite the exact same but for a PSP 3000 but cheaper)

Similar - May be suitable $14.99US inc shipping

Or (If PSP 3000 is ok)

Ebay PSP 3000 $13.99 AU ($12.90US) Inc Shipping


Mick, these PSP 3000 types do not work since they have a totally different serial interface proprietary to Sony. I just found a datasheet - avoid them! Otherwise, any display up to 480px wide with digital 3x6 or 3x8 bit parallel interface (i.e. many pins) should work, maybe also some monochrome units. There are some older STN types out there with analog color inputs which also don't work with my scheme.

The PSP 1000 display seems to be an off-the-shelf type which is widely available by several manufacturers; I would go for this one on my PCB. I will speak to my distributor if he could make a pre-assembled kit with display connectors and PIC32 mounted. There should be also an alternative to the LT1932. LT makes great components, but they are rather pricey.

Also, I would like to invite Geoff to become an author for an article in our magazine - he won't get rich, but it's some nice pocket money. Unfortunately, I did get no response yet - maybe he's on vacation right now.

For those familiar with MPLAB C compiler here are my changes to Geoffs code in "video.c" source file:


// Parameters for PSP Display by C. Meyer
// Graphics is 480x272 pixels. This gives us 80 chars per line and 22 lines per screen
#define VGA_VRES 272 // 272 Vert graphics resolution (pixels)
#define VGA_HRES 480 // 480 Horiz graphics resolution (pixels)
#define VGA_LINE_N 286 // 286 number of lines in VGA frame
#define VGA_PIX_T 10 // 10 Tpb clock per pixel => 8 MHz, 125 ns
#define VGA_LINE_T 544*VGA_PIX_T // 544 clock cycles in a line (68 us)
#define VGA_VSYNC_N 10 // 10 V sync lines
#define VGA_VBLANK_N 14 // 14 Nbr of blank lines
#define VGA_PREEQ_N 2 // 2 Nbr blank lines at the bottom of the screen
#define VGA_POSTEQ_N 2 // 2 Nbr blank lines at the top of the screen
#define VGA_HSYNC_T 40*VGA_PIX_T // HSYNC width, 40 SPI clock cycles width horizontal pulse

// In Timer 3 interrupt service routine ...

void __ISR(_TIMER_3_VECTOR, ipl7) T3Interrupt(void) {

// ... remove/comment all 3 color paddings (only RED shown here):

// if(ModeC != 4) P_RED_SPI_INPUT = 0; // preload the SPI inputs with 4 zero bytes to pad the start of the video



That's it! (fortunately, 'cause I'm more into PASCAL programming). BTW: Does anyone know where to set the FINALBUILD define the right way? I'm a complete novice to MPLAB...

---------------
Greetings,
Carsten Meyer
www.keyboardpartner.de
 
     Page 1 of 3    
Print this page
© JAQ Software 2024