8-bit Knowledge Base

      • What is DPInst?

        Silicon_Labs | 11/330/2013 | 11:36 AM


        What is DPInst?



        DPInst (Driver Package Installer) is a driver installer supplied by Microsoft. It is the recommended way to create driver installers for Silabs drivers.

        For any DIFx-compliant driver package (including the output of the AN220 Driver Customization Wizard, found here www.silabs.com/interface-appnotes), the DPInst installer executable can simply be dropped into the driver package and an INI file created to customize the installer behavior.

        The behavior of the DPInst installer can be configured though either command line switches or through an INI file. These facilities can be used to do things like suppress the installer dialog box (quiet install), forcing install of older versions, and controlling the uninstall behavior.

        Complete Information about DPInst can be found in MSDN here: http://msdn.microsoft.com/en-us/library/ff544842(v=vs.85).aspx

        Documentation on the command line can be found here: http://msdn.microsoft.com/en-us/library/ff544775.aspx

        Documentation on the descriptor file can be found here: http://msdn.microsoft.com/en-us/library/ff553560(v=vs.85).aspx

        As with all Microsoft products, support for DPInst can be obtained by emailing support@sysdev.microsoft.com.

      • Port Latch Read-Modify-Write

        Silicon_Labs | 11/329/2013 | 08:57 PM


        How do I perform a read-modify-write operation on a port latch?



        The 8051 port SFRs, such as P0 and P1, behave differently during reads and writes.  Reading a port SFR bit returns 0 if the port pin is configured as an analog input using the PnMDIN SFR or directly reads the port pin when configured as a digital input.  Writes to port SFRs write to the port latch.

        The port latch can't be read directly.

        To make it easier to update pins, the ANL, ORL, and XRL instructions behave differently for port SFRs.  These read-modify-write instructions read from the port latch rather than directly from the port pin.  In this way, users can safely modify single port pins without adversely affecting open-drain input pins that read logic 0.

        For example:

        // Configure P0.0 - P0.3 as push-pull outputs; configure P0.4 - P0.7 as open-drain inputs
        P0MDOUT = 0x0F;

        // Set P0.0 - P0.3 to drive push-pull outputs to ground; set P0.4 - P0.7 as high-impedance inputs
        P0 = 0xF0;

        // To set P0.0 to drive high ('1')
        // Use the ORL instruction to perform a read-modify-write on the P0 SFR
        // Since the read part of the read-modify-write operation reads the port latch instead of the pin,
        // The P0.0 pin latch is safely written to '1' without altering other input pins
        P0 |= 0x01;

        // Conversely, breaking up the read-modify-write operation into a separate read and write
        // on P0 may have side effects.
        unsigned char P0_ReadWrite = P0; // The P0 read returns bit values of '0' for any input pins that are grounded
        P0_ReadWrite |= 0x01; // Set the P0.0 pin to '1'
        P0 = P0_Read; // The P0 write may clear the P0.4 - P0.7 latch value to '0' which grounds the pin!

        Use the ANL (&=), ORL (|=), or XRL (^=) instructions to safely clear, set, or toggle port pins without altering other input pin latch values.  Also, most port SFRs are bit addressable, so use SBITs to modify port pin values directly.

        For more informaiton see:

      • On-Chip DC-DC Converter (DC0) Excessive Battery Current when DC+ Overdriven

        Silicon_Labs | 11/329/2013 | 06:20 PM


        Why does my C8051F9xx device draw excessive current from a battery in single cell mode when the DC+ pin is overdriven?  Why does the battery voltage drop to 0V?



        C8051F9xx low-power devices with an on-chip DC-DC converter (DC0) have internal protection circuitry that should automatically limit the peak inductor current.

        According to the DC0 datasheet documentation:

        The dc-dc converter has a built in voltage reference and oscillator, and will automatically limit or turn off the switching activity in case the peak inductor current rises beyond a safe limit or the output voltage rises above the programmed target value. This allows the dc-dc converter output to be safely overdriven by a secondary power source (when available) in order to preserve battery life. The dc-dc converter’s settings can be modified using SFR registers which provide the ability to change the target output voltage, oscillator frequency or source, Diode Bypass switch resistance, peak inductor current, and minimum duty cycle.

        However, under certain conditions, the inductor current is not safely limited allowing the device to pull essentially unlimited current through the DCEN pin and inductor.  The battery is essentially grounded, which in many cases causes the battery output voltage to drop to near 0 V.

        Overdriving DC+ to a voltage above the DC0 output voltage, such as 3.3 V, when VBAT is under VPOR, recovery from brownout (VBAT rising), or 0.95 V, causes the system to draw a tremendous amount of current from the VBAT supply.  This high current state is not cleared until the next POR.

        Test Conditions:

        1. Configure the C8051F930 target board for 1-cell mode.
        2. [VBAT] Connect a 0.9 V bench power supply to the AAA battery (1-cell) terminals. Configure the bench current limit to 200 mA.
        3. Connect a high precision multimeter to the IMEASURE jumper to measure the current flowing from the AAA positive terminal into the VBAT pin.
        4. [DC+] Connect a 3.3V bench supply across DC+ and GND.



        If the battery supply is set to 0.95 V (1.0 V to be safe), the system powers up. The IMEASURE current is near 2-3 mA. After the part has started running, overdrive the DC+ pin to 3.3 V. The IMEASURE current drops to near 0 mA. Everything appears normal.

        If the battery supply is under 0.95 V, sometimes the current from the battery supply will hit the current limit (200 mA) and stay that way. The only way to lower the current is to perform a POR by disconnecting the DC+ supply and disconnecting the VBAT supply. The system will still run with just the DC+ supply with the VBAT supply removed. This seems to indicate that even if the battery could supply the peak current, the DC0 module is stuck in such a state that the VBAT pin is always shorted to ground until the next POR.

        The order in which the device is powered up with VBAT and DC+ affects the max current draw from VBAT:

        • If the system is powered up with VBAT = 0.9 V and then later the DC+ supply is connected, the IMEASURE current stays near 0 mA.
        • If DC+ is connected to the 3.3 V supply, and then the system is powered up by connecting VBAT to 0.9V, the IMEASURE current is stuck at the current limit (200 mA). There is no way to clear this state other then disconnecting both supplies.


        Based on this information, it's not safe to power up the system at low VBAT voltages with the DC+ pin overdriven. The only safe way to power up the system is to disconnect DC+ from the device until VBAT is at least 1.0V. Once the system starts up, then connect DC+.


        1. It's not safe to overdrive DC+ when VBAT < 1.0V
        2. Connect VBAT first, wait until the device starts, then overdrive DC+