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

TFT LCD Projects/Ideas/Applications Open Discussion.

Discussion in 'Oshonsoft' started by ericgibbs, Nov 16, 2017.

  1. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,380
    Likes:
    920
    Location:
    Rochdale UK
    I have built the prototype..

    I'm getting 16.66Mhz SPI with no problems.... I have had to move to MODE1 ( low idle and clock on trailing edge )..

    As I have a 240 x 320 screen Update seems a tad slower than yours Eric.. I have the chip at 64Mhz on the internal OSC and PLL... so I can't go any faster!! I'm taking it home for Christmas so I can play and get a video done..
     
    • Like Like x 1
  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,319
    Likes:
    649
    Location:
    Ex Yorks' Hants UK
    hi Ian,
    That's a fair SPI rate.
    I found that the Arduino routines used Unsigned WORD's for the pixel settings, checking shows that the High Byte of the address Word is always 0x00.
    Passing a BYTE for X and Y Addressing [ a WORD for colour is required] saves a little time and memory space..
    Also IMO the additional external Calls within the Set Pixel procedure are time wasting, I have added the Code in these external Calls to to the Set Pixel procedure.

    If you are using Oshonsoft Basic.? check the operation of the RS232 serial HW UART, I had to Define the Clock as 60MHz, even though the actual internal clock was 80MZ, in order to get the correct division rate for the HW UART.

    E
     
  3. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,380
    Likes:
    920
    Location:
    Rochdale UK
    I Lied!! I have re-witten the LCD clear function and is now the same speed as yours...
    Nope!! Gave that up ages ago... MPLABC18!! I haven't started on the USART!! The pic18f26k80 has a second USART on the programming pins, So they are already exposed...
     
  4. dave

    Dave New Member

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


     
  5. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,319
    Likes:
    649
    Location:
    Ex Yorks' Hants UK

    hi,
    Using the PIC's onboard ADC, set for Byte output, ie: 0 thru 255 counts, using SetPixel, the 9225 LCD displays a very good 5Vppk 100Hz waveform.
    Lower ppk sine and triangular waveforms upto ~200Hz look OK.

    As the waveform pixel is set, the 'y' component [theADC output count] is also stored in a 250 long buffer.
    When the next waveform sweep occurs, the buffer is Read and the pixel set as Black just before the current pixel is set.
    This erases the 'old' plot one pixel at a time just before the new pixel is set.
    By using alternate colours for each sweep, it makes it easy to view the TFT/signal waveform.

    The X axis timing is set by a delay between plots and increments by one for each ADC reading.

    E
     

Share This Page