Shop Learn
New 4.3" touchscreen LCD for Propeller: "used" screens almost free w/purchase. - Page 23 — Parallax Forums

New 4.3" touchscreen LCD for Propeller: "used" screens almost free w/purchase.



  • pgbpsupgbpsu Posts: 460
    edited 2010-12-10 11:32
    Hi Harley-

    My project needs more than soft buttons to adjust the contrast. But I think with that as a working example I could build the rest. Handling buttons is something I've got a bit of experience with. Working with the display is where I'm totally lost. If you're willing to share/post the code you have for the 3.5" version it would be a great help. I'm very much a learn by example (and banging head against wall) person. Having some working examples will hopefully be all I need to get off square one.

    Activation energy can be non-trivial ; )

    Hopefully I can find some time this weekend to work on it.
  • HShankoHShanko Posts: 402
    edited 2010-12-10 11:34

    Even though this is the 4.3" thread, I'm including the archived file now for the 3.5" version using brightness control.

    If you click the lower-left tile, that should bring up some 'debug' variables left over; the source probably has others commented out during 'progress'. I found this debug scheme very handy, though somewhat limited area to display variable values AND still have some 'plot' area remaining useful.

    The items at the top, only the left and right ones were implemented to date. Just place holders for the two others.

    Anyone else finding this useful, you are welcome to make use of this.
  • pgbpsupgbpsu Posts: 460
    edited 2010-12-10 16:41

    Thanks for posting your code. It popped right up when I loaded it. I found your debug "button" in the lower left and I can get "Hold" to change to "Sweep" in the upper right. I can also get vertical lines by touching in the middle portion of the screen.

    This will help immensely. Many thanks.

    Looks like a very cool project you started. What's stopping you finishing it?

  • HShankoHShanko Posts: 402
    edited 2010-12-10 17:09

    Forgot to mention the 'cursors'. I couldn't resist not including them. Glad the debug button worked well. You'll see in the text lots of commented out other debug variables during development.

    I'm involved with a long drawn out project with another fellow. When there are lulls, like awaiting detail on the design, I go off to my projects. The 3.5" LCD I got when Rayman said he got hours of use as an exhibit. That sold me. PTP board and battery holder is a neat way to go. When there is time I have to work on the front end sensor and circutry; for detecting heart pulse signal. A hugely fun project and I learned a lot with this project.
  • HShankoHShanko Posts: 402
    edited 2010-12-11 16:22
    Rayman, or anyone else, Can the touchscreen ICs used with the 3.5 or 4.3" LCDs detect 'two finger touch' like I see in ads for Apple's iPad or iPhone?

    I'd assume not, from what I've tried on either screen. That probably is a more advanced IC. Probably has two of more scan directions to sense more than one touch point at a time, is my guess.
  • RaymanRayman Posts: 11,974
    edited 2010-12-11 18:29
    As I understand it, this type of simple resistive screen can't do multi-touch.
  • wjsteelewjsteele Posts: 697
    edited 2010-12-11 21:15
    Actually, there is a way to do it, but it involves a little work and the current touch controllers can't handle it. It can only detect two touch points, but is pretty easy to do. It's a matter of swapping between looking at the horizontal and then the vertical touch resistors and sweeping the signals across the screen from both sides to see if there is a touch point that is before (or after) the average of the total resistance for that axis. If it is, then the sweep from the left and the sweep from the top will reveal the first touch point and a sweep from the bottom and a sweep from the right will reveal the second point. If there is only one touch point, then both touch points will actually be at approximntely the same spot.

    I'm working on an experiment using the 4.3" LCDs to bring it to life.

  • HShankoHShanko Posts: 402
    edited 2010-12-12 12:55
    Re: multi-touch subject.

    I Googled and Wikipedia searched for 'multitouch' and quickly was immersed in much info on the subject. I therefore don't think the existing (Rayman) touchscreen LCD can do multi-touch, though I'd love to be proved wrong (again!). Much processing goes on behind the scene (screen) to make it possible.

    "How stuff works" used the iPhone to explain it. Terms like mutual and self-capacitance are used on the iPhone apparently. Different IC than Rayman uses. And 'our' LCDs from him are resistive screens. Would be interestng wjsteele if your experiment works. Best wishes for your efforts.
  • EaglemanEagleman Posts: 31
    edited 2011-05-12 10:46
    Do you still have access to the 4.3" screens?

  • RaymanRayman Posts: 11,974
    edited 2011-05-12 11:57
    I've asked for more of the "gently used" screens and was told the more would be sent soon. But, I'm a low priority and I don't know exactly when they'll come.

    Did mention that it would be nice to get some before the UPEW, but I don't really have any control over this supply line...

    I still have several of the "like new" ones that I reserve for PSB boards...

    Also, I've got a ton of the 3.5" displays...
  • RaymanRayman Posts: 11,974
    edited 2011-05-12 16:47
    Actually, I do have just one left. It works, but it has a noticeable scratch. Almost all the others were virtually perfect.
    Anyway, I can sell you that for 1/2 price ($9) if you want...

    Or, you just gave me an excuse to ping the supplier again, so maybe that'll help get more soon...
  • RaymanRayman Posts: 11,974
    edited 2011-05-13 05:56
    Ok, I've just heard that a couple hundred more lcds are on the way :)
  • wjsteelewjsteele Posts: 697
    edited 2011-05-13 13:28
    Rayman wrote: »
    Ok, I've just heard that a couple hundred more lcds are on the way :)

    That's awesome, Ray!!! :-) I don't know how many I've ordered from you in the past (maybe 50?,) but out of all of them, I've only had two with issues (one touch screen was not working and the other would not display all the Reds correctly (one pin was bad.)) I used them in Demo machines and have not had a single return on them.

    These screens work perfectly for making small GPS style devices. If you take the case I designed (made by Chuck over at Mountain King) and throw in a Gadget Gangster SD Platform board... backed by one of the Gadget Gangster/Rayman 4.3" Breakout Boards (Soldered directly back to back of the SD Platform)... add a battery and appropriate power connectors (DB9 in my case + switch) you wind up with a very nice looking little device. (See my VirtualHUD Wingman as an example - page 8 of the 2011 Parallax product catalog or here:

    I wrap the outter edge with a 1/16" foam padding (cut from 14" x 11" craft foam sheets) and use Acetone to glue the case together + Shoo Glue to affix the foam and you wind up with a very professional looking device.

    Total cost is around $125!

  • Cluso99Cluso99 Posts: 17,711
    edited 2011-05-13 22:14
    That's a nice looking product Bill :)
  • max72max72 Posts: 1,152
    edited 2011-05-16 05:30
    Awesome product indeed! The look is very professional.
    May I ask to see the not yet assembled case?
    I'm doing laser cut cases but they are not up to the par.
    I like the rounded edges combined with the foam.
  • RaymanRayman Posts: 11,974
    edited 2011-05-16 05:59
    Bill, any chance you have extra cases like that of the Wingman to sell?

    PS: Sorry you had a couple bad lcds. I test every single one (except sometimes for large orders). I don't know how yours slipped through...

    The new shipment of LCDs should be delivered today. That gives me a couple days to make a bunch of breakout boards for UPEW (most via Gadget Gangster).
  • WBA ConsultingWBA Consulting Posts: 2,927
    edited 2011-06-05 01:03
    Hey all!

    I have been rummaging through this thread to prepare myself to get two of these displays going for 2 unrelated projects. I have been struggling to capture all of the information scattered through the pages I started looking for a way to consolidate the vital information. I tried several methods to no avail and ended up copying the thread to the test forum. This enabled me to "clean up" the thread and narrow it down to the key information. Made the thread much easier to grasp.

    Anyhow, the compacted thread is here in the test forum for anyone to look through. This was also done as sort of a test to see if utilizing some of the forum's features will make long detailed threads more effective.
  • HShankoHShanko Posts: 402
    edited 2011-06-05 10:42

    Thank you for that 'work'. This size LCD w/touchscreen apparently is the same used in many GPS units, it appears. Handy for displaying considerable info yet small size. Even Rayman's 3.5" LCDs are very usable too, and a bit more thrifty on battery.
  • wjsteelewjsteele Posts: 697
    edited 2011-06-05 19:05
    Massimo, I've attached an internal view of my Wingman. (Note... the 4.3" that I am using in the production units is not Rayman's 4.3", but rather a Sony model that is electrically identical, but has the ribbon cable offset from the center.)

    Ray, Sorry, I don't have any extras right now... but I order them from Chuck over at Mountain King. He can whip you one up in any color you want.

    538 x 717 - 112K
  • RaymanRayman Posts: 11,974
    edited 2011-06-06 05:31
    Andrew, thanks, I think that will make it easier for people... Perhaps I should copy your link to the top post...

    There was a mix-up with the last LCD delivery, but I should be getting those LCDs today. This may be my last batch though, so I think I'll have to limit sales of LCDs without a breakout board...

    Bill, that case looks great. I'll definitely bug Chuck about them, thanks. I suppose I should also look into getting a supply of those new LCDs you found (since my supply is running low).
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-06-06 05:49
    @WBA consulting: If you want some tools to start with, on about page 18 of this thread there is this great GUI text driver someone has uploaded. It works great and it is what I use on my robot remote. I have written several elements (PUB functions) for it, including a menu screen and a touch keyboard. I also have all the different micro OS'es that I have made for it. It may be a good thing to build on.
  • WBA ConsultingWBA Consulting Posts: 2,927
    edited 2011-06-06 14:34
    @Micro: Post #524? Yes, that is one of my first targets to start with. It will basically end up being similar to a portable GPS form factor (touchscreen, battery power, USB and SD) but will also have Xbee on board.

    @Rayman: that might be a good idea. For long term, I will be looking at your 3.5" touchscreen or the 3.2" from 4D so that sourcing will not become a problem.
  • RaymanRayman Posts: 11,974
    edited 2011-06-07 09:22
    There was a mix up with my previous LCD delivery and what I got was more of the new 3.5" lcds.

    But, yesterday, I got a box of 100 more "gently used" 4.3" lcds.

    Sadly, I was informed that this is the end of the supply of these used LCDs.
    Now, so that I don't get stuck with a bunch of breakout boards, I'm only going to sell LCDs with a breakout board.

    Most of these will be the Prop Platform variety sold through
    I hope to get some of these out to there ASAP.

    I suppose I should look for alternate sources now... I have a few leads to check out...
  • WBA ConsultingWBA Consulting Posts: 2,927
    edited 2011-06-07 12:15
    Ray, I'll be looking to pick up three of the breakout boards since I have 3 screens without them. Since I'll be using my fun-fund, I have to wait until a few more of my M44D40+ modules sell, but anyhow, count me in for 3. The marketable project using this screen does not need to be available for sale until February so I have a bit of time to get things dialed in for a different display. (unless of course my pre-sale press release gets me inundated with orders...... one can hope!)
  • RaymanRayman Posts: 11,974
    edited 2011-07-26 13:33
    Some updates:

    We've just come up with code to use the Prop Platform 4.3" breakout on the lower row of pins.
    Example code is at the end of this thread:

    I'm near the end of the used screens. Many of the remaining screens have light scratches, but are fully functional.
    So, I'm now offering a used screen for free with breakout board or PSB purchase.
  • radialrandyradialrandy Posts: 78
    edited 2011-07-27 14:44
    Hey guys I need some help. I have one of Rays PSB's with the 4.3" display. Im useing the psb_graphicsdemo.spin. I have removed severl things out of the program. Im wanting to use it using graphics.spin to draw text, boxes, lines, ect on the full screen. What Im needing to know is how to change the psb_graphicsdemo.spin to make the main black box the full size of the screen so i can put text, boxes, lines, ect anywhere on the screen. Im thinking its in the 'inti tile screen and the 'start and setup graphics part of the program. But I have no idea.
    'PSB Graphics Demo (C) Copyright 2009, LLC
    'The Propeller Graphics Demo adapted for the PSB Screen
      _clkmode = xtal1+pll16x
      _clkfreq = 80_000_000
      'LCD is 480x272 giving 30x17 tiles
      cols = 30
      rows = 17
      screensize = cols * rows
    CON  'Constants for Graphics Demo 
      _stack = ($3000 + $3000 + 100) >> 2   'accomodate display memory and stack  
      x_tiles = 16
      y_tiles = 12
      paramcount = 14       
      bitmap_base = $2000
      display_base = $5000
      lines = 5
      thickness = 2
      long  lcd_status      'status: off/visible/invisible  read-only       (5 contiguous longs)
      long  lcd_enable      'enable: off/on                 write-only
      long  lcd_videobase   'video base @word               write-only
      long  lcd_colorbase   'color base @long               write-only
      long  lcd_backlight   'Used to control LCD backlight
      word  screen[screensize]
      long  col, row, color
      long  boxcolor,ptr
      byte  x[lines]
      byte  y[lines]
      byte  xs[lines]
      byte  ys[lines]
      lcd : "PSB_LcdDriver"  'Modified to drive 4.3" TFT
    OBJ    'Objects for Graphics Demo
      gr    : "graphics"
      mouse : "mouse"  
    pub Main
      'Start up Display
      'clear screen
      'start driver
      lcd_videobase := @screen
      lcd_colorbase := @vgacolors
      lcd_backlight:=3  '1=bright, 16=medium, 32=dark
      PrintStr(string("Leash Electronics"))
    PUB GraphicsDemo|i,j,k,dx,dy, kk, pp, pq, rr, numx, numchr,GraphicsColor 
      'init colors
      GraphicsColor:=16 'Using this color for graphics colors
      'Trying to sorta match the color gradient in the real version...
      vgacolors[GraphicsColor+0]:= $0CFC0000+%%0210_0000
      vgacolors[GraphicsColor+1]:= $0CFC0000+%%0210_0000  
      vgacolors[GraphicsColor+2]:= $0CFC0000+%%0210_0000  
      vgacolors[GraphicsColor+3]:= $0CFC0000+%%1210_0000  
      vgacolors[GraphicsColor+4]:= $0CFC0000+%%1220_0000     
      vgacolors[GraphicsColor+5]:= $0CFC0000+%%1220_0000  
      vgacolors[GraphicsColor+6]:= $0CFC0000+%%1120_0000  
      vgacolors[GraphicsColor+7]:= $0CFC0000+%%2120_0000  
      vgacolors[GraphicsColor+8]:= $0CFC0000+%%2130_0000  
      vgacolors[GraphicsColor+9]:= $0CFC0000+%%2030_0000  
      'init tile screen
      repeat dx from 0 to x_tiles - 1
        repeat dy from 0 to y_tiles - 1
          screen[(dy+GraphicsYOffset) * cols + dx+GraphicsXOffset] := display_base >> 6 + dy + dx * y_tiles +(GraphicsColor+dy)<<10'((GraphicsColor+dy) & $3F)<<10
      'start and setup graphics
      gr.setup(16, 12, 126, 96, bitmap_base)
        'clear bitmap
        'draw small box with text
        'draw incrementing digit
        if not ++numx & 7
        if numchr < "0" or numchr > "9"
          numchr := "0"
        'copy bitmap to display
        'increment counter that makes everything change
    PUB box(left,top,width,height) | x, y, i          
      ptr := top * cols + left
      repeat i from 1 to width
      repeat i from 1 to height
        ptr := (top + i) * cols + left
        ptr += width
      ptr := (top + height + 1) * cols + left
      repeat i from 1 to width
    PRI boxchr(c): i
      screen[ptr++] := boxcolor << 10 + $200 + c
    '' Print a character
    ''  $00..$FF = character
    ''      $100 = clear screen
    ''      $108 = backspace
    ''      $10D = new line
    ''$110..$11F = select color
    PRI PrintStr(stringptr)
    '' Print a zero-terminated string
      repeat strsize(stringptr)
    PUB print(c) | i, k
      case c
        $00..$FF:           'character?
          k := color << 1 + c & 1
          i := k << 10 + $200 + c & $FE
          screen[row * cols + col] := i
          screen[(row + 1) * cols + col] := i | 1
          if ++col == cols
        $100:               'clear screen?
          wordfill(@screen, $220, screensize)
          col := row := 0
        $108:               'backspace?
          if col
        $10D:               'return?
        $110..$11F:         'select color?
          color := c & $F
    ' New line
    PRI newline : i
      col := 0
      if (row += 2) == rows
        row -= 2
        'scroll lines
        repeat i from 0 to rows-3
    '      wordmove(@screen[i*cols], @screen[(i+2)*cols], cols)
        'clear new line
    '    wordfill(@screen[(rows-2)*cols], $200, cols<<1)
    ' Data
    vgacolors               long
                            long    $F00CF00C       'blue background with yellow letters
                            long    $F0F00C0C
                            long    $08A808A8       'green
                            long    $0808A8A8
                            long    $50005000       'blue
                            long    $50500000
                            long    $FC00FC00       'white
                            long    $FCFC0000
                            long    $FF80FF80       'red/white
                            long    $FFFF8080
                            long    $FF20FF20       'green/white
                            long    $FFFF2020
                            long    $FF28FF28       'cyan/white
                            long    $FFFF2828
                            long    $00A800A8       'grey/black
                            long    $0000A8A8
                            long    $0CFCC000      'Colors for Graphics
    spcl                    long    $30100020       'greenbox
                            long    $3C142828       'cyanbox
                            long    $FC54A8A8       'greybox
                            long    $3C14FF28       'cyanbox+underscore
                            long    0 [16]
    DAT 'data for Graphics_Demo
    vecdef                  word    $4000+$2000/3*0         'triangle
                            word    50
                            word    $8000+$2000/3*1+1
                            word    50
                            word    $8000+$2000/3*2-1
                            word    50
                            word    $8000+$2000/3*0
                            word    50
                            word    0
    vecdef2                 word    $4000+$2000/12*0        'star
                            word    50
                            word    $8000+$2000/12*1
                            word    20
                            word    $8000+$2000/12*2
                            word    50
                            word    $8000+$2000/12*3
                            word    20
                            word    $8000+$2000/12*4
                            word    50
                            word    $8000+$2000/12*5
                            word    20
                            word    $8000+$2000/12*6
                            word    50
                            word    $8000+$2000/12*7
                            word    20
                            word    $8000+$2000/12*8
                            word    50
                            word    $8000+$2000/12*9
                            word    20
                            word    $8000+$2000/12*10
                            word    50
                            word    $8000+$2000/12*11
                            word    20
                            word    $8000+$2000/12*0
                            word    50
                            word    0
    pixdef                  word                            'crosshair
                            byte    2,7,3,3
                            word    %%00333000,%%00000000
                            word    %%03020300,%%00000000
                            word    %%30020030,%%00000000
                            word    %%32222230,%%00000000
                            word    %%30020030,%%02000000
                            word    %%03020300,%%22200000
                            word    %%00333000,%%02000000
    pixdef2                 word                            'dog
                            byte    1,4,0,3
                            word    %%20000022
                            word    %%02222222
                            word    %%02222200
                            word    %%02000200
    pchip                   byte    "Leash Electronics",0           'text
  • RaymanRayman Posts: 11,974
    edited 2011-07-27 16:53
    Unfortunately, the Prop1 does not have enough memory to do full-screen, 2-bit graphics.

    There are a couple options:

    1. Use a smaller portion of the screen.
    2. Use only single buffering (like PSB_Paint) and not double buffering (like PSB_GraphicsDemo).
    - but you may not be able to do full screen, even with single buffering, not sure...
    3. Use monochrome graphics
    4. Use fat pixels (draw 4 pixels on the screen for every 1 pixel in memory).

    Andy has done drivers for these last two options, I think they're on my website somewhere...
  • radialrandyradialrandy Posts: 78
    edited 2011-07-27 20:27
    Well that sucks! :(
    Is there anywhere that explains how these programs work with lcd's. How the tiles works, bitmaps, memory? Forgive my ignorance but I would like to learn more. I try to desipher some of your programs to try to understand them but it gets complicated fast. lol
  • RaymanRayman Posts: 11,974
    edited 2011-07-28 06:07

    These LCDs work a lot like a VGA monitor, except with digital inputs instead of analog. But, they have the same style horizontal and vertical sync signals.
    In fact, the driver is just a very slightly modified version of the regular VGA driver from Parallax.

    The VGA driver also seems very complex at first, but you could start there...

    I also have a few 2-bit and 1-bit bitmap examples for VGA on my website that also work with these screens (as in the PSB_Paint example).
  • RaymanRayman Posts: 11,974
    edited 2011-07-28 06:08
    BTW: I think my smaller, 3.5" LCDs can do full screen 2-bit graphics because they have a lower resolution....

    BTW2: I am working on a new type of 4.3" screen that will allow full-screen, 18-bit graphics. But, that is probably a month away...
Sign In or Register to comment.