Shop OBEX P1 Docs P2 Docs Learn Events
SX28 X,Y plotter — Parallax Forums

SX28 X,Y plotter

roofis27roofis27 Posts: 2
edited 2005-04-14 11:25 in General Discussion
Hi All,

I've been away from assembly for eight years now and recently picked up SXes for hobby with a purpose of building CNC controls for my Shoptask mill/drill/lathe. The SX (so far) takes x and y coordinates and draws straight lines between, then loads the next coordinates and draws again. I'm half way through loading an EEPROM chip with a trig table and hope to add arcs to the functionality, which would take me one step closer to taking M-and G-code inputs, though I have a hunch I am going to run out of programming space before I have every option (tool offset, acceleration/deceleration, etc.) though I believe I will end up with something workable.

The assembly code for the SX28 is attached.
I would be more than happy to explain any part of the code; my comments aren't abundant, and the handling of binary fractions in the program is a mess to solve. I am also open to programming suggestions for format, reliability or just comments in general.

I realize this project is more than likely done a hundred times over, but I wanted something to challenge myself with that I could use in the end, and say I did it.

Regards,
-Ken

ps - If anyone would like code to program EEPROM with a trig table, tomorrow or the next day I will have a zero-to-45 degree table for tangentials in 0.05-degree steps, 1800 bytes. Precision is 16-bit fractional binary. Of course I tried looking on the internet for this first, but couldn't. Perhaps I can save you the time?

Comments

  • BeanBean Posts: 8,129
    edited 2005-04-14 11:25
    roofis27,
    If your running out of program space, you could switch to the SX48 or SX52. They have double the program memory and the code will run with just minor adjustments.

    Just a couple comments on your code. (since you posted it, I assume you want feedback).
    First of all, it is very nicely formatted and easy to follow.

    You have a line "mov dsCount,#!15" the "!" is not a valid character here and it seems to be loading dsCount with zero ???

    Instead of "$03.0", it·is usual to just use "C"
    Thanks for posting it,
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video Display Module" Available Now.

    www.sxvm.com

    "A problem well defined, is a problem·half solved."


    Post Edited (Bean) : 4/14/2005 12:10:45 PM GMT
Sign In or Register to comment.