Author Topic: NHD-CO216AZ-FSW-GBW  (Read 1523 times)

mcarrier

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
NHD-CO216AZ-FSW-GBW
« on: February 05, 2016, 03:10:55 PM »
We are using this display in our design. It is connected to our custom board via GPIO that are being programmed by an application is linux user space. I am currently trying to test the display by setting and clearing the GPIO via a bash script. All I am trying to do is display a character on the display but so far I get nothing. I here is the script I am using.  Any thoughts would be appreciated.



#! /bin/bash

    echo "functionSet()"
# RS
    echo 0 > /sys/class/gpio/gpio67/value
# R/W
    echo 0 > /sys/class/gpio/gpio68/value

    echo 0 > /sys/class/gpio/gpio69/value
    echo 0 > /sys/class/gpio/gpio70/value
    echo 1 > /sys/class/gpio/gpio71/value
    echo 0 > /sys/class/gpio/gpio72/value
    echo 1 > /sys/class/gpio/gpio73/value
    echo 1 > /sys/class/gpio/gpio74/value
    echo 0 > /sys/class/gpio/gpio75/value
    echo 0 > /sys/class/gpio/gpio76/value
    usleep 1000
# toggle enable
    echo 1 > /sys/class/gpio/gpio65/value
    usleep 1000
    echo 0 > /sys/class/gpio/gpio65/value

    usleep 1000

    echo "displayOn()"
    echo 0 > /sys/class/gpio/gpio69/value
    echo 0 > /sys/class/gpio/gpio70/value
    echo 1 > /sys/class/gpio/gpio71/value
    echo 1 > /sys/class/gpio/gpio72/value
    echo 0 > /sys/class/gpio/gpio73/value
    echo 0 > /sys/class/gpio/gpio74/value
    echo 0 > /sys/class/gpio/gpio75/value
    echo 0 > /sys/class/gpio/gpio76/value
    usleep 1000
# toggle enable
    echo 1 > /sys/class/gpio/gpio65/value
    usleep 1000
    echo 0 > /sys/class/gpio/gpio65/value


    usleep 1000

    echo "clearDisplay()"
    echo 1 > /sys/class/gpio/gpio69/value
    echo 0 > /sys/class/gpio/gpio70/value
    echo 0 > /sys/class/gpio/gpio71/value
    echo 0 > /sys/class/gpio/gpio72/value
    echo 0 > /sys/class/gpio/gpio73/value
    echo 0 > /sys/class/gpio/gpio74/value
echo 0 > /sys/class/gpio/gpio75/value
    echo 0 > /sys/class/gpio/gpio76/value
# toggle enable
    usleep 1000
    echo 1 > /sys/class/gpio/gpio65/value
    usleep 1000
    echo 0 > /sys/class/gpio/gpio65/value

    usleep 1000

    echo "entryMode()"
    echo 1 > /sys/class/gpio/gpio69/value
    echo 1 > /sys/class/gpio/gpio70/value
    echo 1 > /sys/class/gpio/gpio71/value
    echo 0 > /sys/class/gpio/gpio72/value
    echo 0 > /sys/class/gpio/gpio73/value
    echo 0 > /sys/class/gpio/gpio74/value
    echo 0 > /sys/class/gpio/gpio75/value
    echo 0 > /sys/class/gpio/gpio76/value
    usleep 1000
# toggle enable
    echo 1 > /sys/class/gpio/gpio65/value
    usleep 1000
    echo 0 > /sys/class/gpio/gpio65/value

    usleep 1000

    echo "setting RS high"
    echo 1 > /sys/class/gpio/gpio67/value

    echo "setupDDRAM()"
    echo 0 > /sys/class/gpio/gpio69/value
    echo 1 > /sys/class/gpio/gpio70/value
    echo 1 > /sys/class/gpio/gpio71/value
    echo 1 > /sys/class/gpio/gpio72/value
    echo 0 > /sys/class/gpio/gpio73/value
    echo 0 > /sys/class/gpio/gpio74/value
    echo 0 > /sys/class/gpio/gpio75/value
    echo 1 > /sys/class/gpio/gpio76/value
    usleep 1000
# toggle enable
    echo 1 > /sys/class/gpio/gpio65/value
    usleep 1000
    echo 0 > /sys/class/gpio/gpio65/value

    echo "writeCharacter"
    echo 1 > /sys/class/gpio/gpio69/value
    echo 1 > /sys/class/gpio/gpio70/value
echo 1 > /sys/class/gpio/gpio71/value
    echo 1 > /sys/class/gpio/gpio72/value
    echo 1 > /sys/class/gpio/gpio73/value
    echo 1 > /sys/class/gpio/gpio74/value
    echo 1 > /sys/class/gpio/gpio75/value
    echo 1 > /sys/class/gpio/gpio76/value
    usleep 1000
# toggle enable
    echo 1 > /sys/class/gpio/gpio65/value
    usleep 1000
    echo 0 > /sys/class/gpio/gpio65/value

    echo "writeCharacter"
    echo 1 > /sys/class/gpio/gpio69/value
    echo 1 > /sys/class/gpio/gpio70/value
    echo 1 > /sys/class/gpio/gpio71/value
    echo 1 > /sys/class/gpio/gpio72/value
    echo 1 > /sys/class/gpio/gpio73/value
    echo 1 > /sys/class/gpio/gpio74/value
    echo 1 > /sys/class/gpio/gpio75/value
    echo 1 > /sys/class/gpio/gpio76/value
    usleep 1000
# toggle enable
    echo 1 > /sys/class/gpio/gpio65/value
    usleep 1000
    echo 0 > /sys/class/gpio/gpio65/value

    echo "writeCharacter"
    echo 1 > /sys/class/gpio/gpio69/value
    echo 1 > /sys/class/gpio/gpio70/value
    echo 1 > /sys/class/gpio/gpio71/value
    echo 1 > /sys/class/gpio/gpio72/value
    echo 1 > /sys/class/gpio/gpio73/value
    echo 1 > /sys/class/gpio/gpio74/value
    echo 1 > /sys/class/gpio/gpio75/value
    echo 1 > /sys/class/gpio/gpio76/value
    usleep 1000
# toggle enable
    echo 1 > /sys/class/gpio/gpio65/value
    usleep 1000
    echo 0 > /sys/class/gpio/gpio65/value