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

LCD SPI projects.

Discussion in 'Oshonsoft' started by camerart, Oct 15, 2017.

  1. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,242
    Likes:
    911
    Location:
    Rochdale UK
    Sorry about that... I used it for debugging and forgot to remove it!!
     
  2. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,366
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I've been working on a test PCB using 18LF4520 PIC (3.3V). If it's suitable can you use these pinouts please.

    If you're all in full flight and this isn't the time to change, I can change either the PCB or the pinouts later, so no problem.

    It has a 5110 connection, but any LCD that you are working on can be easily fitted.

    Note: the onboard Barometer module, will be changed to a BPM 280 which is mounted on a separate mini PCB.
    Note: The extra PINs are for connections on the other side of the PCB. (Hopefully, I will make double sided next time)

    EDIT: don't use these, there are errors with MOSI MISO.

    C.
     

    Attached Files:

    • SCH.jpg
      SCH.jpg
      File size:
      192.2 KB
      Views:
      9
    • PCB.jpg
      PCB.jpg
      File size:
      137.9 KB
      Views:
      10
    Last edited: Nov 16, 2017 at 3:56 AM
  3. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,242
    Likes:
    911
    Location:
    Rochdale UK
    Apologies Cam... We hijacked the thread for a tad!!!
     
  4. dave

    Dave New Member

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


     
  5. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,366
    Likes:
    11
    Location:
    Dorset UK.

    Hi I,
    Apologies absolutely not necessary, I'm enjoying all of the inputs.
    I have been concentrating more on the PCb, so not really keeping up with all of your efforts, but they look interesting.
    C.
     
  6. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,366
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I've spotted a few minor errors in the schematic, will correct later!
    C
     
  7. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,218
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi Nigel, Ian.
    Checked the SPI clock on the scope, it confirms 200nSec rate.
    Changed the SPI Func to a Proc as a ret value is not required on the 9225 TFT LCD
    Also replaced the call spi(xxx) in often used Proc's, to the actual SPI code.

    eg:
    ''''Call wr_spi8(color.HB)
    spi8 = SSPBUF
    SSPBUF = color.HB
    While Not SSPSTAT.BF
    Wend

    I appreciate this uses more code space, but it bypasses the clunky Oshonsoft Basic Proc code calls.

    Running the PIC alongside a Arduino UNO, doing screen colour fills, the PIC is now faster!!.

    E
     
  8. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,242
    Likes:
    911
    Location:
    Rochdale UK
    Should use a lot less code... Software SPI is quite a few lines...

    Whoops!! I see what you mean.. Duplicating the SSPBUF write!! You could use the old "GOTO" instead of duplicating the write!!

    P.S.... Also you could have a macro in assembly that does the write!!
     
    Last edited: Nov 15, 2017 at 2:21 AM
  9. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,366
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    Don't use the PCB @62, there are MOSI MISO errors.
    C.
     

Share This Page