Soldering Nokia 5100 LCD directly to Espruino

Posted on
  • I ordered a Nokia 5100 LCD board with my Espruino and like the idea of having it soldered directly to the board as described in the tutorial.

    Just one question - in the tutorial you twist the DC & DIN pins (to get the DIN pin over A7 - SPI1 MOSI, leaving A6 available for the DC pin)

    Could the SPI MOSI & MISO have been swapped in SPI1.setup so that the pins didnt need twisted?

    i.e. SPI1.setup({ baud: 1000000, sck:A5, mosi:A6 }); Leaving A7 for the DC pin.

    (Hopefully I'm not posting too many questions - I'm trying my best to figure things out myself before asking!)

  • After a bit more reading I think I now understand - if specified the sck, mosi & miso options MUST always refer to a pin which is marked as being the sck, mosi & miso for that particular SPI.

    SPI1 can either use pins B3, B4,B5 or pins A5, A6, A7.

    SPI2 & SPI3 only have one set of available pins each.

    The purpose of specifying the pins in the tutorial was to ensure A6 was left unused by the SPI1 so that it could be used as a basic GPIO.

    I'm getting there gradually I think!!

  • One more option could be to use soft SPI, so you can use any pin of your choice.
    See http://www.espruino.com/Reference#SPI for more information.

  • As @JumJum says, if you don't care about hardware SPI, you can use 'software' SPI. You can then connect the LCD onto absolutely any pins.

    At the moment there aren't actually many downsides to soft SPI. It's not quite as fast, but for stuff like the monochrome LCD it really doesn't matter.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Soldering Nokia 5100 LCD directly to Espruino

Posted by Avatar for DaveNI @DaveNI

Actions