Incremental ADC Data Sheet

Similar documents
PSoC Blocks. CY8C20xx6/6A/6AS/6H/6L, CY8C20xx7/7S, CY7C643xx, CY7C604xx, CYONS2xxx, CYONSxNxxxx, CYRF89x35, CY8C20065, CY8C24x93, CY7C69xxx

CY7C603xx CYWUSB

Preliminary. Gas Sensor Analog Front End Datasheet GasSensorAFE V Features and Overview. This datasheet contains Preliminary information.

4 to 1 Analog Multiplexer Data Sheet

8 to 1 Analog Multiplexer Datasheet AMux8 V 1.1. Features and Overview

For one or more fully configured, functional example projects that use this user module go to

LPF (Optional) CY8C24x93. Without LPF and ISR to 3* With LPF only** to 3* With ISR only to 3*

Supported Devices: CY8C28x13, CY8C28x33, CY8C28x43, CY8C28x45, CY8C28x52, CY8C21x45, CY8C22x45, CY8C24x93. CY8C24x

Programmable Threshold Comparator Data Sheet

CapSense I 2 C/SPI Timer Flash RAM

Programmable Gain Amplifier Datasheet PGA V 3.2. Features and Overview

Shadow Registers Datasheet ShadowRegs V 1.1. Features and Overview

Use the Status Register when the firmware needs to query the state of internal digital signals.

This optional pin is present if the Mode parameter is set to SyncMode or PulseMode. Otherwise, the clock input does not show.

16-Bit Hardware Density Modulated PWM Data Sheet

Comparator (Comp) Features. General Description. When to use a Comparator 1.60

Use the Status Register when the firmware needs to query the state of internal digital signals.

DMX512 Receiver Datasheet DMX512Rx V 1.0. Features and Overview

Filter_ADC_VDAC_poll Example Project Features. General Description. Development Kit Configuration

24-Bit Pseudo Random Sequence Generator Data Sheet

This optional pin is present if the Mode parameter is set to SyncMode or PulseMode. Otherwise, the clock input does not show.

Use the IDAC8 when a fixed or programmable current source is required in an application.

Voltage Reference (Vref) Features. General Description. Input/Output Connections. When to Use a Vref Voltage references and supplies

1st Order Modulator nd Order Modulator

1st Order Modulator nd Order Modulator

PSoC 4 Low Power Comparator (LPComp) Features. General Description. When to Use a LPComp 2.0. Low input offset. User controlled offset calibration

Writing to Internal Flash in PSoC 3 and PSoC 5

Cypress HX2VL Configuration Utility Blaster User Guide

CE PSoC 4: Time-Stamped ADC Data Transfer Using DMA

6 to 14-Bit Delta Sigma ADC DatasheetDelSigMultiV 1.30

HX2VL Development Kit Guide. Doc. # Rev. **

CY8C29/27/24/23/21xxx, CY8CLED02/04/08/16, CY8CLED0xD, CY8CLED0xG, CY8C28x45, CY8CPLC20, CY8CLED16P01, CY8C28xxx. Main UM

HX2VL Development Kit Guide. Doc. # Rev. *A

Comparator Datasheet CMP V 1.1. Features and Overview

PSoC Creator Component Datasheet

Reviving Bit-slice Technology in a Programmable Fashion

Triple Input 8-Bit Incremental ADC Datasheet TriADC8 V Features and Overview. See AN2239, ADC Selection Guide for other converters.

Libraries Guide. Arithmetic Libraries User Guide. Document #: Rev. *A

The color of the Clock component waveform symbol will change based on the clock's domain (as shown in the DWR Clock Editor), as follows:

THIS SPEC IS OBSOLETE

PSoC 1 I 2 C Bootloader

Supported devices: CY8C29x66, CY8C27x43, CY8C28xxx, CY8C24x23, CY8C24x33, CY8C21x23, CY8C21x34, CY8C21x45, CY8C22x45, CY8C24x94

CY8C29/27/24xxx, CY8CLED04/08/16, CY8CLED0xD, CY8CLED0xG, CY8C28x45, CY8CPLC20, CY8CLED16P01, CY8C28x43, CY8C28x52

EZ I 2 C Slave. Features. General Description. When to use a EZ I 2 C Slave 1.50

The AMuxSeq is capable of having between 2 and 32 analog inputs. The paired inputs are present when the MuxType parameter is set to "Differential.

FTG Programming Kit CY3670. Spec. # Rev. *C

7- to 13-Bit Variable Resolution Incremental ADC Datasheet ADCINCVR V 4.00

The following table lists user modules used in this code example and the hardware resources occupied by each user module.

Triple Input 7- to 13-Bit Incremental ADC Datasheet TriADC V Features and Overview

CYClockMaker Programming Kit Guide CY3675. Doc. # Rev. **

THIS SPEC IS OBSOLETE

GPIF II Designer - Quick Start Guide

Cypress HX2VL Configuration Utility Blaster User Guide

CE58957 demonstrates how to implement the fade and toggle feature to the backlight LEDs of CapSense buttons.

AN SIO Tips and Tricks in PSoC 3 / PSoC 5. Application Note Abstract. Introduction

CE56273 Associated Part Families: CY8C38xx/CY8C55xx Software: PSoC Creator Related Hardware: CY8CKIT-001 Author: Anu M D

32-Bit Counter Datasheet Counter32 V 2.5. Features and Overview

This section describes the various input and output connections for the Voltage Fault Detector.

PSoC 4 Current Digital to Analog Converter (IDAC)

CYClockMaker Programming Kit Guide CY3675. Doc. # Rev. *C

PSoC 4 Voltage Comparator (Comp) Features. General Description. When to Use Comparator Low input offset. User controlled offset calibration

Next-Generation Hot-Swap Controllers

CY3660-enCoRe V and encore V LV DVK Kit Guide

PSoC 6 Current Digital to Analog Converter (IDAC7)

This Application Note demonstrates an SPI-LIN slave bridge using a PSoC device. Demonstration projects are included.

Use a DieTemp component when you want to measure the die temperature of a device.

One 32-bit counter that can be free running or generate periodic interrupts

This section describes the various input and output connections for the Voltage Fault Detector.

Use the Status Register when the firmware needs to query the state of internal digital signals.

Comparator (Comp) Features. General Description. When to use a Comparator Low input offset. User controlled offset calibration

This optional pin is present if the Mode parameter is set to SyncMode or PulseMode. Otherwise, the clock input does not show.

AN EZ-USB FX3 I 2 C Boot Option. Application Note Abstract. Introduction. FX3 Boot Options

144-Mbit QDR -II SRAM 2-Word Burst Architecture

12-Mbit (512 K 24) Static RAM

THIS SPEC IS OBSOLETE

Supports one or two address decoding with independent memory buffers. Memory buffers provide configurable Read/Write and Read Only regions

Clock Programming Kit

Automatic reload of the period to the count register on terminal count

Release Notes SRN065 PSoC Programmer Version Release Date: November 9, 2009

Voltage Fault Detector (VFD) Features. General Description. Input/Output Connections. When to Use a VFD. Clock Input 2.30

PSoC Designer Release Notes

Optional Pause Pulse for constant frame length of 282 clock ticks

4K x 8 Dual-Port Static RAM and 4K x 8 Dual-Port SRAM with Semaphores

FM3 MB9B100A/300A/400A/500A Series Inverter Solution GUI User Guide

Scanning Comparator (ScanComp) Features. General Description. Input/Output Connections. When to Use a Scanning Comparator. clock - Digital Input* 1.

PSoC Programmer 3.12 Release Notes

For one or more fully configured, functional example projects that use this user module go to

AN1090. NoBL : The Fast SRAM Architecture. Introduction. NoBL SRAM Description. Abstract. NoBL SRAM Operation

Bootloader project - project with Bootloader and Communication components

Programmer User Guide

Base Timer Channel (BT) Features. General Description. When to Use a PDL_BT Component 1.0

For one or more fully configured, functional example projects that use this user module go to

EZ-USB FX3 Development Kit Guide

PSoC 4 Operational Amplifier (Opamp) Features. General Description. When to Use the Opamp Follower or Opamp configuration

Analog Multiplexer (AMux) Features. General Description. Input/Output Connections. When to Use an AMux Single or differential connections

This input determines the next value of the output. The output does not change until the next rising edge of the clock.

Use the Status Register when the firmware needs to query the state of internal digital signals.

PSoC Designer Quick Start Guide

Digital Multiplexer and Demultiplexer. Features. General Description. Input/Output Connections. When to Use a Multiplexer. Multiplexer 1.

Sequencing Successive Approximation ADC (ADC_SAR_Seq) Features. General Description. When to Use the ADC_SAR_Seq 2.0. Supports PSoC 5LP devices

Transcription:

4. Incremental ADC Incremental ADC Data Sheet Copyright 2008-2009 Cypress Semiconductor Corporation. All Rights Reserved. ADCINC PSoC Resources Blocks API Memory Pins (per CapSense I2C/SPI Timer Comparator Flash RAM External IO) CY8C20x96, CY8C20x66, CY8C20x46, CY8C20x36, CY7C643/4/5xx, CY7C60413, CY7C60424, CY7C6053x, CYONS2010, CYONSTB2010, CYONS2011, CYONSTB2011, CYONSFN2051, CYONSFN2053, CYONSFN2061, CYONSFN2151, CYONSFN2161, CYONSFN2162, CY8CTST200, CY8CTMG2xx For one or more fully configured, functional example projects that use this User Module go to www.cypress.com/psocexampleprojects. Features and Overview 8 to 10-bit resolution Sample rate up to 5.859 ksps (10-bit resolution) Sample rate up to 23.4375 ksps (8-bit resolution) Input range 0 to 1.2V Internal clock divider with frequencies of 6, 3, and 1 MHz - - - - 1000 100 1 The ADCINC User Module implements an incremental analog to digital converter with a selectable range of 8 to 10 bits and signed or unsigned data formats. The input voltage range is fixed at 0 to 1.2V. The ADCINC programming interface allows the user to select between polling the SPC or checking a status bit that is set with the SPC interrupt. This ADC is actually part of the SPC. All access to control and recover the result is through two registers used to interface the main M8C processor and the SPC. The ADC consist of a timer that determines the conversion time and the resolution, a counter to accumulated the result, and an analog modulator. PMUX 16-Bit Timer agnd INP INN COMP 16-Bit Counter Vin agnd NMUX agnd V refp V refn ADCINC Block Diagram Cypress Semiconductor Corporation 198 Champion Court San Jose, CA 95134-1709 408-943-2600 Document Number: 001-45836 Rev. *C Revised October 12, 2009

The ADCINC User Module contains an integrator block, one comparator with positive input set by the PMUX and negative input set by the NMUX. The input to the integrator stage comes from the Analog Global Input Mux with full scale input being 0V to 1.2V. The ADC is run for a number of cycles set by the Timer depending upon the resolution of the ADC desired by the user. A counter counts the number of trips by the comparator, which is proportional to the input voltage. The SPC clock speed is 36 MHz and is divided down to 1 to 6 MHz for ADCINC operation. Functional Description The range of the ADCINC is set at 0 to 1.2V. The analog block is configured as a integrator that can be reset. Depending on the output polarity, the reference control is configured so that the reference voltage is either added or subtracted from the input and placed in the integrator. This reference control attempts to pull the integrator output back towards AGND. If the integrator is operated 2 Bits times and the output voltage comparator is positive "n" of those times, the residual voltage (V resid ) at the output is: Result = V in -------- ( 2 n ) V ref Equation 1 This equation states that the range of this ADC is 0 to V ref, the resolution (LSB) is V ref /2n, and the voltage on the output at the end of the computation is defined as the residue. Since V resid is always less than V ref, V resid /2 Bits less than half a LSB and can be ignored. The accumulated value is sampled at the start and finish of the integrate time. A single cycle is added to reset the integrator and process the answer. Timing for ADCINC The PWM is set up to generate an interrupt every 2 n counts. This causes the input to be sampled 64 times. This defines one integrate cycle. The decimator counter is set up to accumulate 2 n /64 bits of these integrate cycles. The accumulated value is sampled at the start and finish of the integrate time. A single cycle is added to reset the integrator and process the answer. Because the ACDINC control is interrupt based and the sample time is relatively long, it is unreasonable to expect the processor to wait while a sample is being processed. The primary communication between the ADC routine and the main program is a data-available flag that may be polled. APIs are available to check the data flag and retrieve data. The data handler was designed to be poll based. If an interrupt-based data handler is desired, applicationspecific data handler code can be added to the interrupt routine _ADCINC_ADConversion_ISR, located in the assembly file adcincint.asm. The place to insert code is clearly marked. The frequency domain magnitude plot below normalizes the frequency so the sample rate, F nom = 1.0. The -3 db point occurs at 0.443 F nom and zeros of the function occur at each integer multiple of F S. Since the ADCINC PWM is set for a resolution of 14 bits, it actually samples 16385 times faster than the nominal output rate, the Nyquist limit is 8192 higher, 13 octaves above F nom, which significantly reduces the requirements for an anti-alias filter. The Nyquist limit is 12 octaves for 13 bits of resolution, 11 octaves for 12 bits of resolution, and so on. Document Number: 001-45836 Rev. *C Page 2 of 7

DC and AC Electrical Specifications The following table lists the guaranteed maximum and minimum specifications. Unless stated otherwise, the specifications are for the entire device voltage and temperature operating range: 40 C <= TA <= 85 C, 1.71V <= Vdd <= 5.5V. Electrical Specification Description Min Typ Max Units Conditions and Notes Input Input Voltage Range 0 V REFADC V 1.2V ± 5% Input Capacitance 5 pf Input Resistance 1/ (500fF*Data -Clock) 1/ (400fF*Data -Clock) 1/ (300fF*Data -Clock) Ω Reference ADC Reference Voltage 1.14 1.26 V Conversion Rate Equivalent switched cap input resistance for 8-, 9-, or 10-bit resolution. Data Clock 2.25 6 MHz Source is chip s internal main oscillator. See AC Chip- Level Specifications for accuracy. 8-Bit Sample Rate 23.4375 ksps Data Clock set to 6 MHz. Sample Rate = 0.001/ (2^Resolution/Data Clock) 10-Bit Sample Rate 5.859 ksps Data Clock set to 6 MHz. Sample Rate = 0.001/ (2^Resolution/Data Clock) DC Accuracy Resolution 8 10 bits Can be set to 8-, 9-, or 10-bit Differential Nonlinearity -1 +2 LSB Integral Nonlinearity -2 +2 LSB Offset Error 0 12.8 76.8 LSB 10-bit resolution Gain Error -5 5 %FSR For any resolution Power Operating Current 2.1 2.6 ma Power Supply Rejection 24 db PSRR (Vdd>3.0V) Ratio 30 db PSRR (Vdd < 3.0V) Placement The ADCINC User Module is implemented in software and does not require placement. Document Number: 001-45836 Rev. *C Page 3 of 7

Parameters and Resources After the ADCINC is placed, these parameters must be configured for proper operation: ADC Resolution, and Clock Divider. ADC Resolution This selection determines the data format of the return result. Valid resolution options are from 8 to 10 bits. Set by cap select (Cs Select) and Timer period. Clock Divider The Data Clock determines the sample rate. The maximum DataClock that can be used is 6 MHz. This is due to limitations of the Switched Cap blocks. The maximum sample rate for each of the various bit rates are listed in the following table. Operation at absolute maximum sample rate results in reduced accuracy and does not meet the INL/DNL specs listed in the AC and DC electrical specifications. Resolution Max Counts Recommended Maximum Sample Rate 8-bit 255 23.43 ksps 9-bit 511 11.71 ksps 10-bit 1023 5.85 ksps The sample window determines the normal mode frequencies the ADC rejects. It is defined as: SampleRate = 2 Bits ---------------------------- DataClock Equation 2 Application Programming Interface The Application Programming Interface (API) routines are provided as part of the user module to allow the designer to deal with the module at a higher level. This section specifies the interface to each function together with related constants provided by the include files. Each time a user module is placed, it is assigned an instance name. By default, PSoC Designer assigns the ADCINC_1 to the first instance of this user module in a given project. It can be changed to any unique value that follows the syntactic rules for identifiers. The assigned instance name becomes the prefix of every global function name, variable and constant symbol. In the following descriptions the instance name has been shortened to ADCINC for simplicity. Note In this, as in all user module APIs, the values of the A and X register may be altered by calling an API function. It is the responsibility of the calling function to preserve the values of A and X before the call if those values are required after the call. This registers are volatile policy was selected for efficiency reasons and has been in force since version 1.0 of PSoC Designer. The C compiler automatically takes care of this requirement. Assembly language programmers must ensure their code observes the policy, too. Though some user module API function may leave A and X unchanged, there is no guarantee they may do so in the future. Document Number: 001-45836 Rev. *C Page 4 of 7

ADCINC_Start Description: The ADCINC for this device is internally constructed to connect to only two sources: 1. Internal temp sensor 2. Analog mux bus If the analog Mux bus is chosen, an external pin may also be connected to the same mux bus to provide an external sense point. C Prototype: void ADCINC_Start (BYTE bmux) Assembly: mov A, bmux lcall ADCINC_Start Parameters: bmux: One byte that specifies the connection chosen as described above. Symbolic names provided in C and assembly, and their associated values, are listed in the following table: Return Value: Side Effects: The A and X registers may be modified by this or future implementations of this function. The same is true for all RAM page pointer registers in the Large Memory Model. When necessary, it is the calling function's responsibility to preserve the values across calls to fastcall16 functions. ADCINC_Stop Symbolic Name Value ADCINC_INPUT_ANALOG_BUS 0 ADCINC_INPUT_TEMP_SENSOR 1 Description: Disables the ADC in the SPC. C Prototype: void ADCINC_Stop (void) Assembly: lcall ADCINC_Stop Parameters: Return Value: Side Effects: The A and X registers may be modified by this or future implementations of this function. The same is true for all RAM page pointer registers in the Large Memory Model. When necessary, it is the calling function's responsibility to preserve the values across calls to fastcall16 functions. Document Number: 001-45836 Rev. *C Page 5 of 7

ADCINC_GetSample Description: Runs the ADC until one ADC sample is complete. C Prototype: WORD ADCINC_GetSamples (void) Assembly: lcall ADCINC_GetSample Parameters: Return Value: WORD (ADC_reading) Side Effects: The A and X registers may be modified by this or future implementations of this function. The same is true for all RAM page pointer registers in the Large Memory Model. When necessary, it is the calling function's responsibility to preserve the values across calls to fastcall16 functions. Currently, only the CUR_PP page pointer register is modified. Sample Firmware Source Code The following sample code polls the Flag register and sends the data to a routine that shifts the data out one of the I/O pins: include "m8c.inc" ; Part specific constants and macros include "PSoCAPI.inc" ; PSoC API definitions for all User Modules export _main _main: M8C_SetBank1 mov reg[mux_cr1], 0x10 ; //connect p1_4 to the mux bus M8C_SetBank0 M8C_EnableGInt ; enable global interrupts mov a,adcinc_input_analog_bus ; set ADC Mode call ADCINC_Start loop1: call ADCINC_GetSample ;places WORD data in A and X jmp loop1 Here is a similar project written in C: //------------------------------------------------------------------------ // Sample C Code for the ADCINC // Continuously Sample input voltage // //------------------------------------------------------------------------ #include <m8c.h> // part specific constants and macros #include "PSoCAPI.h" // PSoC API definitions for all User Modules INT val; void main() { Document Number: 001-45836 Rev. *C Page 6 of 7

// Insert your main routine code here. val = 0xaa; LCD_Start(); LCD_Position(1,0); LCD_PrCString("value = "); //connect the pins up M8C_SetBank1; MUX_CR1 = 0x10; //connect p1_4 to the mux bus M8C_SetBank0; ADCINC_Start(ADCINC_INPUT_ANALOG_BUS); val = ADCINC_GetSample(); LCD_Position(1,8); LCD_PrHexInt(val); val = ADCINC_GetSample(); LCD_Position(1,8); LCD_PrHexInt(val); } while(1) { val = ADCINC_GetSample(); LCD_Position(1,8); LCD_PrHexInt(val); } Configuration Registers This ADC has no user registers. Any settings must be performed through the API. Document Number: 001-45836 Rev. *C Revised October 12, 2009 Page 7 of 7 Cypress Semiconductor Corporation, 2008-2009. 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 lifesupport systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges. PSoC Designer and Programmable System-on-Chip are trademarks and PSoC is a registered trademark 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 life-support 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.