I dont understand how to access the variables in ssd1306 include.
I am not sure if I need to use as alias, it's a major block for me and clarification would be a great help,an example fab. I want to write a byte to the display. When I sort that then other things.
Here's my write byte to display. Please say what I doing wrong. I'm running out of logic/ideas. A few tips would be so helpful.
edit I think maybe sending 64 meaning data to follow is wrong and perming 8 from 10 didn't work,ie try different code.
The glcd works fine and in the program clears screen and prints test it not writing a byte though, well not on display.
I changed the write sub but no joy. On a picaxe this was easy to make a lib but same code is not working with GCB. Trying to do a sprite routine but can't write 1 byte. doh! Ta anyway.
this works in picaxe and want to convert to GCB
ClearDisplay: ;clears oled screen
hi2cout (0,SSD1306_PAGEADDR)
hi2cout (0,0) ;set row=0
hi2cout (0,7)
;
hi2cout (0,SSD1306_COLUMNADDR)
hi2cout (0,0) ;set column=0
hi2cout (0,127)
;
for ptr=0 to 1023
hi2cout (64,0)
next ptr
;
return
Now GCB,oh dear,dim workio
sub write_byte ;writes byte to display at row and px co-ord
writebyte SSD1306_PAGEADDR
writebyte row
writebyte 7
writebyte SSD1306_COLUMNADDR
writebyte px
writebyte 127
; writebyte 64; writebyte spritebyte
HI2CStart
HI2CSend GLCD_I2C_Address
; HI2CSend 0x00
HI2CSend 64
HI2CStop
;
HI2CStart
HI2CSend GLCD_I2C_Address
; HI2CSend 0x00
HI2CSend spriteByte
HI2CStop
end sub
Last edit: stan cartwright 2017-08-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I dont understand how to access the variables in ssd1306 include.
I am not sure if I need to use as alias, it's a major block for me and clarification would be a great help,an example fab. I want to write a byte to the display. When I sort that then other things.
Here's my write byte to display. Please say what I doing wrong. I'm running out of logic/ideas. A few tips would be so helpful.
edit I think maybe sending 64 meaning data to follow is wrong and perming 8 from 10 didn't work,ie try different code.
Last edit: stan cartwright 2017-08-07
I don't have a GLCD Display to test with but have you tried:
Full help and example here:
http://gcbasic.sourceforge.net/help/_ssd1306_controllers.html
The glcd works fine and in the program clears screen and prints test it not writing a byte though, well not on display.
I changed the write sub but no joy. On a picaxe this was easy to make a lib but same code is not working with GCB. Trying to do a sprite routine but can't write 1 byte. doh! Ta anyway.
this works in picaxe and want to convert to GCB
ClearDisplay: ;clears oled screen
hi2cout (0,SSD1306_PAGEADDR)
hi2cout (0,0) ;set row=0
hi2cout (0,7)
;
hi2cout (0,SSD1306_COLUMNADDR)
hi2cout (0,0) ;set column=0
hi2cout (0,127)
;
for ptr=0 to 1023
hi2cout (64,0)
next ptr
;
return
Now GCB,oh dear,dim workio
Last edit: stan cartwright 2017-08-07
I can look at this when I get home from vacation.