Gen4 UNISHAPE Firmware Application Note P-VIP® Lamp Systems Kernel EA05 Application Note UNISHAPE – Universal Shaped Light Waveform Table of Contents 1. 2. 3. Introduction ......................................................................................................................................2 Kernel EA05 features.......................................................................................................................2 Basic driver operation ......................................................................................................................2 3.1 Lamp Starting Sequence (transition from idle to run mode)........................................................4 3.2 Error Handling .............................................................................................................................6 3.3 Lamp power control .....................................................................................................................6 4. Synchronization ...............................................................................................................................7 5. UNISHAPE waveform definition ......................................................................................................7 5.1 Segment definition table ..............................................................................................................7 5.2 Waveform composition ................................................................................................................7 5.3 Segment duration ........................................................................................................................7 5.4 Segment height ...........................................................................................................................7 5.5 Segment properties .....................................................................................................................8 6. Uploading new waveforms to the lamp driver..................................................................................8 6.1 Programming new waveforms to non-volatile EEPROM.............................................................8 7. Memory Map ....................................................................................................................................8 8. Selecting between Waveforms ......................................................................................................10 8.1 Selecting between stored waveforms using UART commands ................................................11 8.2 Selecting between stored waveforms using the duty cycle (on-time) of SCI signal..................11 9. Guidelines for Creating Waveforms...............................................................................................11 9.1 Plateau levels ............................................................................................................................11 9.2 Lamp maintenance pulses with commutations .........................................................................11 9.3 Low pulses.................................................................................................................................11 10. Specification ..............................................................................................................................12 10.1 Minimum SCI frequency........................................................................................................12 10.2 SCI duty cycle .......................................................................................................................12 10.3 Segment height limitations ....................................................................................................12 10.4 Segment duration limits.........................................................................................................12 10.5 Changing the waveform ........................................................................................................12 10.6 Waveform Memory................................................................................................................12 11. Kernel Revision History .............................................................................................................13 2007-03-19 Page 1 of 13 Gen4 UNISHAPE Firmware Application Note Kernel EA05 P-VIP® Lamp Systems 1. Introduction UNISHAPE can be used with several lamp types and wattages, and has no adverse effect on lamp life. Depending on the particular projection system design, Osram's UNISHAPE technology can increase the overall system efficiency. This allows the use of lower lamp wattages to produce performance similar to that of non-UNISHAPE systems. Osram´s lamp drivers with UNISHAPE firmware store a complete light waveform. With UNISHAPE one and the same lamp driver can be programmed with all existing lamp operation modes. The UNISHAPE software enables complex light curves with significant cost and quality advantages: • LowPulses down to 25% light level. LowPulses can increase the colour depth by two additional bits. The colour quality (resolution, linearity) is even better than that of a 7-segment DVE colour wheel system. Manufacturers can therefore save the extra cost for a 7-segment colour wheel. • VariablePlateau values for each segment. This enables loss-free colour adjustment. The UNISHAPE colour adjustment works without light losses because it is achieved by modulation of the light source. Up to 40% more screen lumens are possible compared to nonUNISHAPE systems. Switching between different waveforms enables brilliant colours in video mode and greatest possible brightness in data mode with the same projector. This application note describes the EA05 UNISHAPE software kernel. This lamp driver can be controlled in two ways: 1. The conventional driving mode 2. The UART mode UNISHAPE operation is possible with both ways. The following paragraphs describe the conventional mode in detail. The UART mode is only described control briefly, as there is a dedicated application note for the UART protocol. The EA05 kernel uses the standardised UART protocol, please refer to the application note “Standardised UART protocol”. 2. Kernel EA05 features • Create arbitrary light waveforms! • Dynamic Dimming for contrast enhancement • Select between multiple waveforms (256 bytes waveform memory) • Standardised UART communication • LOFS overshoot reduction improves colour linearity • EEPROM firmware update offers maximum flexibility 3. Basic driver operation 2007-03-19 Page 2 of 13 Gen4 UNISHAPE Firmware Application Note Kernel EA05 P-VIP® Lamp Systems This chapter describes how to apply control signals to the SCI interface und how the ballast will react. Furthermore, it describes the basic workflow of lamp start and stop and the related response to that. Basic requirement to all mentioned functions and timings is a stable supply voltage within the specified range of the ballast. The input voltage range is specified in the lamp driver specification. After powering up the driver the internal auxiliary supply will start up and the control logic will be reset and booted. This typically need a processing time of 100ms. Putting the driver into “Idle Mode” is a necessary condition to process signals from the SCI. For a lamp start it is always necessary to apply a valid SCI signal. This is a basic requirement to start and to operate a lamp. UART communication can be opened in idle mode, too. A valid SCI ON signal can be either a static ON or a square wave signal within a specified frequency range. Please refer to lamp driver specification for detailed information about valid SCI square wave timing. Basically two different ways to switch on and off the lamp can be distinguished: 1. Non UART mode: In conventional driving mode (non UART) lamp start and stop process only depend on SCI signal. Refer to the bold signal path in the state diagram below. 2. UART mode: If the lamp driver was put into UART mode, lamp start and stop process can be optionally controlled via UART. UART mode can be entered at any time in IDLE mode or in RUN mode. Please note again: For lamp start and lamp operation it is always mandatory to apply a valid SCI signal. Once UART mode has been entered it can be restored in two ways. First possibility is to recycle power and start the driver again from OFF state. Secondly, UART communication can be opened and a RESET command can be send to reset all volatile settings in the control unit of the driver. 2007-03-19 Page 3 of 13 Gen4 UNISHAPE Firmware Application Note P-VIP® Lamp Systems Kernel EA05 After entering RUN mode the lamp driver will start a state machine to perform a lamp start. First the lamp driver triggers the ignition sequence (high voltage). After successful ignition the driver switches to the preheating sequence where the lamp heats up. The preheating sequence is followed by normal lamp operation (low frequency operation). The lamp driver remains in normal operation until the lamp is switched off (STOP mode via UART command or IDLE mode by restoring the SCI signal). 3.1 Lamp Starting Sequence (transition from idle to run mode) Action Lamp burn conditition Flag indication uncertain Lamp Lit Flag Lamp start failed Preheating SCI hold on time min. 100ms Ignition (HV) SCI start trigger min. 20ms SCI ON IDLE MODE RUN MODE SCI OFF Boottime min. 100ms DC Supply on 0 1 2 3 4 5 HV generation terminated 6 7 8 Lamp Lit flag indication stable 9 10 time/sec. The lamp normal operation status (low frequency operation) will be indicated via the Lamp Lit signal to the projector. This is only possible if the driver was not set into UART mode before. Thus is because the Lamp Lit indication line at the SCI interface is multiplexed with the UART TxD line. 2007-03-19 Page 4 of 13 Gen4 UNISHAPE Firmware Application Note P-VIP® Lamp Systems Kernel EA05 In case of UART mode has been entered, the Lamp Lit line is only controlled by UART and is no longer an indicator for a successful lamp start. In UART mode the status of lamp operation can be only read via UART communication. To read the condition a status query has to be performed and the “Lamp On” Flag has to be checked. This Flag emulate the hardware Lamp Lit indicator. In case of non UART mode and successful lamp start the Lamp Lit indicator will be set after: t Lamp Lit min t Lamp Lit max Ignition sequence + Preheating sequence Ignition time + Ignition sequence + Preheating time typical 4 sec (*) typical 6 sec (*) The diagram below describes how to retry a lamp start if the first start sequence was not successful and a lamp fails to ignite. To activate another restart attempt the SCI ON signal has to be recycled. After switching off (either STOP mode or idle mode) the lamp driver waits for a certain time in order to cool down the lamp and thus prepare the system for a successful restart. A typical minimum restart * blocking time is 15 sec ( ). Restart Sequence (repetetive start cycles) Action Lamp start failed Flag indication Lamp burn conditition Lamp Lit Flag Preheating Ignition (HV) 1st start trial 2st start trial 3st start trial RUN SCI ON IDLE Restart time min. 15sec SCI OFF Boottime min. 100ms DC Supply on 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 time/sec. During the restart blocking timer is running the driver will not start the lamp even if SCI ON is applied. In UART mode the restart can be performed via UART commands. In this case a SCI ON in the drawing corresponds to a LampON command and a SCI OFF in the drawing corresponds to a LampOFF command but keep in mind that the SCI line needs to stay high ( SCI ON) to restart the driver via UART. * ( ) Values are parameterized in the system configuration. Please refer to the system specification for more details. 2007-03-19 Page 5 of 13 Gen4 UNISHAPE Firmware Application Note Kernel EA05 P-VIP® Lamp Systems Please refer to the application note “Standardized UART Protocol” to find detailed information how to use the UART command: UARTenable, Query Status, LampON, Reset and LampOFF. 3.2 Error Handling In case of abnormal operating conditions or lamp start failure (e.g. over temperature, End-of-life-voltage reached, short circuit) the driver is automatically switched off and the related error status will be stored in the driver and can be read out via UART communication. In non UART mode the lamp driver is set to idle mode and the Lamp Lit signal is cleared to indicate that the lamp operation was stopped. To restart the ballast again it is necessary to recycle the SCI signal (SCI OFF SCI ON). This will reset the error status in non UART mode. If an error occurred in non UART mode it is possible to enable UART communication afterwards and to read out the error status. To restart the driver has to be handled like in the UART mode description below. In this case the SCI needs to stay high to keep the error information present. In case of UART mode has been entered, the driver is set to STOP mode and the error status can be read via UART communication. To restart the ballast again it is necessary to send first Lamp OFF command followed by a Lamp ON command. This will reset the error status in UART mode. As long as the error status is not <no_error_occurred> the driver cannot put into RUN mode again. In UART mode the error status is not reset by switching the SCI signal off. Please refer to the application note “Standardized UART Protocol” to find detailed information how to use the UART commands: Read Error Status. 3.3 Lamp power control The lamp driver is able to operate the lamp at different power levels. In non UART mode the user can select between two different power levels (normal power and eco power) by switching the ECO mode input pin at the SCI interface. The ECO mode can be switched at any time after the driver was put into RUN mode. The lower power level of ECO mode is predefined for the related lamp type and can not be changed. It is not recommended to switch ECO mode during the lamp starting process. In case of UART mode has been entered, lamp power control is only possible via UART communication. This is because the ECO mode input line at the SCI interface is multiplexed with the UART RxD line. By means of the Set Gain command it is possible to set a power level within a certain dimming range. The lamp power will be scaled with a certain percentage from the nominal power. The power range is predefined for the corresponding lamp type and can not be changed. The typical dimming resolution is 1% (*) from nominal lamp power. This feature can be used for Dynamic Dimming where the power level has to be adjusted according to the video information. Please refer to the application note “Standardized UART Protocol” to find detailed information how to use the UART command: SetGain. 2007-03-19 Page 6 of 13 Gen4 UNISHAPE Firmware Application Note P-VIP® Lamp Systems Kernel EA05 4. Synchronization The SCI input is used not only for switching on and off the lamp, but also for synchronization. UNISHAPE is easy to synchronize! It avoids complex SCI synchronization patterns because it only uses the SCI pulse as a clock cycle. The start of the waveform is synchronized with the rising edge of the SCI signal. All waveform segments are scaled linearly in order to fit the whole waveform into the SCI period. It reacts to rising SCI current edges. To avoid any artefacts constant and continuous SCI timing without jitter is mandatory. If the SCI input is receiving a static ON signal the lamp driver operates the lamp in free running mode. The internal frequency is defined in the waveform information. 5. UNISHAPE waveform definition The complete waveform information is stored in the memory of the lamp driver. The waveform itself consists of the segment definition table and the sequence composition. Each rising SCI edge triggers a new start of the waveform. It is recommendable to use a simple square wave signal with a dutycycle of 50%. 5.1 Segment definition table hfactor Segment type dfactor properties 0 100 60 0b00000000 1 134 13 0b00001001 2 50 8 0b00000000 … … … … … … … … 5.2 Waveform composition The waveform is a string of segments: Segment number 0 1 2 segment type 5 3 13 … … The segments theirselves are defined as described in section 5.1. 5.3 Segment duration The periodic length of the SCI signal is measured by the lamp driver. All segment widths are scaled linearly so that the whole waveform fits into the SCI period: Dwaveform = ∑d factor waveform t segment = d factor Dwaveform ⋅ 1 f SCI The parameter dfactor is stored in the appropriate EEPROM cells. The range of the dfactor is from 0 to 255. 5.4 Segment height The parameter hfactor sets the height of each segment. The pulse height values 0..255 equal multiplication factors between 0 and 2. The segment current is calculated as follows: 2007-03-19 Page 7 of 13 Gen4 UNISHAPE Firmware Application Note Kernel EA05 I segment = I mean ⋅ 5.5 P-VIP® Lamp Systems h factor 27 Segment properties The segment properties are set by the property byte of each segment type. The individual properties are stored in the memory, like all other segment parameters, too. The bits of this byte have the following meaning: • Bit 0 - Current commutation at the end of the segment This bit defines if the segment is followed by a commutation (bit is set) or not (bit is 0). • Bit 1 - Reserved • Bit 2 - Reserved • Bit 3 - Overshoot reduction at the end of segment If this bit is set the lamp driver changes the current smoothly in order to avoid ripple in light output. • Bit 4 - Reserved • Bit 5 - Power synchronization This bit controls where a new power level will be activated. For Dynamic Dimming it is important to synchronize the power shifts with the video frames. • Bit 6 - Lamp voltage measurement This bit defines, whether a lamp voltage measurement is to be performed during the segment. Because the lamp voltage depends to a degree on the lamp current it is recommendable to place a voltage measurement in each full plateau segment. The software calculates the average lamp voltage. • Bit 7 - Reserved 6. Uploading new waveforms to the lamp driver The lamp driver comes pre-programmed with a standard RGBRGB waveform from the factory. The user can reprogram this standard waveform with his own one (or with a set of multiple waveforms). A valid waveform must be programmed in the lamp driver, otherwise it will not work properly. For programming new waveforms UART communication is necessary. 6.1 Programming new waveforms to non-volatile EEPROM The programming of waveforms to EEPROM can be done both before assembly of the lamp driver and later during runtime. The reprogramming of a waveform takes approximately 2 seconds and is limited to 50.000 rewriting cycles. OSRAM provides hardware and software tools for reprogramming the lamp driver before assembly. If the customer integrates the waveform data into the memory of the display unit’s system processor which is connected via UART to the lamp driver, it is also possible to reprogram the EEPROM during setup of the MD-TV/Projector System. Please note the a ballast has to be reset (by using the appropriate UART command or by cycling power) for the re-programming to take effect. 7. Memory Map Both, the segment definition table and the sequence string are stored in the lamp driver’s memory. The total waveform memory is shared between segments and sequences according to the memory table be- 2007-03-19 Page 8 of 13 Gen4 UNISHAPE Firmware Application Note P-VIP® Lamp Systems Kernel EA05 low. All addresses given here are decimal numbers. Memory addresses are subject to change with the lamp driver’s firmware. The starting address of the waveform information is 0x00 in EEPROM for the EA04 kernel. Alternatively the waveform information starting addresses can be read out by UART. Please refer to the “UART Protocol” application note for further information. For changing the whole waveform data in EEPROM please refer to the application note “Firmware update”. The addresses shown in the memory map table are relative to the starting address. The waveform information consists of the following main parts: 1. 2. 3. 4. General information Waveform Header Segment Types Definition Table Sequences The waveform memory is organized as a shared memory area. That has the advantage that the user can decide by himself how to distribute segment definitions and waveform data across the free memory. The sub-structure of the waveform information parts is as follows: 1. General information Byte 0: reserved 2. Waveform Headers Byte 0: Waveform ID number Byte 1: Starting address of the sequence (low byte) Byte 2: Starting address of the sequence (high byte) Byte 3: Free running frequency (low byte) Byte 4: Free running frequency (high byte) Byte 5: Maximum synchronization frequency (low byte) Byte 6: Maximum synchronization frequency (high byte) Byte 7: Minimum synchronization frequency (low byte) Byte 8: Minimum synchronization frequency (high byte) Byte 9: The sum of all dfactor over the whole waveform (low byte) Byte 10: The sum of all dfactor over the whole waveform (high byte) 3. Segment Type Definition Table Byte 0: Segment Height (h-factor) Byte 1: Segment Duration (d-factor) Byte 2: Segment Properties 4. Sequences Byte 0: First segment’s type Byte 1: Second segment’s type Byte 2: … Byte n-1: Last segment’s type Byte n: End of sequence indicator 2007-03-19 Page 9 of 13 Gen4 UNISHAPE Firmware Application Note P-VIP® Lamp Systems Kernel EA05 Memory map: Address 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 50 51 52 53 54 55 56 57 58 59 60 61 • • • • • • Waveform Headers Segment Type Definition Sequences general information Waveform Header 0 Segment type definition 0 Waveform Header 1 OR Segment type definition 1 Segment type definition 2 Waveform Header 2 OR Segment type definition 3 Segment type definition 14 Waveform Header 8 OR Segment type definition 15 Segment type definition 16 Waveform Header 9 OR Segment type definition 17 • • • 0 1 2 3 4 5 • • • • • • 8. Selecting between Waveforms As mentioned above, the waveform memory can contain multiple waveforms. Once multiple waveforms are “linked” to a single EEPROM data file (*.eep; this is done using the OSRAMlink-tool, which is part of 1 the ballast spreadsheet ), it can be uploaded into the driver in the same way as described in section 6. 1 Tools can be downloaded from www.osram.com/unishape 2007-03-19 Page 10 of 13 Gen4 UNISHAPE Firmware Application Note P-VIP® Lamp Systems Kernel EA05 8.1 Selecting between stored waveforms using UART commands There are special UART commands for switching between stored waveforms. Please refer to the UART Protocol application note. 8.2 Selecting between stored waveforms using the duty cycle (on-time) of SCI signal The lamp driver scans the duty cycle of the on-time of the SCI signal. If the duty cycle equals the recommended value shown in the table below or is within a range of ±2% around it, the lamp driver switches to the appropriate waveform number. A hysteresis of 0.8% is implemented at the range limits in order to prevent the lamp driver from switching back and forth. Waveform number 0 1 2 3 4 5 6 Duty cycle (±2%) 33,33% 39,61% 45,88% 52,16% 58,43% 64,71% 70,98% 9. Guidelines for Creating Waveforms Although very complex light waveforms are now possible, the lamp needs to be operated within its specification in order to ensure optimal performance and best life time. The following paragraphs are guidelines for creating waveforms. OSRAM will publish a separate application note about waveform design soon. 9.1 Plateau levels All plateau level shall not vary more than 30% from each other. 9.2 Lamp maintenance pulses with commutations Proper lamp maintenance pulses are very important in order to achieve the specified lamp life time. The number of lamp maintenance pulses per waveform defines the lamp current frequency. The calculation formula is as follows: f lamp current = f waveform ⋅ nnumber of pulses 2 This number shall lead to a frequency that is within the specified lamp frequency range. It’s recommendable to choose an odd number of lamp maintenance pulses in order to balance any DC current automatically. The height and duration of the pulses must be within the range given in the lamp specification Place the pulses as much equally spaced as possible. The minimum and maximum time between two lamp maintenance pulses can be looked up from the lamp specification. 9.3 Low pulses The low pulse’s achievable level range is from 25% to 100%. The width shall not exceed 350µs. For now the number of low pulses is limited to one between two lamp maintenance pulses. The placement shall not be directly before or after a commutation. 2007-03-19 Page 11 of 13 Gen4 UNISHAPE Firmware Application Note Kernel EA05 10. Specification 10.1 Minimum SCI frequency P-VIP® Lamp Systems The minimum SCI frequency is 35Hz. 10.2 SCI duty cycle The applied SCI duty cycle should be 50% to ensure failsafe operation, which is therefore strictly recommended. Nevertheless, other duty cycles are possible, depending on the minimum synchronisation frequency. But it has to be made sure that neither SCI-Ontime nor SCI-Offtime exceed a length of 16ms. Otherwise, the driver might synchronize at wrong frequencies or even switch off. 10.3 Segment height limitations Segment currents can be from 0% up to 200% of the mean lamp current. The light output follows the lamp current with some delay. Therefore on a very fast time scale the relationship between lamp current and light output is not linear. 10.4 Segment duration limits The minimum segment width is 75µs with no overshoot reduction. The overshoot reduction increases minimum pulse width. The maximum segment duration is 4ms. Please use multiple similar segments if you need more time. 10.5 Changing the waveform Modification of the waveform is only possible via the UART interface. EEPROM changes are permanent changes of the stored waveform. The UART interface is not needed necessarily for lamp operation. 10.6 Waveform Memory Waveform memory is limited due to available microcontroller resources. In EA04, the Segment Type Definition Table can hold up to 35 different segments. In the Segment Table, there is space for combinations of up to 139 segments, including the “end of sequence” indicators. The exact maximum length depends on the number of stored sequences (as every sequence has an 11-byte header) and can be calculated as follows: nmax, Segments = 150 − 11* nSequences 2007-03-19 Page 12 of 13 Gen4 UNISHAPE Firmware Application Note Kernel EA05 11. P-VIP® Lamp Systems Kernel Revision History EA05 • Added waveform select by SCI duty cycle EA04 • Added support for multiple waveforms EA03 • Ported DB08 kernel for use with the improved Gen4 ballasts DB08 • smoothed current changes: the table driven algorithm was replaced by a vector based one. The current accuracy during lamp runup phase was improved from 8 bit to true 10 bit resolution. Also the voltage resolution was increased from 8 bit to 12 bit. • reduced the minimum segment duration by simplifying the waveform calculation. Waveform definition change was needed. • instant synchronization after ignition: the UNISHAPE waveform is synchronized within 1 second after lamp ignition. Added the possibility of voltage controlled minimum and maximum hfactor. DB07 • fixed error report in UART communication module: after an protocol, frame or parity error occurred the lamp driver kept on sending error codes until it received a valid command again. This happened even when communication was not yet enabled. DB06 • UART communication fully complies with the requirements of TI’s standardized protocol • reduced unsynchronized lamp runup time to 10 seconds • improved lamp current stability during runup phase by adding 2 virtual bits current resolution • re-synchronization after waveform change need less than 1 second 2007-03-19 Page 13 of 13