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 with 48x84 LCD screen

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

  1. camerart

    camerart Active Member

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

    Attached Files:

    Last edited: Oct 6, 2017
  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,187
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
  3. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,322
    Likes:
    11
    Location:
    Dorset UK.
    Hi Eric,

    Your posted page looks like a good start.

    I bought a couple as they look interesting and are smaller than the LCDs we've been using.

    I notice they can be used as an oscilloscope etc

    I've got quite a few things to do before these screen, but if you see any BASIC programming let e know.

    Thanks, C.
     
  4. dave

    Dave New Member

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


     
  5. camerart

    camerart Active Member

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

    Hi,
    I've searched for a data sheet for the screens, but none so far. The only information follows from Eric's suggestion, that it needs something like an Arduino to drive them. This is no good, as I'm trying to downsize. So, dustbin for the screens!

    Are there any other screens that will be substitute for this type of thing: http://www.ebay.co.uk/itm/20x2-Char...632401?hash=item281dcc7cd1:g:BzMAAOSwZQRYXPX4

    I've looked at the Nokia 5110, I think they may work with a small driver PIC? or any other suggestions for small screens for indication instead of LEDS that will hopefully show digits and using PICs.
    C.
     
  6. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    There are plenty of PIC's that will happily drive such displays, and plenty of PIC's that far exceed the capability of the Arduino's processor. Essentially all you need is more RAM and ROM, personally I'm using a 28 pin 24F series device to drive them.

    The problems are simply due to the large amount of memory required for the actual setting up of the display, and of the font table space required.

    The 5110 works no problem, as it's memory requirements are low, and they work with smaller devices such as the 16F1827. You've got plenty of memory, even including a full memory buffer for the device (basically you write to the buffer, then transfer the complete buffer to the display).
     
  7. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,322
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    That's good news, as I keep getting directed towards Arduinos at nearly every conversation.

    I looked on Ebay for 5110 but couldn't tell if they are complete e,g, screen plus driver board. Do you have a link please?

    I had a quick look at 16F1827 PICs and saw that they also come as surface mount, so quite small.
    Thanks, C.
     
  8. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    They are complete, and just need a few I/O pins and an SPI interface.

    I got mine from here:

    http://www.banggood.com/5110-LCD-Mo...-UNO-Mega-Prototype-p-86022.html?rmmds=search

    There's also some colour LCD's that claim to be 5110 compatible:

    http://www.banggood.com/1_44-Inch-S...Of-Nokia-5110-LCD-p-1116867.html?rmmds=search

    But please note that they are only pinout compatible (and not with the Bangood 5110's) they use a totally different driver chip and require lot's more memory, I've currently got one running on a PIC 24F.

    The reason you get pointed towards Arduino at every turn is simply because there's so many Arduino code examples out there, much of my C based PIC stuff I've converted from Arduino. It's often easier to change the Arduino examples than to work it out yourself from the datasheet :D

    As for the 5110 I unfortunately lost all my recent code :arghh:, and while I've got it back working with the 24F, I haven't got it on the 16F1827 again yet - it didn't work, I don't why, and I haven't had the time to delve deeper. Originally I developed the code on the 1827, then later moved it to the 24F - this time I couldn't get the 1827 to work, so tried on the 24F and it did?.
     
  9. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,187
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    hi C,
    I did not say:

    The only information follows from
    Eric's suggestion, that it needs something like an Arduino
    .

    I posted you a link that used an Arduino that maybe helpful as a starting point.

    I agree with Nigel, there a dozens of MCU/PIC's, that will drive your LCD, with suitable software.
    E
     
  10. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,322
    Likes:
    11
    Location:
    Dorset UK.
    Hi Eric,
    I only mentioned it because you sent me a link, nothing meant:)
    C.
     
  11. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,322
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    Are these the same? :http://www.banggood.com/1_44-Inch-S...Of-Nokia-5110-LCD-p-1116867.html?rmmds=search

    Do you think they will also work with the 16F1827, given time?

    Perhaps you could post your 24F code, although I have difficulties with 'C' No hurry!
    Cheers, C.
     
  12. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    That's the second one I posted the link to, that needs a LOT more memory.

    I think you'd struggle due to the high memory requirements, even just the setup of the display uses a lot of program space, and the fonts required take even more.

    It's a long way short of complete, but I do have it working to some extent - but not as well as the code I lost. Currently I'm playing with using it on a function generator, using a DDS chip - based on an AVR version I found on line (that also used a different larger display) - I haven't got the DDS part working yet, but the display and pair of rotary encoders are working.
     
  13. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,322
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    Regarding the link, I posted your link, as it got mixed up with this correct one: http://www.ebay.co.uk/itm/DIY-White...hash=item43ff060834:m:mSydK6nptVgrLDUbJnWRSig
    Is this better?

    There is no hurry for a program, I can look online, once I have one in a circuit. If I get stuck I can ask you again:)
    C.
     
  14. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    Yes that's fine, it's the same except for the blue backlight - they are normally available in either white or blue. Bear in mind the pin connections aren't always the same way round, check what they are on the exact one you have.
     
  15. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,322
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    Ok, good, Ill order a couple, thanks
    C
     
  16. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,322
    Likes:
    11
    Location:
    Dorset UK.
    Hi,
    As I only program in Oshonsoft BASIC, I have to search for programs, including other languages and pick the nearest to what I need.

    Here are some of the programs I've found for the screen project: You may notice that I've posted on another forum too.

    I need a dedicated SLAVE PIC for screen communications, which talks to the MASTER PIC that I will choose for any project.

    If we can select the best program or sections from the selection, this would be appreciated.

    Thanks to all of the program writers.
    Cheers, Camerart
     

    Attached Files:

  17. blinky465

    blinky465 New Member

    Joined:
    Mar 10, 2009
    Messages:
    22
    Likes:
    0
    Anything you can do with Arduino, you can do with a PIC! (and usually faster - execution-time-wise at least). There's no hardware out there that only works with AVR; its just that the Arduino community generate lots more code than you'll find for PICs (although it is often of "variable" quality).

    I've built a menu-system for the Nokia 5110 displays you mentioned (http://nerdclub-uk.blogspot.co.uk/2014/10/nokia-5110-screen-module-with-pic.html) and back in 2009 built a load of gadgets that used a colour LCD; for sending full-colour bitmaps to a display it might be worth considering saving the image data to (an external) eeprom, then drawing it to the screen as you read each byte - it means you get a visual "sweep" effect as your image is drawn to screen, but also means you don't need to store the entire image data in RAM before drawing.
     
  18. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    Very true, but certainly not faster using a 16F877 as in your example :D

    It's a useful chip, but much slower and lacking in lot's of memory compared to an Arduino.

    But if you move to similar sort of spec chips as the Arduino's use, such as 24 or 32 series PIC's, then you've got plenty of memory and speed as well.

    Although if you're wanting 'bang for your buck' it's hard to beat the cheap Chinese STM32 modules, as I've mentioned before.

    PIC's are still my favourite and device of choice though :D
     
  19. blinky465

    blinky465 New Member

    Joined:
    Mar 10, 2009
    Messages:
    22
    Likes:
    0
    I just happened to have loads of 877s floating around and it was the first one already on a breadboard! They do look pretty clunky these days!

    My current go-to PIC is a 16F1825/9. 32Mhz internal oscillator with 1Kb RAM, loads of onboard peripherals (inc cap sensing) and costing just 75p each makes them a pretty decent mcu. While not as much RAM as the atmega328 used by most Arduino boards, you're also not soaking it all up with unnecessary code in libraries. 32Mhz is not just twice as fast as a default Arduino (four times faster at battery voltages as 16Mhz is outside the 328 operating range at 3.7v) you're also not wasting 40-50 clock cycles with every i/o pin read/write!

    Arduinos are great for quick-n-dirty prototyping and getting things working with little effort. But for anything speed-critical (audio processing, display image control etc) or for product design (where robustness is important) I always prefer PIC. I've not looked at the STM32 modules - maybe will take a look when I get some free time....
     
  20. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,228
    Likes:
    641
    Location:
    Derbyshire, UK
    My 14 bit PIC of choice is the 16F1827, but they are a LOT slower than an Arduino and have only a fraction of the RAM and ROM of an Arduino - and while you can use them with a 5110 LCD, there's not enough RAM or ROM space for the larger LCD's.

    There's also the huge problem that the free versions of the XC compilers run EXTREMELY slowly and generate excessively large code, as they deliberately add lot's of spurious bloating to the code.
     
  21. camerart

    camerart Active Member

    Joined:
    Jun 12, 2008
    Messages:
    1,322
    Likes:
    11
    Location:
    Dorset UK.
    Hi N,
    First I'm going to try 16LF1829 in Oshonsoft, and see how we get on.
    I only need the minimum surface mount PIC to drive the LCD, so hopefully 16LF1829 should be ok.
    Thanks, C.
     
    Last edited: Apr 2, 2017

Share This Page