| Electronic Components Datasheet Search |
|
AS3661 Datasheet(PDF) 68 Page - ams AG |
|
|
|||||||||||||||||||||||||||||
AS3661 Datasheet(HTML) 68 Page - ams AG |
|
68 / 87 page ![]() www.austriamicrosystems.com Revision 1.3 67 - 85 AS3661 Datasheet - D e t a i l e d D e s c r i p t i o n 8.12 LED Driver Instructions 8.12.1 RAMP (Numerical Operands) This is the instruction useful for smoothly changing from one PWM value into another PWM value on the LED1 to LED9 outputs, in other words generating ramps (with a negative or positive slope). AS3661 allows programming very fast and very slow ramps. Ramp instruction generates a PWM ramp, using the effective PWM value as a starting value. At each ramp step the output is incremented /decremented by one unit, unless the step time span is 0 or # of increments is 0. Time span for one ramp step is defined with prescale -bit [14] and step time -bits [13:9]. Prescale = 0 sets 0.49 ms cycle time and prescale = 1 sets 15.6 ms cycle time; so the minimum time span for one step is 0.49 ms (prescale * step time span = 0.49ms x 1) and the maximum time span is 15.6 ms x 31 = 484ms/step If all the step time bits [13:9] are set to zero, output value is incremented / decremented during one prescale on the whole. Number of increment’s value defines how many steps will be taken during one ramp instruction: Increment maximum value is 255d, which corresponds increment from zero value to the maximum value. If PWM reaches minimum/maximum value (0/255) during the ramp instruction, ramp instruction will be executed to the end regardless of saturation. This enables ramp instruction to be used as a combined ramp & wait instruction. Ramp instruction is the wait instruction when the increment bits [7:0] are set to zero. COMPILER COMMAND SYNTAX: RMP, prescale[1], step time[4], sign[1], number of increments[8]; 8.12.1.1 RMP Application Example Let's say that the LED dimming is controlled according to the linear scale and effective PWM value at the moment t=0 is 140d (~55%,), as shown in the figure below, and we want to reach a PWM value of 148d (~58%) at the moment t = 1.5s. The parameters for the RAMP instruction will be: Prescale = 1 (15.625 ms cycle time) Step time = 12 (step time span will be 12*15.625 ms = 187.5 ms) Sign = 0 (increase PWM output) Number of increments = 8 (take 8 steps) COMPILER COMMAND SYNTAX EXAMPLE: RMP, 1, 12, 0, 8; Table 75. RMP Parameter Description Name Value Description prescale 0 Divides master clock (32 768 Hz) by 16 = 2048 Hz -> 0.488 ms cycle time 1 Divides master clock (32 768 Hz) by 512 = 64 Hz -> 15.625 ms cycle time step time 0-31 One ramp increment done in (step time) x (prescale). sign 0 Increase PWM output 1 Decrease PWM output # of increments 0-255 The number of increment/decrement cycles. Note: Value 0 takes the same time as increment by 1, but it is the wait instruction. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |