Shop OBEX P1 Docs P2 Docs Learn Events
4.3" Touchscreen Thread Consolidation Test - Page 5 — Parallax Forums

4.3" Touchscreen Thread Consolidation Test

1235

Comments

  • ry.davidry.david Posts: 63
    edited 2010-01-09 22:51
    Eagle library I created is attached... Please note that is this UNTESTED, and I will find out if it works this Friday
  • RaymanRayman Posts: 14,768
    edited 2010-01-11 17:44
    If you buy a product from me, you are free to use the code I post for it as you like as long as the copyright notice remains intact...
    I just wouldn't want somebody selling another display packaged with my code without an arrangement...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • hinvhinv Posts: 1,255
    edited 2010-01-18 21:12
    It would be nice if someone who knows how would make a display holder kind of like this:
    http://www.esky-sh.com/ebay_gallary/3.5/show2.jpg
  • ry.davidry.david Posts: 63
    edited 2010-01-19 01:44
    I got my proto board soldered up, and I realized I forgot to order some FTDI chips, so I can't do much until they get here. That 60-pin connector is a pain, but a whole bunch of desoldering braid later it looks okay lol.gif
    1940 x 1104 - 211K
    822 x 1437 - 101K
  • ForrestForrest Posts: 1,341
    edited 2010-01-28 01:33
    wjsteele said...
    Forrest said...
    Chuck at Mountain King Technologies replied with pictures of handsome bezels/cases - he just has to price them.

    Forrest, we won't believe you until you post them. wink.gif

    Bill

    OK - see two attached pictures

    Forrest
    3296 x 2472 - 1M
    3296 x 2472 - 1M
  • mctriviamctrivia Posts: 3,772
    edited 2010-02-03 02:49
    I hooked up a 4.3" LCD with mctrivia's breakout board. The display works great but I can't figure out how to get the touchscreen to work. Question: is PI on the breakout board the Touch IRQ pin?


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    yes PI is the touch interupt request. by default my breakout I2C is set to 11 instead of 00 like in rays exable code. IIRC you need to change the 8 to a B in the address to compensate.

  • RaymanRayman Posts: 14,768
    edited 2010-02-04 19:23
    The LCD driver is not derived from MIT code, but the I2C one probably is (but that doesn't affect my rights to my additions to that code).
    In any case, my only concern would be people selling a competing product and advertising my code for it, without an arrangement.
    If you're not selling anything using my code, I probably don't care, just ask that my copyright notice stays with the code...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Actually, I see that the regular VGA drivers (that some of my drivers are based on) are MIT now...

    I think this actually strengthens my rights though...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • RaymanRayman Posts: 14,768
    edited 2010-02-05 22:59
    Needing a serial terminal app for PSB, I've just adapted my old VGA window-form system for the 4.3" screen...
    It doesn't look too shabby, but I may have to shift to 8x16 font in order to show as much info on the screen as I'd like.

    Anyway check out this screenshot and test code:

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • GameHackerGameHacker Posts: 15
    edited 2010-02-12 14:00
    Wow, that is amazing! I agree with you on the font size though. I have seen many video drivers in the thread, and in my opinion the ultimate driver would have 60x17 tiles for a 8x16 font AND be able to do the 16x32 font, AND 2 bit color custom tile bitmaps.
    I think it would be benificial to have the two font sizes on this screen - for example, the smaller one for labeling a box or field, and the larger font showing the value. I tried to modify the 8x16 driver but I admit I have no idea what I am doing and the results were disastrous.

    Great work Ray!
  • nohabnohab Posts: 96
    edited 2010-02-17 20:56
    Hi,

    When trying the PSB_6bitDemo (from 2009.12.19 which I belive is the latest/only version) I'm getting "SD Failed to mount"
    However, when trying the PSB_6bitTest (from 2009.11.22) it works perfectly well (just a little flicker in the picture)

    Normally a later version works better but here, for me, it doesn't work at all.
    What's the differences between the versions and what can be wrong?


    nohab:· I just tried the version posted on this web page:

    http://www.rayslogic.com/Propeller/Products/PSB/PSB.htm

    and it worked, so try that.· But, it should be the same as the Demo one you have...·
    So, I don't really know what the problem could be.

    Is this a PSB board or your own setup with a breakout board?
    If it's a breakout board, you might want to check that you have the
    correct pins set for the SD card driver...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Rayman, the version on your website is the version that doesn't work for me.
    I bought your touchscreen and breakoutboard through Gadget Gangster, and the SD-card board is from GG to.

    In the older example, I just change the row
    if sd.mount_explicit(4,5,6,7)<0
    to
    if sd.mount_explicit(0,1,2,3)<0
    and the picture filename, and it works.

    Making the very same change in the new example does not work.


    Well, the PSB uses Prop Pin 2 for backlighting control....
    Check this line in the LCD driver to make sure it's been changed to the correct pin...
    CON
      'Here is where you define the pins you use to control the 4.3" LCD
      'PSB Pins
      '{
      BackLightPin=2
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hmm, strange, the PSB_6BitTest also uses pin 2 for background, and there it works?!?

    I'm having the same setup as you show on your web: http://www.rayslogic.com/Propeller/Products/PSB/PropPlatform_Breakout.JPG, (plus SD-holder at pin 0-3), so pin 2 shouldn't be involved in the LCD at all.

    Is it correct that BackLightPin can be the same as DisplayOnPin (=24 in my config)?

    Post Edited (nohab) : 2/18/2010 11:29:34 AM GMT


    Yes, you should change the driver so that both Backlight and DisplayOn Pins are both set to 24....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Yep, now it works, thanks Rayman !

    Here is the result, my favorite Loco (made by Nohab, of course) in 6-bit color

    I also made a demo of a touch controlled switch board (base on the Paint-demo)

    This is really an awesome LCD-display!

    Post Edited (nohab) : 2/18/2010 8:37:35 PM GMT
    800 x 460 - 352K
    800 x 469 - 239K
  • RaymanRayman Posts: 14,768
    edited 2010-02-17 22:43
    GameHacker said...
    Wow, that is amazing! I agree with you on the font size though. I have seen many video drivers in the thread, and in my opinion the ultimate driver would have 60x17 tiles for a 8x16 font AND be able to do the 16x32 font, AND 2 bit color custom tile bitmaps.
    I think it would be benificial to have the two font sizes on this screen - for example, the smaller one for labeling a box or field, and the larger font showing the value. I tried to modify the 8x16 driver but I admit I have no idea what I am doing and the results were disastrous.

    Great work Ray!
    GameHacker:· I was thinking this too...· I'll try to modify the 8x8 tile driver (for 8x16 font) so that it can show the ROM font too.·
    It seems like that should be easy...

    Maybe I should look for a good 8x8 font too...· I think OBC has one·in that C64 code...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-02-24 06:15
    Nohab,
    Can you explain to me how you displayed the graphic?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    It is only 6-bit-color. It's the only driver for this LCD I know about.
    The steps I did was:
    1. Choose a picture
    2. Crop and resize it to 480x272
    3. Download and run Rayman's Windows Application to turn a 480x272 image into required .dat file
    (Can be found at http://www.rayslogic.com/Propeller/Products/PSB/PSB.htm)
    4. Save the .dat file to a SD-card. This requires some kind of SD-reader/writer connected to the PC
    5. Move the SD-card to the SD-cardadapter connected to the Prop.
    6. Download the PSB_6-BitPhoto (same page as above)
    7. In PSB_LcdDriver_6bit, configure pins for LCD, I used
    BackLightPin=24
    DisplayOnPin=24
    PixelClockPin=25
    DataEnablePin=26
    TouchIrqPin=27
    NotUsedPin=31
    VgaPins=%010_111
    8. In PSB_6-BitDemo, configure pins for SD-card-adapter, I used: sd.mount_explicit(0,1,2,3)
    9. A few lines below, configure filename in sd.open
    10. Run !

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks Nohab for the walkthrough!

    Just some notes:

    If you use Photoshop and error diffusion, you can improve the appearance.

    There is some noticeable flicker using the 6-bit driver due to 11-Hz refresh rate.

    If you logo would look good in 2-bits (4 colors), then I have tv/vga 2-bit tools elsewhere on my website that can be used with the "regular" PSB driver to show graphics with no flicker.

    (I think maybe that's how Nohab did his other screen...)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    That was the least I could do after your support with my problems!

    You are quite right about my other screen, it's not very difficult to see traces from the Paint demo :-)

    I did a quick hack·to show the possibilities with the Prop in a Model Railroad Exhibition. What you don't see in the picture is that both turnouts and switches in the switch bord·are touch·controlled. Just a click on the symbols to toggle.

    However, I would like to understand the graphics better, can you point me to some documentation?
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-02-24 07:10
    Rayman: Just noticed you were looking for an 8x8 font. Here is AiChip's Atari font (think it's hippy's) which I am using in the 1-pin TV Text driver for SphinxOS.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
    · Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
  • Brian CarpenterBrian Carpenter Posts: 728
    edited 2010-03-01 05:54
    here is the logo that i want to use

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    It's Only A Stupid Question If You Have Not Googled It First!!
    1115 x 201 - 35K
    ATS.jpg 35.1K
  • RaymanRayman Posts: 14,768
    edited 2010-03-01 11:01
    Looks like 2-bit to me! Just use the regular driver, like with PSB Paint. You can use the 2-bit bitmap tools on my website
    to make a .dat file... I believe there's code in PSB Paint already to show 2-bit bitmaps...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • JonathanJonathan Posts: 1,023
    edited 2010-03-17 15:29
    Hi All,

    So, I've been playing with the display for a few days. My buddy Michael got his up and running too and is tickled pink.

    A few questions:

    Why· does the CLKFREQ have to be 80_000_000? I am using a 5mHz xtal on the protoboard.

    My first three touchY readings are always garbage. After that it's fine. It's always 3 readings of garbage. I've dug through my code and don't see any reason for that.

    Has anyone got a method for detecting slide touches? I thought that if I compared the X/Y readings at the touchdown and touchup events that would do it, but the touch up readings seem to bear little relation to each other. I have played with the figures in a number of ways, played with debounce timing, all sorts of stuff but can't seem to find a way to do it. I really want to get slides going to scroll through buttons.

    Thanks gents!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • RaymanRayman Posts: 14,768
    edited 2010-03-17 16:36
    Regarding the "garbage", I think you need to measure the "Z" to see how hard the screen is being pushed... The very first readings may be when it's barely being touched and does't give a good reading. At least, that's what I think is happening. That's why the "PSB_Paint!" app calculates "Z" to see if the reading is valid...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • RaymanRayman Posts: 14,768
    edited 2010-03-28 12:35
    I don't have very good documentation at this time but there's a lot if info in this thread.

    Also, there's info here:

    http://www.rayslogic.com/Propeller/Products/PSB/PSB_Display.htm

    http://www.rayslogic.com/Propeller/Products/PSB/PSB.htm

    The only tricky part is that HSync, VSync, and the Colors have to be in order and can only go to certain pins.· It's the same situation as with the VGA driver.

    The other signals can go to any pin.·

    Just make sure you change the pin numbers in the driver to match.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • JonathanJonathan Posts: 1,023
    edited 2010-03-28 20:30
    If anyone is interested, I have gotten slide detection working pretty well. I finally figured out that buffering the XY readings while waiting for the touch up event is the way to go. That way you can ignore the bouncy readings generated as the finger leaves the screen.

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • mikedivmikediv Posts: 825
    edited 2010-03-29 00:07
    Guys I made up two designs one I did with a Prop Stick USB to the Breakout Board the other was with the Prop Proto Board to Rays breakout board .I have Express PC as well as Eagle 5.0 Pro please let me know which one I should post I could do both if you guys want them but in the meantime here is what I did for the Prop Stick USB to Breakout Board Please note this will work just fine with the Paint Demo and the Graphics Demo Ray has posted. All the Pins labeled Prop -Pin are the actual pins from the prop chip itself .



    Prop Chip:: ::Break out Board J1 pin one is at the bottom with the board view from the top

    J1 Pin-1 goes to ground

    Prop-pin-29 goes to J1 SDA pin-2
    prop-pin-28 goes to J1 SCL pin-3
    **** J1 Gnd pin-4
    **** J1 VDD pin-5 I connected this to the 3.3V output of the Prop chip
    prop-pin-27 J1 IRQ pin-6
    prop-pin-25 J1 PCLK pin-7
    prop-pin-26 J1 DE pin-8
    prop-pin-23 J1 R1 pin-9
    prop-pin-22 J1 R0 pin-10
    prop-pin-21 J1 G1 pin-11
    prop-pin-20 J1 G0 pin-12
    prop-pin-19 J1 B1 pin-13
    prop-pin-18 J1 B0 pin-14
    prop-pin-17 J1 Hsync pin-15
    prop-pin-16 J1 Vsnyc pin-16
    prop-pin-24 J1 DON pin-17
    prop-pin-2 J1 BL pin-18
    **** J1 Gnd pin-19
    **** J1 VBL I tied this to the prop 3.3V output pin

    So I used the prop chips 3.3V output for both VDD and the VBL pin

    So to be as specific as I can the pins labled Prop pin are just that the prop pins to use J1 is the 20 pin connector on Rays breakout board
    I have had mine running this way for over 6 hours now the touch screen and everything is working just fine I hope this helps.. This works with all Rays posted code for the touch screen
    Guys I used a 20 pin connector as seen in photo this way I could use this for a solder less breadboard and then use a 20 pin ribbon female connector for a permanent project

    Post Edited (mikediv) : 3/29/2010 12:34:02 AM GMT
    2272 x 1704 - 1001K
    2272 x 1704 - 1001K
  • RaymanRayman Posts: 14,768
    edited 2010-03-29 10:18
    Chrome:· Actually, now that I think about it, I think I had to do it like this:
        lcd.str(snum.decf((i/100),1))
        lcd.str(string("."))
        lcd.str(snum.decx(i//100,2))
        lcd.str(string(" mA "))
    

    where snum is the "simple_numbers" object...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • RaymanRayman Posts: 14,768
    edited 2010-03-29 19:02
    Mike: There are instructions for doing your own photo posted somewhere deep within this thread.· They may be on my PSB product page too...

    For icon buttons, take a look at the PSB_Paint! code...

    For simpler text and buttons, look at the PSB_VGA_Demo...

    http://www.rayslogic.com/Propeller/Products/PSB/PSB.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • chrome sitarchrome sitar Posts: 8
    edited 2010-03-31 04:19
    Hi Ray.
    I've gotten this to work:
    PrintStr(fp.FloatToString(85.2))
    


    Where fp is the FloatString object. It also allows you to set the precision with fp.SetPrecision(x).
    I used Simple Numbers with my parallel lcds and that worked fine.
    Thanks.
  • chrome sitarchrome sitar Posts: 8
    edited 2010-03-31 16:00
    This also works, where "read" returns a floating point number-

    fp.SetPrecision(4)
    PrintStr(fp.FloatToString(read))
    



    Mike, load up PSB Paint to see ways to act on touchscreen inputs.
  • outrootoutroot Posts: 5
    edited 2010-04-04 18:14
    I just got the PSB LCD Board and I was wondering if it is possible to make the graphics full screen? Meaning, make the PSB_Graphics_Demo expand to a full 480x272 pixels or 30x17 tiles. I tried to do this myself and it seemed no matter what I did, I got garbage on the screen.
  • RaymanRayman Posts: 14,768
    edited 2010-04-04 18:50
    No way to easily do full screen graphics in 2-bit at full resolution...

    But, Ariba posted a couple drivers in this thread that do full screen graphics (I think I copied most of them to my website too.)

    One does 1-bit full screen at full resolution.

    Another does fat pixels to do full screen but half resolutiion in 2-bit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • outrootoutroot Posts: 5
    edited 2010-04-05 06:08
    Another question. Is it possible to hook up the LCD controller to the 0-15 pins of the platform module? It seems like it's expecting the data pins in a certain way, in which this way is reversed.
  • RaymanRayman Posts: 14,768
    edited 2010-04-05 14:00
    I don't think there's an easy way to use the lower pins on the Prop Platform. The driver could be modified, but that's a lot of work...
    Maybe you could flip the board upside down, but then the power connections wouldn't mate...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • LtechLtech Posts: 380
    edited 2010-06-14 20:19
    Question, how can I just replace a tv / vga output inside a program with PSB_LcdDriver to get the result on the 4.5"

    example change the GPS_VGA from obex to GPS_Lcd 4.5"
  • RaymanRayman Posts: 14,768
    edited 2010-06-14 23:53
    Take a look at the "PSB_VGA_DEMO" that you can download on this page:

    http://www.rayslogic.com/Propeller/Products/PSB/PSB.htm

    This is an example of how to modify a VGA app to use the 4.3" touchscreen...



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Apps:· http://www.rayslogic.com/propeller/Programming/Programming.htm

    My Prop Info: ·http://www.rayslogic.com/propeller/propeller.htm
    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
This discussion has been closed.