JPLofLIL

Member Since: September 5, 2011

Country: United States

Profile

Spoken Languages

English / French

Programming Languages

Basic, Pascal, C

  • Product LCD-09396 | about 3 years ago

    This LCD worked well for me until it failed at about 5 hours run-time. I’m not very experienced with the Picaxe 18M2 but this program works for me … No responsibility accepted etc.
    pause 200
    setfreq m8 ‘needs to be fast enough for higher baud rates
    pause 1000
    serout C.3,T9600_8,(0x7c,150) 'backlight values 128-157
    pause 1000 '128=off 140=40% 150=73% 157=full on
    ’——————————————————————————-
    ‘NOW SETUP DISPLAY FOR FIRST TIME (then stored in EEPROM)
    serout C.3,T9600_8,(0x7c,4) 'display 16 wide =4
    pause 200 'display 20 wide =3
    serout C.3,T9600_8,(0x7c,6) 'display 4 lines = 5
    pause 200 'display 2 lines = 6
    ’——————————————————————————-
    serout C.3,T9600_8,(254,$01) ‘254 to send command - 01 clears display
    Pause 30 '30 is the minimum lag required for command to take effect
    '254,8 Hide display
    '254,12 Restore display
    '254,128 Move to line 1, position 1
    '254, y Move to line 1, position x (where y = 128 + x)
    '254,192 Move to line 2, position 1
    '254, y Move to line 2, position x (where y = 192 + x)
    main:
    serout C.3,T9600_8,(254,128) 'cursor to line 1 position 1
    pause 200
    serout C.3,T9600_8,(“ Hello !”)
    pause 200
    serout C.3,T9600_8,(254,192) '192 to goto start of line 2
    pause 200
    serout C.3,T9600_8,(“ Line 2”)
    pause 2000
    serout C.3,T9600_8,(254,$01) 'clear display
    pause 200
    goto main

No public wish lists :(