1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

ILI9341 TFT Display: switching Row/Column order

Discussion in 'Robotics & Mechatronics' started by poofjunior, Dec 18, 2014.

  1. poofjunior

    poofjunior New Member

    Joined:
    Jun 1, 2014
    Messages:
    13
    Likes:
    0
    Hi everyone,

    I'm driving an ILI9341 240 x 320 TFT display with an FPGA at ~100 MHz. (It works!)

    Right now, the display currently accepts data as 320 lines of length 240. I'm trying to stream a camera image from an OV7670, but the output of the camera is 240 lines of 320 (I think this is conventional). Does anyone know if there are settings on the ILI9341 that will enable me to switch the order of the writes?

    Thanks!

    Datasheet for the ILI9341
     
  2. Tony Stewart

    Tony Stewart Well-Known Member Most Helpful Member

    Joined:
    Aug 31, 2012
    Messages:
    3,151
    Likes:
    281
    Location:
    Richmond Hill , ON Canada near Toronto
  3. poofjunior

    poofjunior New Member

    Joined:
    Jun 1, 2014
    Messages:
    13
    Likes:
    0
    Thanks Tony!
    Crunching through that library and the datasheet answered my question. To switch the screen orientation, you must adjust the settings in the memory access control register (MADCTL). MADCTL is 0x36 in the ILI9341's memory. This is a great feature to know about, but the documentation is a bit spread out in the datasheet.

    Just to clear things up, I had to set:
    MADCTL to 0x20,
    CASET param 1 to 0x00,
    CASET param 2 to 0x00,
    CASET param 3 to 0x01,
    CASET param 4 to 0x3F,
    PASET param 1 to 0x00,
    PASET param 2 to 0x00,
    PASET param 3 to 0x00,
    PASET param 4 to 0xEF.

    Data is now output in landscape mode; i.e: the display accepts and displays 240 rows of length 320. (aka: normal 320x240)


    Here's a pic from the datasheet that indicates what I've done (pg 208):

    xyExchange.png
     
    Last edited: Dec 21, 2014
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. MatthewLentz

    MatthewLentz New Member

    Joined:
    Apr 22, 2015
    Messages:
    1
    Likes:
    0

    Why not just use a simple RC low pass, and ditch the op amp? Be aware an LM324 isn't rail-to-rail as well.
     
  6. Tony Stewart

    Tony Stewart Well-Known Member Most Helpful Member

    Joined:
    Aug 31, 2012
    Messages:
    3,151
    Likes:
    281
    Location:
    Richmond Hill , ON Canada near Toronto
    huh? the video isn't full scale analog and LPF destroys the signal. I think he wrote on wrong thread....

    This design reminds me of my design of the world's smallest TV in a headset circa Y2K long before Google Glasses.

    It was made my us (C-MAC) and we made 100 prototypes, called the M1 for Liquid Image. ( for Tony Havelka)

    Took it to COMDEX and beat MOT to the market with a product that worked. But $1k pricetag for proto at that time was high.

    I used my own sync design to capture VGA, TV or video from an ultrasonic monitor ( each somewhat different) using the microslice Kopin chip with Altera FPGA.

    The beltpack had buttons for moving the image X,Y offset and zoom, intended for industrial market with wearable 'puters or hog farmers who needed hands-free fetal inspection of livestock.
     
    Last edited: Apr 22, 2015

Share This Page