Shop OBEX P1 Docs P2 Docs Learn Events
Need help with OLED-96 Circle function. — Parallax Forums

Need help with OLED-96 Circle function.

JMLStamp2pJMLStamp2p Posts: 259
edited 2007-11-14 02:02 in Propeller 1
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)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-12 00:34
    There is no DRAW_CIRCLE operation.
    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
  • JMLStamp2pJMLStamp2p Posts: 259
    edited 2007-11-13 00:08
    Thanks Mike,
    What is the best source to start learning Assembly code for the Prop ?

    John.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-13 01:11
    Look at the Propeller Programming Tutorials sticky thread and search for deSilva's tutorials.
    Use GEAR to see what the instructions really do and try small routines with GEAR until you're
    confident in your understanding of them.
  • JMLStamp2pJMLStamp2p Posts: 259
    edited 2007-11-14 02:02
    Thanks Mike, I'll do that.
Sign In or Register to comment.