summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2011-12-12 00:11:34 +0100
committerSebastian Reichel <sre@ring0.de>2011-12-12 00:11:34 +0100
commit90c9a148a94ed92c93d42110e45d8787f7ac1eff (patch)
tree447e0ec7bfa5c60a87468851c2fff741d6e645f2 /README
downloadlp5523-assembler-90c9a148a94ed92c93d42110e45d8787f7ac1eff.tar.bz2
initial import
Diffstat (limited to 'README')
-rw-r--r--README94
1 files changed, 94 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..a75e2e3
--- /dev/null
+++ b/README
@@ -0,0 +1,94 @@
+This is a simple assembler for lp5523 led chips. You
+can use it to convert the microcode from lp5523 engines
+into human readable code and the other way around.
+
+------------------------------------------------------------
+The Assembly Language
+------------------------------------------------------------
+
+The assembly language consists of the following mnemonics:
+
+ * start
+ This must be specified at the beginning of each program.
+
+ * restart
+ Jumps back to the start.
+
+ * stop
+ Stops the engine.
+
+ * stopr
+ Stops the engine with reset.
+
+ * stopi
+ Stops the engine with interrupt.
+
+ * stopri
+ Stops the engine with reset & interrupt.
+
+ * send1, send2, send3
+ Sends signal to engine 1, 2 or 3.
+
+ * wait1, wait2, wait3
+ Waits for signal from engine 1, 2 or 3.
+
+ * set LEVEL
+ Sets output to LEVEL (0-255).
+
+ * sleep TIME
+ - TIME can be between 0 and 61
+ Does nothing for the specified amount of time. See
+ below for TIME value -> time in seconds calculation.
+
+ * fade TIME +STEPS
+ - TIME can be between 0 and 61
+ - STEPS can be between 0 and 255
+ - The '+' is important
+ Slowly increase the output by STEPS in the specified
+ amount of time.
+
+ * fade TIME -STEPS
+ - TIME can be between 0 and 61
+ - STEPS can be between 0 and 255
+ - The '-' is important
+ Slowly decrease the output by STEPS in the specified
+ amount of time.
+
+ * branch COUNT PC
+ - COUNT can be between 0 and 63
+ - PC can be between 0 and 95
+ Jumps (back) COUNT times to the opcode located at PC.
+ A COUNT value of 0 is interpreted as infinite.
+
+
+Calculation of time in ms for a given TIME value:
+
+ if(value < 31)
+ return value * 0.49ms;
+ else
+ return (value-31) * 15.6ms;
+
+--------------------------------------------------------
+Usage
+--------------------------------------------------------
+
+Assemble lp5523.S into lp5523 machine code:
+ $ lp5523-as file.S > result.txt
+ $ echo "code" | lp5523-as > result.txt
+
+Disassemble lp5523 machine code in assembly code:
+ $ lp5523-as -d input > result.txt
+ $ echo "code" | lp5523-as -d > result.txt
+
+--------------------------------------------------------
+Building & Installation
+--------------------------------------------------------
+
+Building:
+ $ make
+
+Running Unit Tests:
+ $ make test
+
+Installation:
+ $ install -m755 lp5523 /usr/local/bin