This machine use one of the implementations of bresenham line algorithm: dx := abs(x1-x0) dy := abs(y1-y0) if x0 < x1 sx := 1 else sx := -1 if y0 < y1 sy :=1 else sy := -1 err := dx-dy loop: setPixel (x0, y0) if x0=x1 and y0 =y1 stop e2 := 2*err if e2 > -dy { err := err -dy x0 := x0+sx } if e2 < dx { err := err + dx y0 := y0 + sy } goto loop It can draw lines in any directions. it has some cca full adders modified to make subtraction simple (!B invert B, CIn enabled) Run around 30 ticks, depend if it needs to add/subtract 1 to x or y or the two. I made other version of this, but spagetti. This is the seconds version of this implementation i build.
This is the revision 2, due to some fixes and upgrades.
It has 4 binary inputs, x0, x1, y0, y1. The inputs are two points just p0 and p1. p0(x0, y0) p1(x1, y1) The machine is automatic, you only need to press the start button, do not press again until finished lamp is on. If you want to clear the screen, press the clear button. If you failed typing something just press the lever to turn off the machine, it will print 1 or two points more, but it stops.
Comments
Denied - Redundant PR post.
Denied - Redundant PR post.