pmd3 32028 oled control
science_geek
Posts: 247
i am just trying to get the display to say Hello world, i am using a pmd3 "old school" display here is my code, when i hook up the display it is black at first, then it shows the splash, ive tried running my code at the beginning before the splash, and after it shows, nothing happens the first time, if i compile the code a second time the splash goes away and i get nothing but a blank screen
CON
· _CLKMODE····· = XTAL1 + PLL16X·······················
· _XINFREQ····· = 5_000_000
·
· ACK···· = $06········································ ' Acknowledge byte
· NAK···· = $15········································ ' Invalid command byte
· EN····· = 5·········································· ' Enable pin (Now used as Reset, Active LOW)
· TX····· = 6·········································· ' Transmit pin
· RX····· = 7·········································· ' Receive pin
VAR
· byte uSD_Sector[noparse][[/noparse]512]
· byte Dev_Info[noparse][[/noparse]5]
OBJ
· SERIAL· : "FullDuplexSerial"
· DELAY·· : "Clock"
·····
PUB START
·· INIT
·· DELAY.PauseSec(1)
· REPEAT
··· SETUP
··· TEXT
··· DELAY.PauseSec (2)
···
···
PUB INIT
· SERIAL.start (RX,TX,%0000,256000)
· DELAY.PauseMSec(100)
· ' Initialize OLED
· SERIAL.rxflush
· DELAY.PauseMSec(20)
· SERIAL.tx ("U")
· WAITACK
· DELAY.PauseMSec(20)
· ERASE··
PRI WAITACK | temp
· 'DELAY.PauseMSec(10)
· REPEAT··
··· temp := SERIAL.rxtime(1500)
··· if (temp == ACK)
····· quit
··· else
····· SERIAL.rxflush
PUB SETUP
· ERASE
· DELAY.PauseMSec(20)
· BACKGROUND (0)
PUB BACKGROUND (COLOR)
· SERIAL.tx ("B")
· SERIAL.tx (COLOR)
· WAITACK
·
PUB ERASE
· SERIAL.tx ("E")
· WAITACK
PUB TEXT
· SERIAL.tx ("S")
· SERIAL.tx (1)
· SERIAL.tx (1)
· SERIAL.tx (1)
· SERIAL.tx (255)
· SERIAL.tx (55)
· SERIAL.tx (0)
· SERIAL.tx (10)
· SERIAL.tx (50)
· SERIAL.tx (string("hello world"))
· SERIAL.tx (0)
CON
· _CLKMODE····· = XTAL1 + PLL16X·······················
· _XINFREQ····· = 5_000_000
·
· ACK···· = $06········································ ' Acknowledge byte
· NAK···· = $15········································ ' Invalid command byte
· EN····· = 5·········································· ' Enable pin (Now used as Reset, Active LOW)
· TX····· = 6·········································· ' Transmit pin
· RX····· = 7·········································· ' Receive pin
VAR
· byte uSD_Sector[noparse][[/noparse]512]
· byte Dev_Info[noparse][[/noparse]5]
OBJ
· SERIAL· : "FullDuplexSerial"
· DELAY·· : "Clock"
·····
PUB START
·· INIT
·· DELAY.PauseSec(1)
· REPEAT
··· SETUP
··· TEXT
··· DELAY.PauseSec (2)
···
···
PUB INIT
· SERIAL.start (RX,TX,%0000,256000)
· DELAY.PauseMSec(100)
· ' Initialize OLED
· SERIAL.rxflush
· DELAY.PauseMSec(20)
· SERIAL.tx ("U")
· WAITACK
· DELAY.PauseMSec(20)
· ERASE··
PRI WAITACK | temp
· 'DELAY.PauseMSec(10)
· REPEAT··
··· temp := SERIAL.rxtime(1500)
··· if (temp == ACK)
····· quit
··· else
····· SERIAL.rxflush
PUB SETUP
· ERASE
· DELAY.PauseMSec(20)
· BACKGROUND (0)
PUB BACKGROUND (COLOR)
· SERIAL.tx ("B")
· SERIAL.tx (COLOR)
· WAITACK
·
PUB ERASE
· SERIAL.tx ("E")
· WAITACK
PUB TEXT
· SERIAL.tx ("S")
· SERIAL.tx (1)
· SERIAL.tx (1)
· SERIAL.tx (1)
· SERIAL.tx (255)
· SERIAL.tx (55)
· SERIAL.tx (0)
· SERIAL.tx (10)
· SERIAL.tx (50)
· SERIAL.tx (string("hello world"))
· SERIAL.tx (0)