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

PIC plus-5110 LCD-GPS-BMP280-HMC5983

Discussion in 'Oshonsoft' started by camerart, Mar 12, 2017.

  1. jjw

    jjw Member

    Joined:
    Apr 16, 2012
    Messages:
    327
    Likes:
    17
    Location:
    Helsinki, Finland
    The scaling value is angle of one degree in radians.
     
  2. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,
    There was nothing wrong with my 18LF2520 I retried your 'scrolling' program, and it works fine (So the PIC has enough memory).
    Excellent stuff, I can visualise many uses for it, as it makes a small screen larger.
    Thanks.
    C.
     
  3. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,418
    Likes:
    669
    Location:
    Derbyshire, UK
    Thank you for that, good to know :D
     
  4. dave

    Dave New Member

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


     
  5. camerart

    camerart Active Member

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

    Hi,
    I am changing PICs fro 18LF2520 to 18LF4520, because while redrawing the Schematic I realise that I will have to start again if I run out of PINs.

    NOTE: from now on all of the PIN outs will be different from above examples!
    C.
     
  6. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    Here is the 18LF4520 Schematic, with 5110, GPS,SX1278 radio module, and Barometer.
    Please check for errors.
    EDIT: I found errors so I will try again.
    C
     

    Attached Files:

    Last edited: Nov 19, 2017
  7. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Last edited: Nov 24, 2017
  8. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,
    I am testing the scrolling program on my latest PCB, with 5110 screen.
    The program is looking for the font1 with big2lcd inside, can you point to it please, while I search.

    EDIT: I found the big2lcd font1 at #145. I'm not sure if it is the scrolling program, but it compiles.

    C.
     
    Last edited: Nov 24, 2017
  9. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I've moved Eric's scrolling/large text program from 18LF2520 (which works) onto 18LF4520, but I can't get the screen to work.
    Here is the program and a digital scan. (PIN 4=RST and PIN5=D/C)
    Any ideas, please?
    C
     

    Attached Files:

  10. jjw

    jjw Member

    Joined:
    Apr 16, 2012
    Messages:
    327
    Likes:
    17
    Location:
    Helsinki, Finland
    In the program reset is in PortC Pin1 and D/C Pin0.
    PortC Pin0 is input.
     
  11. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi J,
    This is true, here's the Schematic.
    If I'm correct, are you referring to the digital scan not having the same settings? In which case, it has it's own settings, I just connect them according to each test. (Or am I misunderstanding what you mean?)
    Thanks.
    C.
     

    Attached Files:

    • SCH.jpg
      SCH.jpg
      File size:
      196.3 KB
      Views:
      19
  12. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    The CS on RD4 wasn't working.
    After lots of digital tests, I looked at DATA sheet and found reference to RD4 and a NOTE at the bottom, which showed that for RD4 to be output, it needs setting with LATD no PORTD, which I changed and it now shows working. (the screen is still not working) I've never used LAT before!
    I'll look again tomorrow.
    (Note the program on #188 is wrongly named 18LF2520, it should read 18LF4520)
    C.
     
    Last edited: Dec 4, 2017
  13. jjw

    jjw Member

    Joined:
    Apr 16, 2012
    Messages:
    327
    Likes:
    17
    Location:
    Helsinki, Finland
    I mean, if you are using the program #188, then the pins in the text in #188 don't fit with the pins in the program.
    I did not check the schematic.

    Edit: I did not notice, that you were referring the analyzer pins.

    Anyway in the program you have TRISC= %00000001 so PORTC.0 =D/C is an input pin but it should be output.
     
    Last edited: Dec 4, 2017
  14. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
     
  15. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Removed.
     
    Last edited: Dec 5, 2017
  16. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi J,
    Hurray! Got it going.
    I've corrected as many mistakes as I can, here is the program:
    Thanks for the help.
    C.
     

    Attached Files:

  17. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I notice that the 5110 screen varies between having a white screen with black letters, ok, to a black background. I also saw with another screen where there were lots of pixels all over the screen, but I did get that screen hot on one occassion.
    Here's an image of the screen, any ideas.
    I've got to the stage where I can at last look deeper into Eric's program, to understand it better.
    C.
     

    Attached Files:

  18. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,418
    Likes:
    669
    Location:
    Derbyshire, UK
    The settings are wrong, basically the contrast is too high, although there are a couple of other settings that give a similar effect.
     
  19. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    I notice that the 5110 screen varies between having a white screen with black letter, ok, to a black background. I also saw with another screen where there were lots of pixels all over the screen, but I did get that screen hot on one occassion.
    Here's an image of the screen, any ideas.
    I've got to the stage where I can at last look deeper into Eric's program, to understand it better.
    C.
    Hi N,
    I found the contrast comment in the program :) and now it has good contrast.
    Thanks C.
     
  20. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,632
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    Today it was poor again, I tried different settings, but couldn't correct it.
    I had read that sometimes the screens need bedding down, because of the 'rubber' contact strip not being seated. I found that if the frame and PCB are squeezed, then the rear tabs tightened, it has cure it.
    C
     
    Last edited: Dec 12, 2017
  21. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,350
    Likes:
    649
    Location:
    Ex Yorks' Hants UK
    ONLINE
    hi C,
    It is a common fault with LCD's, flexi-cable cable pressure contacts.
    Twist the rear metal tabs VERY carefully so that more pressure is applied along the contacts.

    You can easily modify your programs to use the hardware SPI in Oshonsoft Basic rather than the software version, much faster.
    E
    BTW:
    Now have the 9225 2.2inch TFT fully working using Oshonsoft Basic.
    If I can make a decent video, I will post to you tube.
    Using the 18F4520, 20MHZ xtal and the internal *4 PLL, the PIC is running at 80MHz, so the SPI clk is 20MHz.
     

Share This Page