Need help with OLED-96 Circle function.
JMLStamp2p
Posts: 259
Good Evening,
I want to use draw circles using my OLED-96-Prop but get an error on the line: Write_cmd(DRAW_CIRCLE)
Can someone tell me where I am going wrong.
JMLStamp2p
...................................................................................................
PUB Circle (X,Y,Rad,FILL, R,G,B)
· R := R >> 2
· G := G >> 2
· B := B >> 2
·· Write_cmd(FILL_ENABLE_DISABLE)
··· if(FILL)
···· Write_cmd(0)
··· · else
······ Write_cmd(1)
······ Write_cmd(DRAW_CIRCLE)
······ Write_cmd(X1)
······ Write_cmd(Y1)
······ Write_cmd(RAD)
······ Write_cmd(R)································· ' set outline colour red
····· ·Write_cmd(G)································· ' set outline colour green
······ Write_cmd(B)································· ' set outline colour blue
·······Write_cmd(R)································· ' set fill colour red
····· ·Write_cmd(G)································· ' set fill colour green
······ Write_cmd(B)································· ' set fill colour blue
····· ·DELAY.PauseMSec(1)
I want to use draw circles using my OLED-96-Prop but get an error on the line: Write_cmd(DRAW_CIRCLE)
Can someone tell me where I am going wrong.
JMLStamp2p
...................................................................................................
PUB Circle (X,Y,Rad,FILL, R,G,B)
· R := R >> 2
· G := G >> 2
· B := B >> 2
·· Write_cmd(FILL_ENABLE_DISABLE)
··· if(FILL)
···· Write_cmd(0)
··· · else
······ Write_cmd(1)
······ Write_cmd(DRAW_CIRCLE)
······ Write_cmd(X1)
······ Write_cmd(Y1)
······ Write_cmd(RAD)
······ Write_cmd(R)································· ' set outline colour red
····· ·Write_cmd(G)································· ' set outline colour green
······ Write_cmd(B)································· ' set outline colour blue
·······Write_cmd(R)································· ' set fill colour red
····· ·Write_cmd(G)································· ' set fill colour green
······ Write_cmd(B)································· ' set fill colour blue
····· ·DELAY.PauseMSec(1)
Comments
You have to do your own in Spin using the pixel and line drawing operations.
Paul Sr. wrote one that's usable, but needs some polishing. It's on page 4 of
this thread: http://forums.parallax.com/showthread.php?p=679308
What is the best source to start learning Assembly code for the Prop ?
John.
Use GEAR to see what the instructions really do and try small routines with GEAR until you're
confident in your understanding of them.