Saturday 23 August 2014

LCD Master Board for Raspberry Pi

About a week ago I bought a board from Pridopia which can interface 16x2 and 20x4 LCDs or a Nokia 84x84 LCD screen. The latter came with the board with some instructions as to what software needed to be installed to dive it. Also there is a disk image containing everything on their web site. There are three variations of the image depending on which Pi board you own. Naturally I downloaded the B+ image and 'burned' it on a 8GB micro SD card.

All the examples shown use the Scratch programming program.

First thing to note is that the board catches on the extra USB ports on the B+ so it is advisable to use something, electrical tape or in my case a bit of cardboard to make sure nothing on the board makes contact with the metal USB ports. Also because of these the board does not fit fully flat on the GPIO pins but does work.

DSCN3217

My first attempt to get any text on the 5110 was a partial failure. There is an example program to show an RSS feed, providing the Pi has internet access. This worked but attempts to put my own text on the screen were a complete failure. It may have been that I was also letting the Pi update all its files, which can take ages, which was interfering with things.

I put it aside for a day and then had another attempt. Once the updates had finished things started to work as expected. I find the Scratch screen difficult to read. Others have noted the same. It is a pity that there seems to be no way to enlarge the text in that program. In the end, after much experimenting I had a working test program:

DSCN3215DSCN3208


The main thing I found out about the 5110: It is slow to respond and needed a pause between instructions otherwise they got mixed up. In the above program / script there is a WAIT 1 between each instruction which sends text to the LCD. This pauses one second.



After some experimentation I found the wait could be reduced to 0.3 seconds. Anything shorter than this caused corruption as instructions blended together.

Don't blame me for it showing 22th instead of 22nd. I just send the instruction 'date'. How it displays is decided by the inner working of the program code.

4 comments:

  1. Well done. I wouldn't have the skill or patience.

    ReplyDelete
    Replies
    1. I nearly gave up after a couple of hours. Things often go better after a break of a day or two.

      Delete
  2. will be interesting to see where this takes you.
    an aside - I am always tempted to say "secondy-second" for 22nd. Don't know why ...

    ReplyDelete
    Replies
    1. I have an idea or two for its use Wilma but it will depend how I get on with more complex programming.

      Delete