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. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi E and J,
    The module started showing MOSI after I cleaned it for the photo:rolleyes:
    Here's the circuit: (Test circuit that has been modified and re-worked)
    Here's the readout from #74 Zoomed in and out.
    The back light is on. My schematic shows connect the LIGHT PIN to GND. Previously on the 4x20 LCDs they had a POT for contrast, do these need a POT?
    18F and LF the same in this sense, noted.
    C.
     

    Attached Files:

  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi C,
    The Contrast is set in the Init code.
    Not sure what this means. The module started showing MOSI after I cleaned it for the photo
    Any signs of pixels??
    E

    SPICSOn
    SPISend 0x21 'extended cmds
    WaitUs 100
    SPISend 0xb8 'lcd contrast
    WaitUs 100
    SPISend 0x04 'temp coeff
    WaitUs 100
    SPISend 0x14 'lcd bias mode 1:40
    WaitUs 100
    SPISend 0x20 'lcd basic commands
    WaitUs 100
    SPISend 0x09 'lcd ALL pixels ON
    WaitUs 100
    SPICSOff
    WaitMs 1
    Return

    EDIT:
    As I do not have a 5110 on the bench I am using the d/s and the video that you posted as guidance.
     
  3. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,
    I saw the contrast in the program. I was double checking if LIGHT is correctly connected. I assume a POT there would be for brightness.
    The circuit didn't work (didn't show any signal on the MOSI analyser line) until I cleaned it this morning (Now MOSI showing). I had previously taken off the PIC, as there was a problem of tracking, because of the out of date solder paste.
    Only light show on the screen.
    My reading of the analyser readings, shows incorrect numbers, see what you think.
    C.
     
  4. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10
  5. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi,
    The vid says LIGHT is pulled low to swicth ON.
    E
    A004.gif
     
  6. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi,
    If your last image was the analyser, why do you think the readings are wrong.?
    E
    SPI_Bits.gif
     
  7. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,739
    Likes:
    713
    Location:
    Derbyshire, UK
    There are (at least) two entirely different types of the 5110 display module, the pin connections are completely different, and one needs HIGH for the LED's, the other needs LOW.
     
  8. dave miyares

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    2
    Likes:
    -10
  9. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,
    I'm out of practice reading my conversion chart, now I see it is correct.
    I just tried a different PCB with 18F2420 PIC and a different 5110. The analyser shows the same result. The 5110 also shows the same result of no pixels.
    C.
     
  10. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi Nigel,
    You appear to be more familiar with this 5110 LCD than I am, so perhaps it is a good time for you step and help the OP.
    Eric
     
  11. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,739
    Likes:
    713
    Location:
    Derbyshire, UK
    I've been keeping out because I've failed getting them to work again with the 16F1827 :D

    I had them working fine, and the 24F series as well - then I was struck by a ransom attack and lost all my source code since my last backup - including all the 5110 stuff :mad:

    So I started working on it again a while back, and while I've managed to get the 24F series working again, I've not managed the 16F1827 for some reason. It's currently waiting for me to 'get around to it', as I still don't know why it doesn't work.

    Funnily enough this last Sunday I built a couple of boards using Arduino 3.3V Pro Mini's mounted underneath 5110 displays, one of each of the two types I have. One is currently an ultrasonic range measure, the other a temperature gauge.
     
  12. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi Nigel,
    Thanks for the positive feedback, I guess I will have to get a couple of 5110's and see what I can do with Oshonsoft, to help the OP.:)
    I don't have any 24F series PIC's, mainly 18F types, will let you know how it goes.

    Hi C,
    As per my PM, you have assigned PORTA.5, twice in your program code, as SPI_CS and lcd_CS.

    That simple code I posted, where you can see all the SPI MOSI transfer data, should work OK, it is possible you have similar problem with the 18LF2520, as Nigel saw with the 16F1827.????

    E

    EDIT:

    Ordered some 5110. late Oct delivery.
     
    Last edited: Oct 11, 2017
  13. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    Sorry to hear you've been ransomed, I hope you didn't need to pay it. Reminder to me, must back up.
    Do your two types look like this:
    How do you tell the difference?
    It appears that you have both types working with Arduino.
    C.
     

    Attached Files:

  14. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Removed
     
    Last edited: Oct 11, 2017
  15. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi N and E,
    I have a pixel covered screen:)
    I'll just check, and add more to this message.

    EDIT:
    I'm not sure what I did, but I played around with 2520 and 2420 programs, telling the programmer the wrong one, and it started working. OR it could be some error I do.
    Anyway! Now the attached program works ok, but it didn't in the past.
    C.
     

    Attached Files:

    Last edited: Oct 11, 2017
  16. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi C,
    Good news.
    The next step is the Vid2.
    ie: writing a simple test msg to the lcd, will you be OK modifying my simple program or do you need input from me.?
    E
     
  17. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,
    I'll have a go first, but I may over complicate it again:eek:
    C.
     
  18. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi,
    While I have been waiting I did this..
    Should display 55/aa pattern repeated [vid2]
    E
     

    Attached Files:

  19. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi E,
    I'll have a go first, but I may over complicate it again:eek:
    C.
    Hi E,
    The screen shows a feint square of pixels, i,e faded, but no digits.
    What does vid2 mean?
    EDIT: At the start-up the faded screen comes on then a quick flash then the faded screen again, as if it's trying to show other than the faded screen.
    C.
     
    Last edited: Oct 11, 2017
  20. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,354
    Likes:
    650
    Location:
    Ex Yorks' Hants UK
    hi C,
    Vid2 is my lazy way of saying watch the uTube video number 2, following video #1, that you posted.:)

    The lcd should show alternate On/Off pixels as per video #2... I am stepping thru video 2 in order to confirm success at each step.
     
  21. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,739
    Likes:
    713
    Location:
    Derbyshire, UK
    No I didn't pay, so I lost everything back to my previous backup.

    You tell the difference by the pinout connections, they are completely different.

    Yes, the only difference (apart from the physical pin connections) if the polarity of the LED pin - assuming you're connecting the pin to an I/O port, then you just alter the polarity of the I/O pin accordingly.

    They both work equally well with Arduino, and I had both types working with PIC's happily as well.
     
  22. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,833
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    Glad to hear you were nearly backed up. A couple of days ago, I clicked an electric bill payment email, that I've never seen before. They shouldn't send something different without warning, so I've contacted them. Still waiting (3days)

    Eric's program got the screen full of pixels, so onwards and upwards.
    C.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice