​ ​ ​ ​ bitbang Nokia 5110 LCD with 14M2
Results 1 to 7 of 7

Thread: bitbang Nokia 5110 LCD with 14M2

  1. #1
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,732

    Default bitbang Nokia 5110 LCD with 14M2 and 20M2 20X2

    I modified (simplified) matherp's code for controlling the Nokia 5110 LCD module with HSPI to make it work with bitbanging on the 14M2 (and removed all his cool text formatting and bar graphing code).

    I realized that if I rearranged the pin definitions in the program, the 5110 would directly plug into an 14M2 single-inline-pin PCB I had made.

    Here's the SIP board and module plugged in. The 14sip pcb is entirely concealed by the LCD.

    14M2-Nokia5110-LCD.jpg

    The code is attached. Module sold here ($2.26US): http://www.ebay.com/itm/New-84-48-LC...UAAOSwT5tWHMxT

    Matherp's post is here: http://www.picaxeforum.co.uk/showthr...5110-revisited

    My Eagle 14sip board design is here: http://www.picaxeforum.co.uk/showthr...agle-PCB-files

    I didn't connect the "backlight" leds (which aren't backlighting, and don't help much to my mind). Note that the contrast setting is critical, and depends on the particular module you use. I soldered a right-angle header on the underside of the board to give access to C.0-C.3, and another for power. B.0 is available for sertxd and any other use.

    This effectively makes for an 08M2 with display module. The same pin types and number of pins are available--B.0 as output, C.3 as input, C.0, C.1, and C.2 as input/output. More I/Os would be available with a 20M2.
    Attached Files Attached Files
    Last edited by lbenson; 25-02-2018 at 21:11.

  2. #2
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,732

    Default

    Untested, so I hope it works, here are Eagle schematic and pcb layouts for 20sip board for 20M2 and Nokia 5110, just sent off to oshpark.com.
    20M2-Nokia5110-LCD.jpg
    Eagle files here, post 8: http://www.picaxeforum.co.uk/showthr...agle-PCB-files

  3. #3
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,732

    Default

    Reserved for the results of 20sip_LCD1.brd testing (in several weeks when the boards get back from Oshpark).

  4. #4
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,732

    Default

    I never got back to that 20sip_LCD1.brd 22 months ago. When I did, I wanted a DS3231 module as well as the LCD, and that didn't work with the LCD on port B, so I switched it to port C.

    20LCD_RTC_Eagle.jpg

    20LCD_RTC_2.jpg

    The add-on modules stack nicely, with the DS3231 fitting above the 20M2, and the Nokia 5110 LCD fitting on top of that (I had female headers with long legs to elevate the LCD--normal female headers wouldn't work.

    I modified the code so that by setting or commenting out the "#define M2" line either a 20M2 or a 20X2 would work. The 20X2 would of course be faster if you used HSPI, but the pins conflict with I2C. As before, the code follows matherp, hippy, and srnet.

  5. #5
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,732

    Default

    As before, I used Oshpark to have the boards made--$7.40 for 3.

    20LCD_Nokia5110.jpg

    nokia5110_DS3231.jpg

    The LCD is available here for $2.28 U.S.: https://www.ebay.com/itm/LCD-Display...s/323038223415

    The red version with two sets of identical connectors will work, but you have to make sure you plug it in the right way. The backlight only works with the jumper next to the header for the LCD. The 180R, if it is installed, must go on the bottom and must be soldered first before the 20-pin socket covers the through holes. Note that unless things have changed, the "3V-5V" on the blue board is untrue--use 3V only--5V fried it in my experience two years ago.

    The DS3231 for $1.25 U.S.: https://www.ebay.com/itm/1pc-DS3231-...i/251544821678
    Last edited by lbenson; 25-02-2018 at 19:16.

  6. #6
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,732

    Default

    The Eagle CAD schematic files are attached. Remove the ".txt" file extension to get the ".sch" and ".brd" files.

    The ".brd" file can be sent directly to Oshpark. Turnaround was 14 days.
    Attached Files Attached Files
    Last edited by lbenson; 25-02-2018 at 21:24.

  7. #7
    Senior Member
    Join Date
    Jan 1970
    Location
    Nova Scotia, Canada
    Posts
    2,732

    Default

    The basic file is too big for a post. Here it is zipped.

    The current time from the RTC is updated every minute on the first line of the LCD. The time power was applied is shown on the third line.

    I have used the program for timing how long a UPS lasts with various things attached, and how long a 12V battery lasts. If B.2 is high when the program starts, the program monitors that for going low, and if it does, the time that occured is shown on the 5th line. I tried to put the battery voltage on the 6th line, but something I did causes the LCD to shut off when I call that, so I omitted it--a problem for future attention.

    The LCD and the RTC are both powered from PICAXE pins--C.0 for 0V and C.1 for 3V. Not setting those upon initialization will cause the RTC to not work. Control of the sequence for applying power to the LCD is required upon startup, so it can't just be connected to the board power.

    Downward pointing header pins on the B port would allow B.0, B.1, B.3, B.4, and B.6 to be used. C.6 is not brought out.

    The resistors, 10K, 22K, 4K7, and 4K7 are 1/6 watt, and the 4K7 ones are vertically mounted.
    Attached Files Attached Files
    Last edited by lbenson; 25-02-2018 at 19:30.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •