Shop OBEX P1 Docs P2 Docs Learn Events
Graphic Display Driver — Parallax Forums

Graphic Display Driver

mynet43mynet43 Posts: 644
edited 2011-08-24 14:31 in Propeller 1
Is there a driver available for a cell-phone type graphic display, similar to this 320 x 240 color display:

http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=en&site=US&KeyWords=NHD-2.4-240320SF-CTXI%23-1-ND&x=17&y=15

The display doesn't have a built-in character display, so it looks like it would be similar to a video type driver.

Thank you for your help.

Jim

Comments

  • RaymanRayman Posts: 14,876
    edited 2011-08-23 10:13
    Displays like that one usually have a controller chip, so it wouldn't be a video driver.
    But, it probably is a lot like my PSM. I think I still have drivers for that on my website.
    Feel free to modify and use those drivers for personal use...
  • mynet43mynet43 Posts: 644
    edited 2011-08-23 10:36
    Hi Ray,

    Thanks for getting back to me. I was beginning to think no one would.

    I'll take a look at your drivers to see if they'll work. I'm also looking at a similar graphics display that claims to be QVGA. If so, I'm hoping to be able to drive it by modifying one of our video drivers.

    http://www.sii.co.jp/components/custom/productListTftEN.jsp

    Any help still appreciated.

    Jim
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-08-23 11:04
    This kind of displays with this kind of controller have some RAM on board, which you simly have to fill up to display something.

    You can search for tripp in the forum. He has a driver for the ILI controller. But videos show that the driver is pretty slow.
    You can also search for SPFD. You'll find a driver written by myself for the SPFD. But I compared the specs of the ILI and the SPFD a while ago and I think it should work with no or little changes in the initialization. The init-function of the driver is generic and you only have to feed it with the right byte-sequence.

    My driver works together with FSRW (the SD-card driver) and can load full resolution images saved on SD card as BMP file in a few 100 ms. You cand draw lines, write text and icons ....
  • mynet43mynet43 Posts: 644
    edited 2011-08-23 11:55
    MagiO2,

    Thanks for the info. I'll search for SPFD to see what I come up with.

    Is this for a QVGA device or something else?

    Jim
  • RaymanRayman Posts: 14,876
    edited 2011-08-23 12:28
    tripp actually used my drivers (with permission)...
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-08-23 12:41
    Ok ... don't know what version you can find here, so here is the latest version

    I think you can not easily use the test-program itself, because it needs some preparation, but you can see how to use the driver.
  • mynet43mynet43 Posts: 644
    edited 2011-08-23 13:07
    MagIO2,

    Thanks for your link. I'll take a look at it.



    Rayman,

    Do you have a link to your drivers? Also, you said 'with permission'. Does your code have restricted use?

    Thanks for all the help.

    Jim
  • RaymanRayman Posts: 14,876
    edited 2011-08-23 16:28
    Jim,

    You can find the stuff here:
    http://www.rayslogic.com/Propeller/Products/PSM/PSM.htm

    My drivers are copyrighted, but mostly to help deter people from using my own code to sell products that directly compete with my own...
    My only request for personal use is that you leave the copyright notice or some acknologement of where the code came from in the file if you post it somewhere.
  • mynet43mynet43 Posts: 644
    edited 2011-08-23 16:44
    Hi Ray,

    Thank you for the link. It makes it easier to track down the right version.

    I'll be happy to leave your Copyright notice in your software. My application is totally unrelated to anything you're doing. I don't intend to post it anywhere.

    Thanks again.

    Jim
  • mynet43mynet43 Posts: 644
    edited 2011-08-24 07:33
    @Ray,

    I've been looking at the drivers everyone has suggested. I have a few questions about your PSM_TV driver.

    1. The display I will be using uses the ILI9340 driver chip.
    http://search.digikey.com/scripts/DkSearch/dksus.dll?lang=en&site=US&KeyWords=NHD-2.4-240320SF-CTXI%23-1-ND&x=22&y=19

    Your routine refers to the ILI9325.
    Do you know if the code will work for the 9340? Or do I need to research it further.

    2. I noticed you use a DAC chip to control the backlight of the display. Would this work as well with a DAC output pin from the Propeller?

    3. In your driver routine you define the pin numbers in a CON section. Then in a DAT section below you define pin masks for these pins. I noticed you abandoned the generalization of using the pre-defined pin numbers and instead defined absolute masks in the DAT section.

    I did some experimenting and discovered your frustration with trying to define the inverse mask.

    In the DAT section, if mask1 is:
    mask1 long 1<<PinCSn
    

    Then you would think the inverse mask0 would be:
    mask0 long !mask1      ' OR
    
    mask0 long $FFFF_FFFF-mask1
    

    Neither of these work, I believe they both give $FFFF_FFFF, hence the frustration:)

    After much experimentation, I finally discovered something that works:
    mask0 long !(1<<PinCSn)     ' MUST have parentheses
    

    This seems to give the right value every time. Since I'm using different pin numbers, I think I'll change it to work this way.

    I thought this might be of general interest.

    Thank you for all the help.

    Jim
  • RaymanRayman Posts: 14,876
    edited 2011-08-24 07:56
    In the beginning, I made a mask and an inverse-mask...

    But now, I've found the "andn" instruction and realize that I can use the same mask to set or clear a pin...

    I don't know if the two ILI chips are compatible. They probably are. But, you should see if you can find some C code for the initialization.
    Almost all displays like this need special initialization. The display manufactures almost always supply reference C code for this...
  • mynet43mynet43 Posts: 644
    edited 2011-08-24 08:07
    Hi Ray,

    Good morning. Thanks for the quick response. I agree about using andn.

    Would you please check one more thing for me?
    In the driver DAT section, variable diralcd is defined with bits 16 thru 23 off.

    Is this correct? I'm not sure whether to believe the code or the comment, which says to use wordmask1, which would have the bits on.

    Thanks again for all the help.

    Jim
  • RaymanRayman Posts: 14,876
    edited 2011-08-24 13:58
    I'm using an 8-bit interface...

    The pins used are given here:
    diralcd long %00001111_00000000_11111111_00000000

    So, the data bus is on P8...P15 and the control lines are on P24..P27
  • mynet43mynet43 Posts: 644
    edited 2011-08-24 14:31
    Hi Ray,

    Thanks for the clarification. I should slow down and read the code more carefully.

    Thank you again for the help. I should have the display in a day or two, then it should get interesting.

    Jim
Sign In or Register to comment.