PSoC® Creator™ Component Datasheet PSoC 4 Current Digital to Analog Converter (IDAC) 1.10 Features 7 or 8-bit resolution 7-bit range: 0 to 152.4 or 304.8 µA 8-bit range: 0 to 306 or 612 µA Current sink or source selectable General Description The IDAC component gives you a programmable current with a resolution of either 7 or 8 bits. The 8-bit ranges are approximately 612 and 306 µA and the 7-bit ranges are approximately 304.8 and 152.4 µA. When to Use IDAC Resistance measurements Current sink or source Capacitance measurements other than CapSense Sensor current Temperature measurement (diode sensor) Input/Output Connections This section describes the various IDAC input and output connections. lout – Analog The connection to the DAC’s current source/sink. Cypress Semiconductor Corporation Document Number: 001-96481 Rev. *A • 198 Champion Court • San Jose, CA 95134-1709 • 408-943-2600 Revised December 17, 2015 PSoC 4 Current Digital to Analog Converter (IDAC) PSoC® Creator™ Component Datasheet Component Parameters Drag the IDAC onto your design desktop and double-click it to open the Configure dialog box. Polarity Mode of operation. Negative/Sink (default) or Positive/Source. Resolution Resolution of the IDAC. 8-bit (default) or 7-bit. Range IDAC dynamic range: 8-bit resolution - 306 µA (default) or 612 µA. 7-bit resolution 152.4 µA or 304.8 µA Value IDAC hexadecimal value (default is 78). When changing modes the code value is fixed and the current value changes. When you switch from 8-bit to 7-bit and the value exceeds the 7-bit range, the value automatically changes to 7F. When the code value changes the current value updates and vice versa. Page 2 of 10 Document Number: 001-96481 Rev. *A PSoC® Creator™ Component Datasheet PSoC 4 Current Digital to Analog Converter (IDAC) Placement The PSoC 4 IDACs are part of the CapSense CSD hardware block. Two IDACs are available. The 8-bit IDAC is connected to AmuxBusA and the 7-bit IDAC is connected to AmuxBusB. Resources Resolution Resource Type (bits) CSD IDAC block 7 1 8 1 Application Programming Interface Application Programming Interface (API) routines allow you to configure the component using software. This table lists and describes the interface for each function. The following sections cover each function in more detail. By default, PSoC Creator assigns the instance name "IDAC_1" to the first instance of a component in a given design. You can rename it to any unique value that follows the syntactic rules for identifiers. The instance name becomes the prefix of every global function name, variable, and constant symbol. For readability, the instance name used in the table is "IDAC". Functions Function Description IDAC_Start() Performs all of the required initialization for the component and enables power to the block. IDAC_Stop() Turn off the IDAC block. IDAC_Init() Initializes or restores the component according to the customizer Configure dialog settings. IDAC_Enable() Activates the hardware and begins component operation. IDAC_SetValue() Sets the DAC’s output value. IDAC_Sleep() This is the preferred API to prepare the component for sleep. IDAC_Wakeup() This is the preferred API to restore the component to the state when IDAC_Sleep() was called. IDAC_SaveConfig() Saves the configuration of the component. IDAC_RestoreConfig() Restores the configuration of the component. Document Number: 001-96481 Rev. *A Page 3 of 10 PSoC 4 Current Digital to Analog Converter (IDAC) PSoC® Creator™ Component Datasheet void IDAC_Start(void) Description: Performs all of the required initialization for the component and enables power to the block. The first time the routine is executed, the component is initialized to the configured settings. When called to restart the IDAC following a IDAC_Stop() call, the current component parameter settings are retained. Parameters: None Return Value: None Side Effects: None void IDAC_Stop(void) Description: Turn off the IDAC block. Parameters: None Return Value: None Side Effects: Does not affect the IDAC settings. void IDAC_Init(void) Description: Initializes or restores the component according to the customizer Configure dialog settings. It is not necessary to call IDAC_Init() because the IDAC_Start() API calls this function and is the preferred method to begin component operation. Parameters: None Return Value: None Side Effects: All registers will be set to values according to the customizer Configure dialog. void IDAC_Enable(void) Description: Activates the hardware and begins component operation. It is not necessary to call IDAC_Enable() because the IDAC_Start() API calls this function, which is the preferred method to begin component operation. Parameters: None Return Value: None Side Effects: Page 4 of 10 None Document Number: 001-96481 Rev. *A PSoC® Creator™ Component Datasheet PSoC 4 Current Digital to Analog Converter (IDAC) void IDAC_SetValue(uint32 value) Description: Sets the DAC’s output value. The least significant 7 or 8 bits are used depending on the resolution of the DAC. This function sets the value from 0 to 0xFF (for 8-bit IDAC) or from 0 to 0x7F (for 7-bit IDAC). The user is responsible for calculation of the correct IDAC value depending on selected resolution and range. Parameters: (uint32) value Return Value: None void IDAC_Sleep(void) Description: This is the preferred API to prepare the component for sleep. The IDAC_Sleep() API saves the current component state. Then it calls the IDAC_Stop() function and calls IDAC_SaveConfig() to save the hardware configuration. Call the IDAC_Sleep() function before calling the CySysPmDeepSleep() or the CySysPmHibernate() functions. Parameters: None Return Value: None Side Effects: None void IDAC_Wakeup(void) Description: This is the preferred API to restore the component to the state when IDAC_Sleep() was called. The IDAC_Wakeup() function calls the IDAC_RestoreConfig() function to restore the configuration. If the component was enabled before the IDAC_Sleep() function was called, the IDAC_Wakeup() function will also re-enable the component. Parameters: None Return Value: None Side Effects: Calling the IDAC_Wakeup() function without first calling the IDAC_Sleep() or IDAC_SaveConfig() function may produce unexpected behavior. void IDAC_SaveConfig(void) Description: This function saves the component configuration and non-retention registers. This function is called by the IDAC_Sleep() function. Parameters: None Return Value: None Side Effects: None Document Number: 001-96481 Rev. *A Page 5 of 10 PSoC® Creator™ Component Datasheet PSoC 4 Current Digital to Analog Converter (IDAC) void IDAC_RestoreConfig(void) Description: This function restores the component configuration and non-retention registers. This function is called by the IDAC_Wakeup() function. Parameters: None Return Value: None Side Effects: None Global Variables Function IDAC_initVar() Description Indicates whether or not the IDAC was initialized. The variable is initialized to 0 and set to 1 the first time IDAC_Start() is called. This allows the component to restart without reinitialization after the first call to the IDAC_Start() routine. If reinitialization of the component is required, call IDAC_Init() before calling IDAC_Start(). Alternatively, you can reinitialize the IDAC by calling the IDAC_Init() and IDAC_Enable() functions. Sample Firmware Source Code PSoC Creator has many example projects that include schematics and example code in the Find Example Project dialog. For component-specific examples, open the dialog from the Component Catalog or an instance of the component in a schematic diagram. For general examples, open the dialog from the Start Page or File menu. As needed, use the Filter Options in the dialog to narrow the list of projects available to select. See the "Find Example Project" topic in the PSoC Creator Help for more information. MISRA Compliance This section describes the MISRA-C:2004 compliance and deviations for the component. There are two types of deviations defined: Project deviations - deviations that are applicable for all PSoC Creator components Specific deviations – deviations that are applicable only for this component This section gives you information on component specific deviations. The project deviations are described in the MISRA Compliance section of the System Reference Guide along with information on the MISRA compliance verification environment. The IDAC component does not have any specific deviations. Page 6 of 10 Document Number: 001-96481 Rev. *A PSoC® Creator™ Component Datasheet PSoC 4 Current Digital to Analog Converter (IDAC) API Memory Usage The component memory usage varies significantly, depending on the compiler, device, number of APIs used and component configuration. The following table provides the memory usage for all APIs available in the given component configuration. The measurements were taken with the associated compiler configured in release mode with optimization set for size. For a specific design, you can analyze the map file generated by the compiler to determine the memory usage. Configuration Flash Bytes SRAM Bytes 472 8 7 or 8-bit Functional Description Only one instance of each of the 7-bit and 8-bit IDAC components is available in a design. These are shared with the CapSense CSD component. If the CapSense component is present in the design it will use the 8-bit IDAC and depending on the configuration it may also use the 7-bit IDAC. Block Diagram and Configuration The component uses the cy_psoc4_idac primitive with hardware enable connected to Logic High. It is configured using the CSD block configuration registers. DMA Support The DMA component can be used to transfer data from RAM to the component registers. Refer to the applicable device datasheet to check the DMA feature availability. Name of DMA Source/ Destination IDAC_1_IDAC_CONTROL_PTR Document Number: 001-96481 Rev. *A Length 32 bit Direction Source/ Destination DMA Req Signal N/A DMA Req Type N/A Description This register is intended to control the IDAC settings. See the device Technical Reference Manual (TRM) for details. Page 7 of 10 PSoC® Creator™ Component Datasheet PSoC 4 Current Digital to Analog Converter (IDAC) Note DMA support in the IDAC_P4 component is limited due to the following reasons: The IDAC_1_IDAC_CONTROL register is common for two IDACs (8-bit IDAC and 7-bit IDAC). The IDAC_1_IDAC_CONTROL register is common for the IDAC setting and IDAC data. Before using the DMA channel with the IDAC_P4 component, review the description of this register in the device registers Technical Reference Manual (TRM). Registers See the device TRM for more information about registers. DC and AC Electrical Characteristics Specifications are valid for –40 °C ≤ TA ≤ 85 °C and TJ ≤ 100 °C, except where noted. Specifications are valid for 1.71 V to 5.5 V, except where noted. Note The data for the PSoC 4200L device is preliminary. Final data will be delivered in an upcoming Component Pack. IDAC DC Specifications Parameter Description Conditions Resolution Iout Min Typ 7 Output current at code = 255 Range = 600uA, Resolution = 8 bits RLOAD = 600 Ω Range = 300uA, Max Units 8 bits - 612 - uA - 306 - uA - 304.8 - uA - 152.4 - uA - - Yes RLOAD = 600 Ω Output current at code = 127 Range = 300uA, Resolution = 7 bits RLOAD = 600 Ω Range = 150uA, RLOAD = 600 Ω Monotonicity EZS Zero scale error Temp = -40C to +70C - 0 +/- 1 LSB Eg Gain error Range = 600uA, 8-bit -10 - 10 % Range = 300uA, 8-bit -10 - 10 % Range = 300uA, 7-bit -10 - 10 % Range = 150uA, 7-bit -10 - 10 % Page 8 of 10 Document Number: 001-96481 Rev. *A PSoC® Creator™ Component Datasheet Parameter INL Description Integral nonlinearity DNL Differential nonlinearity Vcompliance Dropout voltage IDAC_SET8 PSoC 4 Current Digital to Analog Converter (IDAC) Conditions Min Typ Max Units Range = 600uA, 8-bit -3 - 3 LSB Range = 300uA, 8-bit -3 - 3 LSB Range = 300uA, 7-bit -3 - 3 LSB Range = 150uA, 7-bit -3 - 3 LSB Range = 600uA, 8-bit -1 - 1 LSB Range = 300uA, 8-bit -1 - 1 LSB Range = 300uA, 7-bit -1 - 1 LSB Range = 150uA, 7-bit -1 - 1 LSB Range = 600uA, 8-bit, Source 0.8V - - V Range = 600uA, 8-bit, Sink 0.8V - - V Range = 300uA, 7-bit, Source 0.8V - - V Range = 300uA, 7-bit, Sink 0.8V - - V - - 10 µs - - 10 µs Settling time to 0.5 LSB for 8- Full-scale transition. bit IDAC No external load. For PSoC 4000 / PSoC 4100 / PSoC 4200 devices only IDAC_SET7 Settling time to 0.5 LSB for 7- Full-scale transition. bit IDAC No external load. For PSoC 4000 / PSoC 4100 / PSoC 4200 devices only Component Changes This section lists the major changes in the component from the previous version. Version Description of Changes Reason for Changes / Impact 1.10.a Edited datasheet. Updated the IDAC DC Specifications 1.10 Added DMA support. Support for PSoC 4100M/PSoC 4200M devices. Updated the IDAC DC Specifications Data was missing from previous revision. 1.0.a Edited datasheet. Updated the current ranges. 1.0 Initial release Document Number: 001-96481 Rev. *A Page 9 of 10 PSoC 4 Current Digital to Analog Converter (IDAC) PSoC® Creator™ Component Datasheet © Cypress Semiconductor Corporation, 2012-2015. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control, or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. PSoC® is a registered trademark, and PSoC Creator™ and Programmable System-on-Chip™ are trademarks of Cypress Semiconductor Corp. All other trademarks or registered trademarks referenced herein are property of the respective corporations. Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as specified above is prohibited without the express written permission of Cypress. Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in lifesupport systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. Use may be limited by and subject to the applicable Cypress software license agreement. Page 10 of 10 Document Number: 001-96481 Rev. *A