| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
AN1760 Freescale Semiconductor, Inc. Interfacing AD8402 Digi
Top Searches for this datasheetOrder this document AN1760/D AN1760 Freescale Semiconductor, Inc. Interfacing AD8402 Digital Potentiometer MC68HC705J1A Mark Glenewinkel Field Applications Engineering Consumer Systems Group Austin, Texas Introduction digital potentiometer (DP) allows many applications mechanical trimming potentiometers replaced solid-state solution. digital potentiometer several benefits over mechanical potentiometer, including compact size, freedom from shock vibration, ability withstand oil, dust, temperature extremes, moisture. interface allows electronically controlled microprocessor microcontroller that user adjust system parameters quickly precisely. Also, automatic system initialization calibration point manufacture provided increase accuracy timeliness production line. Some applications are: Volume control panning (liquid crystal display) contrast control Automatic gain control Programmable filters, delays, time constants Power supply adjustment Motorola, Inc., 1998 AN1760 More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note major configurations include rheostat (2-terminal configuration) potentiometer divider (3-terminal configuration). This application note describes interface between MC68HC705J1A (J1A) Analog Devices, Inc.'s AD8402 create these configurations various analog circuits. Since does have serial module chip, software (input/output) driver created provide appropriate serial signals AD8402. Circuitry example code given demonstrate interface between parts. Freescale Semiconductor, Inc. AD8402 Overview AD8402 member series digital potentiometers. This family consists one, two, four potentiometers. These AD8400, AD8402, AD8403. This application note utilizes AD8402 with 50-k fixed resistance potentiometer. Features AD8400 series digital potentiometers provides these features: 256-position variable resistors Replaces one, two, four mechanical potentiometers Devices available resistance values Power shutdown mode consumes less than 3-wire SPI-compatible serial interface Midscale preset device power-up +2.7 volt +5.5 volt single-supply operation 8/14/24-pin (dual in-line), 8/14/24-pin SOIC (small outline integrated circuit), 14/24-pin TSSOP packages AN760 More Information This Product, www.freescale.com MOTOROLA Application Note AD8402 Overview Description Freescale Semiconductor, Inc. AD8400 series provides 256-position digitally controlled variable resistors (VR). designed with fixed resistor value that wiper contact that taps resistor point that determined 8-bit digital code. resistance between wiper either endpoint fixed resistor varies linearly with respect digital code latched into Each offers programmable resistance between terminal wiper terminal wiper. unique switching circuit minimizes inherent glitch found traditional switched resistor designs avoiding make-before-break break-before-make operation. Each latch hold 8-bit digital value defining wiper position. These latches updated from 3-wire (serial peripheral interface). bits make data word needed serial input register. first address bits select modify then followed eight data bits latch. bits clocked rising edge serial clock (most significant bit) first. starts serial transaction going then latches bits data clocked going back high. AD8402 provides system enhancements such reset shutdown. When goes low, values latches reset midscale value $80. When SHDN goes low, part forces resistor end-to-end open circuit terminal shorts terminal wiper. While shutdown mode, latches updated values. These changes will active when SHDN goes back high. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note AD8402 Hardware Interface Pinout Descriptions Figure Table illustrate describe AD8402 pinout. AGND Freescale Semiconductor, Inc. DGND SHDN Figure AD8402 Pinout Table AD8402 Descriptions Symbol AGND DGND SHDN Name Analog ground terminal terminal wiper Digital ground Shutdown Chip select Serial data Serial clock Reset Power I/O/PWR Description Analog ground; must connected DGND Terminal Terminal Wiper Ground digital circuitry Shutdown controls VR1, VR2; makes terminal open circuit Selects AD8042; when goes high, serial input register decoded data loaded Input serial interface Clock serial interface, positive edge triggered When goes low, reset midscale reading Positive power supply; specified operation AN760 More Information This Product, www.freescale.com MOTOROLA Application Note AD8402 Hardware Interface Table AD8402 Descriptions (Continued) Symbol Name wiper terminal terminal I/O/PWR Wiper Terminal Terminal Description Block Diagram Freescale Semiconductor, Inc. DGND AGND ADDRESS DECODE 8-BIT LATCH SHDN 10-BIT SERIAL LATCH 8-BIT LATCH SHDN SHDN Figure AD8402 Block Diagram Serial Timing serial port interface AD8402 shown Figure Only logic levels shown. Consult AD8402 data sheet detailed electrical characteristics needed. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Figure Serial Data Timing Freescale Semiconductor, Inc. Table logic truth table that describes interaction among CLK, SHDN pins. Table Control Truth Table Positive edge Positive edge Positive edge SHDN Register Activity effect; enables Shift from Load data into addressed latch operation Sets latches midscale reading Latches latches Open circuits terminals, connects wiper terminal AN760 More Information This Product, www.freescale.com MOTOROLA Application Note AD8402 Software Interface AD8402 Software Interface Data Format serial interface requires data format shown Figure First, address bits must sent. single channel AD8400, dual channel AD8402 which used this application note, next eight bits data value latched into Freescale Semiconductor, Inc. ADDR DATA Figure Data Format Programming Variable Resistor nominal resistance, RAB, between terminals AD8402 used this application note resistive contact points that accessed wiper terminal plus terminal contact. 8-bit value $00, wiper starts terminal. terminal inherent resistance next resistive connection digital value $01. value equal terminal resistance plus resistor value. 50-k part that used, this amount equal k/256 195.3125 Therefore, resistive value 245.3125 +195.3125 Each increase moves wiper resistor ladder until last point hit. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Resistive value between terminal wiper described RWB(D) (RAB/256) where resistance between wiper terminal digital value latch nominal resistance between terminal resistance terminal Freescale Semiconductor, Inc. Table illustrates this relationship. Table Resistance Values with 49,854.6875 25,050 245.3125 Output State Full scale Midscale least significant (LSB) Zero-scale NOTE: Note that zero-scale value produces resistance Care should taken limit current flow between wiper terminal maximum value totally symmetrical. resistance between wiper terminal also produces resistance value RWA. When setting resistance RWA, digital value starts resistance setting maximum value. digital value increased, resistance decreases. This described RWA(D) (256-D) (RAB/256) where resistance between wiper terminal digital value latch nominal resistance between terminal resistance terminal AN760 More Information This Product, www.freescale.com MOTOROLA Application Note Digital Potentiometer Applications Table illustrates this relationship. Table Resistance Values with 245.3125 25,050 49,854.6875 50,050 Output State Full scale Midscale least significant (LSB) Zero scale Freescale Semiconductor, Inc. Programming Potentiometer Divider digital potentiometer easily used generate output voltage proportional voltage applied between terminals terminal connected with terminal connected ground, wiper voltage range less than Each equal voltage across terminals divided 256. wiper's output voltage described VW(D) (D/256) where voltage wiper digital value latch voltage across terminal voltage terminal Digital Potentiometer Applications Many applications utilize digital potentiometer replace traditional mechanical resistors. When using AD8042, certain boundary conditions must observed proper operation. First, analog signals must remain within range used supply AD8042. potentiometer divider circuit driving lowimpedance load, buffer wiper with rail-to-rail like MC33201, OP191, OP279. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Second, bipolar applications signals, virtual ground will needed bias properly. virtual ground must connected virtual ground also must able sink source current with connected loads. following circuits show some basic circuits circuits implementing digital potentiometer program circuit parameters. Variable Resistor Freescale Semiconductor, Inc. Figure shows programmable resistor digital rheostat configuration AD8042. Figure Programmable Resistor Potentiometer Divider Figure shows programmable potentiometer divider AD8042. Figure Programmable Potentiometer Divider AN760 More Information This Product, www.freescale.com MOTOROLA Application Note Digital Potentiometer Applications Inverting Figure shows channel AD8042 connected inverting programmable circuit. virtual ground +2.5 volts allow signal span +/-2.5-V range. rail-to-rail provide maximum output swing. When powered wiper midscale position $80. According transfer function: VOut (RWB/RWA) Freescale Semiconductor, Inc. This will provide gain digital value increases above midscale position, increases decreases. This will have effect amplifying input signal. digital value decreases, decreases increases this will attenuate signal. VOut 2.5-V OFFSET Figure Programmable Inverting Non-Inverting Figure shows channel AD8042 connected non-inverting programmable circuit. virtual ground +2.5 volts allow signal span +/-2.5-volt range. rail-to-rail provide maximum output swing. When powered wiper midscale position $80. According transfer function: VOut= (1+(RWB/RWA)) This will provide gain digital value increases above midscale position, increases decreases. This will have effect amplifying input signal. digital value decreases, decreases increases this will attenuate signal. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note VOut 2.5-V OFFSET Freescale Semiconductor, Inc. Figure Programmable Non-Inverting Differential Figure shows channels AD8042 connected differential programmable circuit. virtual ground +2.5 volts allow signal span +/-2.5-volt range. rail-to-rail provide maximum output swing. When powered wiper midscale position $80. According transfer function: VOut V2In*(RWB2/RWA2) V1In*(RWB1/RWA1) This will provide output voltage V2In V1In. resistor values changed needed provide amplification attenuation each input voltage. AN760 More Information This Product, www.freescale.com MOTOROLA Application Note Layout Considerations V1In VOut V2In Freescale Semiconductor, Inc. V-DC OFFSET Figure Programmable Differential Layout Considerations Many considerations apply when laying mixed signal designs such AD8042 MC68HC705J1A (J1A). Analog signal integrity greatly affected proper layout design followed. ensure proper mixed-signal designs, these design considerations: Physically separate critical analog circuits from MCU's digital circuits. possible, split board half separate analog digital circuits. Each half will have power ground system will connected single post. possible, analog lines trace cross digital lines. this must happen, make sure they cross right angles each other. power ground traces isolate analog-input pins from digital pins. With quality ceramic capacitors, bypass power supplies proper ground operational amplifier power pins. Keep bypass capacitors lead lengths short possible. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note bypass low-frequency power supply noise, tantalum aluminum electrolytic capacitors These should placed near point power supplies enter board. economically possible, separate analog digital ground planes. ground planes should tied together lowimpedance power-supply source. MC68HC705J1A Hardware Interface Freescale Semiconductor, Inc. With only pins, smaller members HC05 Family. total 1240 bytes erasable programmable read-only memory (EPROM) includes (input/output) pins. schematic used testing AD8402 interface MMEVS development system shown Figure pins used drive AD8402 are: Port This (CLK) configured output drive serial clock pin, CLK. Port This (SDO) configured output transmit data pin. Port This (CS) configured output drive chip select pin, Port This (RS) configured output drive reset pin, further information MC68HC705J1A, consult MC68HC705J1A Technical Data, Motorola document order number MC68HC705J1A/D. test circuit designed test operation AD8402. used test potentiometer voltage divider. voltage created measured TP1. used test variable potentiometer rheostat. resistance created measured across TP3. AN760 More Information This Product, www.freescale.com MOTOROLA Application Note MC68HC705J1A Test Software AD8402 AGND DGND SHDN Freescale Semiconductor, Inc. MMEVS INTERFACE Figure AD8402 Interface Test Circuit MC68HC705J1A Test Software flowcharts I/O-driven AD8402 appear Figure Figure Figure shows flowchart transmit routine AD8402. This routine written especially AD8402 fullfeatured representation Motorola's (serial peripheral interface) module found other microcontrollers. Enhancements routine were included maximize code's efficiency. driving process toggling pins with software instructions emulate certain piece hardware peripheral. General pins used send correct serial transmission protocol AD8402. HC05 provides special instructions specifically manipulate single pins. AD8402 serial stream shown Figure will recreated three pins J1A. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note This transmission been into subroutine called TXD. flowchart Figure This subroutine detailed here. Start transmission written low. Initialization Load register with counter. Write serial output VR_ADDR read. high, written pin. low, written pin. Freescale Semiconductor, Inc. Clock serial clock written high then written low. Rotate VR_ADDR VR_DATA Arithmetically shift left VR_DATA then rotate left VR_ADDR (bit next sent VR_ADDR. loop done? register decremented checked code executed start writing pin, step This loop continues until transmissions completed. transmission written high data latched into AD8402. Return from subroutine. Figure shows flowchart main test routine. sequence tests With volts connected ground, create 1.25 volts Test voltage TP1. Reset AD8402. voltage should read With open, create ~10-k resistance VR2. Measure this resistance across TP3. Create ramping voltage waveform TP1. Using oscilloscope, verify that waveform ramps from volts volts. assembly code test routine provided Code Listing. AN760 More Information This Product, www.freescale.com MOTOROLA Application Note Development Tools Development Tools interface created tested using these development tools: M68MMPFB0508 Motorola MMEVS platform board M68EM05J1A Motorola emulation module Version 1.02 Editor, assembler, debugger Microcomputer Systems, Inc. Freescale Semiconductor, Inc. References MC68HC705J1A Technical Data, Motorola document order number MC68HC705J1A/D, 1996. M68HC05 Applications Guide, Motorola document order number M68HC05AG/AD, 1996. AD8402 Datasheet, Analog Devices, Inc., 1997. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note COUNTER VR_ADDR Freescale Semiconductor, Inc. TOGGLE HIGH THEN ARITHMETIC SHIFT LEFT VR_DATA ROTATE LEFT VR_ADDR DECREMENT LOOP DONE? RETURN FROM Figure Serial Driver Flowchart AN760 More Information This Product, www.freescale.com MOTOROLA Application Note References START INITIALIZE SER_PORT Data Direction PortA Freescale Semiconductor, Inc. CREATE 1.25 Store address Store data AD8402 RESET AD8402, CREATE rheostat Store address Store data 5510 AD8402 COUNTER Store address CREATE VOLTAGE RAMP WAVEFORM Store COUNTER VR_DATA AD8402 COUNTER COUNTER Figure Main Test Routine Flowchart AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Code Listing File name: AD8402.ASM Example Code MC68HC705J1A Interface Analog Devices Digital Potentiometer Ver: Date: June 1998 Author: Mark Glenewinkel Motorola Field Applications Consumer Systems Group Assembler: 1.02 code explanation flow charts, please consult Motorola Application Note "Interfacing AD8402 Digital Potentiometer MC68HC705J1A" Literature order number AN1760/D SYSTEM DEFINITIONS EQUATES Internal Register Definitions PORTA ;PortA DDRA ;data direction PortA Application Specific Definitions SER_PORT Freescale Semiconductor, Inc. ;PortA SER_PORT ;PortA, data signal ;PortA, clock signal ;PortA, chip select ;PortA, reset signal ;address ;address Memory Definitions EPROM RESET $300 $7FE ;start EPROM ;start ;vector reset VARIABLES VR_ADDR ;storage addr sent VR_DATA ;storage data sent COUNTER ;temp counter AN760 More Information This Product, www.freescale.com MOTOROLA Application Note Code Listing MAIN ROUTINE EPROM ;start beginning EPROM Initialize Ports START bclr CLK,SER_PORT ;CLK=0 bclr SDO,SER_PORT ;SDO=0 bset CS,SER_PORT ;CS=1 bset RS,SER_PORT ;RS=1 Create 1.25V #%00001111 DDRA ;make SER_PORT pins outputs Freescale Semiconductor, Inc. #VR1 VR_ADDR #$40 VR_DATA ;address ;1/4 voltage range ;send address data Reset AD8402, W1=2.5V bclr RS,SER_PORT bset RS,SER_PORT ;RS=0 ;RS=1 Create ~10K reading rheostat #VR2 VR_ADDR ;address #51T VR_DATA ;1/5 resistor change ;send address data Create voltage ramp waveform COUNTER RAMP_LOOP #VR1 VR_ADDR COUNTER VR_DATA COUNTER RAMP_LOOP ;COUNTER=0 ;address ;data=COUNTER ;send address data ;COUNTER=COUNTER+1 ;infinite loop AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Routine takes contents VR_ADDR VR_DATA sends them AD8402, first VR_ADDR VR_DATA destroyed bclr CS,SER_PORT ;CS=0 WRITE brclr bset bclr bset bclr decx bset #10T 1,VR_ADDR,CLR SDO,SER_PORT CLOCK_IT SDO,SER_PORT CLK,SER_PORT CLK,SER_PORT VR_DATA VR_ADDR WRITE CS,SER_PORT ;set counter ;Check VR_ADDR ;SDO=1 ;branch clock_it ;SDO=0 ;evens ;CLK=1 ;CLK=0 ;rotate left VR_DATA ;C=MSB VR_DATA ;rotate left with ;decrement counter ;loop over? ;CS=1, latch data ;return from Freescale Semiconductor, Inc. CLOCK_IT VECTOR TABLE RESET START AN760 More Information This Product, www.freescale.com MOTOROLA Application Note Code Listing Freescale Semiconductor, Inc. AN1760 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Freescale Semiconductor, Inc. Motorola reserves right make changes without further notice products herein. Motorola makes warranty, representation guarantee regarding suitability products particular purpose, does Motorola assume liability arising application product circuit, specifically disclaims liability, including without limitation consequential incidental damages. "Typical" parameters which provided Motorola data sheets and/or specifications vary different applications actual performance vary over time. operating parameters, including "Typicals" must validated each customer application customer's technical experts. Motorola does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support sustain life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such unintended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part. Motorola registered trademarks Motorola, Inc. Motorola, Inc. Equal Opportunity/Affirmative Action Employer. reach USA/EUROPE/Locations Listed: Motorola Literature Distribution, P.O. 5405, Denver, Colorado 80217, 1-800-441-2447 1-303-675-2140. Customer Focus Center, 1-800-521-6274 JAPAN: Nippon Motorola Ltd.: SPD, Strategic Planning Office, 141, 4-32-1 Nishi-Gotanda, Shinagawa-ku, Tokyo, Japan. 03-5487-8488 ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd., Ping Industrial Park, Ting Road, N.T., Hong Kong. 852-26629298 MfaxTM, Motorola Back System: RMFAX0@email.sps.mot.com; http://sps.motorola.com/mfax/; TOUCHTONE, 1-602-244-6609; Canada ONLY, 1-800-774-1848 HOME PAGE: http://motorola.com/sps/ Mfax trademark Motorola, Inc. Motorola, Inc., 1998 AN1760/D More Information This Product, www.freescale.com Other recent searchesNEZ7785-15D - NEZ7785-15D NEZ7785-15D Datasheet 15DL - 15DL 15DL Datasheet NEZ7785-8D - NEZ7785-8D NEZ7785-8D Datasheet NEZ7785-4D - NEZ7785-4D NEZ7785-4D Datasheet NEZ7785-4DL - NEZ7785-4DL NEZ7785-4DL Datasheet NEZ7785-8DL - NEZ7785-8DL NEZ7785-8DL Datasheet LT4617E - LT4617E LT4617E Datasheet IRFS4227PbF - IRFS4227PbF IRFS4227PbF Datasheet
Privacy Policy | Disclaimer |