LP5521TMEV National Semiconductor, LP5521TMEV Datasheet - Page 5

no-image

LP5521TMEV

Manufacturer Part Number
LP5521TMEV
Description
EVAL BOARD FOR LP5521
Manufacturer
National Semiconductor
Datasheets

Specifications of LP5521TMEV

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
Q5109809
Commands
Ramp
Ramp command generates a PWM ramp from current value.
Ramp command has two parameters – first is time in mil-
liseconds (floating point format, maximum execution time
t
number of steps (positive or negative, integer 2-128) sepa-
rated with comma.
Example: ramp 20.5,6
Wait
With wait command program execution stops for time defined.
Command has one parameter, time in milliseconds (floating
point format, maximum 999).
Example: wait 50.5
Branch
Branch command loads step number to program counter.
Branch command has two parameters, loop counter (integer
0-63, 0 means infinite loop) and label separated with comma.
Label must be predefined before using in a branch command.
The following example loops 5 times commands between la-
bel1 and branch command:
Example: label1: … branch 5,label1
Set_PWM
Set_pwm command sets PWM output value. Command has
one parameter, PWM value (integer 0-255).
Example: set_pwm 23
Start
(Go to) Start command resets program counter and continues
executing from the beginning of section. No parameters used.
Example: start
Errors
If there is an error during compilation error message is gen-
erated. Error messages are as follows:
1 = color section error
2 = syntax error
3 = ramp parameter error
4 = SRAM memory overflow
6 = ramp step error
7 = branch error
9 = set_pwm parameter error
11 = wait parameter error
Example command file
# red LED section start
.RED
ramp 20.5,6
ramp 10,-15
wait 10
# green LED section start
.GREEN
ramp 10,-15
start
# blue LED section start
.BLUE
ramp 10,15
end R
MAX
= (1000 ms x number of steps) - 1 ms) and second is
5
Trigger
Trigger command sets wait or send trigger. Command has
two parameters, wait trigger channel and send trigger chan-
nel. Channels are defined as: r = red, g = green, b = blue, e
= external.
Examples:
trigger sr => (Send trigger to red channel)
trigger sg => (Send trigger to green channel)
trigger sb => (Send trigger to blue channel)
trigger se => (Send trigger to external channel)
trigger sgb => (Send trigger to green and blue channel)
trigger wr => (Wait trigger from red channel)
trigger sr,wb => (Send trigger to red channel and wait trigger
from blue channel)
End
End command ends program execution. Also interrupt signal
can be send or program counter can be reset. Command can
have up to two parameters. I = interrupt send, R = reset pro-
gram counter.
Examples:
end I
end R
end R,I
end I,R (same as earlier)
end
Files
Source file has .src extension. During compilation listing file
with .lst extension and binary with .bin or hex file with .hex
extension will be generated. File name is the same as for
source file name.
www.national.com

Related parts for LP5521TMEV