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