| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
AN1754 Freescale Semiconductor, Inc. Interfacing MC68HC705J1
Top Searches for this datasheetOrder this document AN1754/D AN1754 Freescale Semiconductor, Inc. Interfacing MC68HC705J1A DS1620 Digital Thermometer Mark Glenewinkel Field Applications Engineering Consumer Systems Group Austin, Texas Introduction Measuring temperature always trivial task. Most sensors used read temperature transduce reading electrical signal. These sensors provide voltage level relative temperature reading. This voltage converted digital number using analog-to-digital converter where then processed microprocessor microcontroller. DS1620 Digital Thermometer from Dallas Semiconductor provides single-chip solution that reads temperature converts 9-bit digital value. This data then read from DS1620 serial interface microcontroller (MCU). device also provides three thermal alarm outputs thermostatic control. This application note describes interface between MC68HC705J1A (J1A) DS1620 that used measure temperature range +125 Since does have serial module chip, software driver created provide appropriate serial signals DS1620. Circuitry example Motorola, Inc., 1998 AN1754 More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note code included here demonstrate interface between parts. Features DS1620 provides these features: external components required Supply voltage range volts. Measures temperature from +125 increments. equivalent Fahrenheit range +257 increments. Temperature read 9-bit value. Conversion time second (max). Thermostatic settings user-definable non-volatile (EEPROM). Data transceived 3-wire serial bus. Available 8-pin SOIC packages Freescale Semiconductor, Inc. Description DS1620 provides 9-bit temperature data which indicates temperature chip. data communicated 3-wire serial interface. User-defined temperature settings stored non-volatile memory. Three thermal alarm outputs thermostat, signifying user-defined thresholds. THigh driven high DS1620's temperature greater than equal user-defined temperature, TLow driven high DS1620's temperature less than equal user-defined temperature, AN1754 More Information This Product, www.freescale.com MOTOROLA Application Note DS1620 Hardware Interface TCOM used derive hysteresis between THigh TLow pins. driven high when temperture exceeds stays high until temperature falls below that DS1620 Hardware Interface Freescale Semiconductor, Inc. Pinout Descriptions Figure Table illustrate describe DS1620 pinout. CLK/CONV THigh TLow TCOM Figure DS1620 Pinout Table DS1620 Descriptions Symbol CLK/CONV TCOM TLow THigh Name Data input/output Clock Reset Ground High/low combination trigger temp trigger High temp trigger Supply voltage I/O/PWR Description 3-wire port data 3-wire port clock 3-wire port reset System ground Goes high when temperature exceeds will reset when temperature falls below Goes high when temperature falls below Goes high when temperature exceeds System power range AN1754 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Block Diagram temperature sensor shown Figure uses oscillators that have particular temperature coefficients derive temperature reading. detailed information this process, consult DS1620 data sheet. STATUS REGISTER CONTROL LOGIC TEMPERATURE SENSOR 3-WIRE INTERFACE HIGH TEMPERATURE TRIGGER, TEMPERATURE TRIGGER, DIGITAL COMPARATOR LOGIC THigh Freescale Semiconductor, Inc. TLow TCOM Figure DS1620 Block Diagram Serial Timing Read write data transfer timing shown Figure Figure Only logic levels shown here. Consult DS1620 data sheet detailed electrical characteristics needed. DATA DATA FIRST Figure Serial Data Read Timing AN1754 More Information This Product, www.freescale.com MOTOROLA Application Note DS1620 Hardware Interface DATA DATA FIRST Figure Serial Data Write Timing Freescale Semiconductor, Inc. Thermostat Operation DS1620 three thermal alarms that trigger output pins THigh, TLow, TCOM. These pins used control closed-loop heating cooling systems activating deactivating system dependent defined temperature boundaries. THigh when temperature exceeds value. Likewise, TLow when temperature falls below value. control oscillation thermostatic system, TCOM used provide hysteresis. THigh TLow TCOM (°C) Figure Thermostat Outputs AN1754 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note DS1620 Software Interface Configuration Status Register configuration status register configures DS1620 different modes operation provide status information device. DONE 1SHOT Freescale Semiconductor, Inc. Figure Configuration Status Register DONE Conversion Complete Flag Temperature conversion complete. Temperature conversion progress. High Temperature Flag temperature greater than equal value register. remains until reset writing this until power removed from device. This allows user determine device ever exceeded limit. temperature less than value register. Temperature Flag temperature less than equal value register. remains until reset writing this until power removed from device. This allows user determine device ever fallen below limit. temperature greater than value register. EEPROM Busy Flag write EEPROM cell progress. This process could take Write EEPROM memory only within temperature range. EEPROM busy. AN1754 More Information This Product, www.freescale.com MOTOROLA Application Note DS1620 Software Interface operation CLK/CONV acts normal clock. This stored EEPROM cell. CLK/CONV used control conversion start when low. DS1620 shipped with 1SHOT One-Shot Mode DS1620 will execute temperature conversion after start convert command received. This stored EEPROM cell. DS1620 continuously executes temperature conversion process. DS1620 shipped with 1SHOT Freescale Semiconductor, Inc. Command DS1620 command given Table which followed explanation each command. DS1620 commands shown Table since commands receive more accurate temperature reading covered this application note. Table DS1620 Command Command Read temperature Start convert Stop convert Write Write Read Read Write config Read config Protocol Data After Protocol Read 9-bit data Idle Idle Write 9-bit data Write 9-bit data Read 9-bit data Read 9-bit data Write 8-bit data Read 8-bit data NOTE: Writing EEPROM memory cells typically requires room temperature. maximum time specified test code this application note written 50-ms wait period. AN1754 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Read Temperature Start Convert Reads contents temperature. next nine clocks will transmit 9-bit value serial host. Begins temperature conversion process. data read witten after this command. continuous mode, part will continually cycle through conversion process. single-shot mode, part will convert temperature reading then remain idle. Stops temperature conversion process. data read written after this command. After command issued, current conversion process finished DS1620 remains idle. Until start convert command issued, DS1620 will remain idle state. Writes high-temperature register (TH). next nine clock cycles will transmit 9-bit value serial DS1620. This sets threshold level operation THigh output pin. Writes low-temperature register (TL). next nine clock cycles will transmit 9-bit value serial DS1620. This sets threshold level operation TLow output pin. Reads value register. next nine clock cycles will transmit 9-bit value serial host. This 9-bit value temperature limit THigh output pin. Reads value register. next nine clock cycles will transmit 9-bit value serial host. This 9-bit value temperature limit TLow output pin. Writes configuration register. next eight clock cycles will transmit 8-bit value serial DS1620. Reads config register. next eight clocks will transmit 8-bit value serial host. Freescale Semiconductor, Inc. Stop Convert Write Write Read Read Write Config Read Config AN1754 More Information This Product, www.freescale.com MOTOROLA Application Note DS1620 Software Interface Temperature/Data Relationship temperature reading provided two's complement 9-bit value. Table illustrates relationship between temperature 9-bit reading. Fahrenheit, table lookup conversion factor must used. Table Temperature/Data Relationship Temperature +125 Digital Output, $00FA $0032 $0001 $0000 $01FF $01CE $0192 Digital Output, Binary 11111010 00110010 00000001 00000000 11111111 11001110 10010010 Freescale Semiconductor, Inc. +0.5 -0.5 9-bit temperature value thermostat settings stored 8bit values memory. This illustrated Figure Address Address Figure Memory Configuration 9-Bit Data AN1754 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note MC68HC705J1A Hardware Interface With only pins, smaller members HC05 Family. total 1240 bytes erasable programmable read-only memory (EPROM) includes pins. pins used drive DS1620 are: Port This (DQ) used transmit receive data DS1620. Port This (CLK) configured output drive serial clock pin, CLK/CONV, DS1620. Port This (RST) configured output drive reset pin, RST, DS1620. Freescale Semiconductor, Inc. schematic used testing J1A-to-DS1620 interface MMEVS development system shown Figure more information HC705J1A, consult MC68HC705J1A Technical Databook, Motorola document order number MC68HC705J1A/D. DS1620 MMEVS INTERFACE CLK/CONV THigh TLow TCOM Figure J1A-to-DS1620 Interface Test Circuit AN1754 More Information This Product, www.freescale.com MOTOROLA Application Note MC68HC705J1A Test Software MC68HC705J1A Test Software driving manipulation process toggling pins with software instructions create certain hardware peripheral. HC05 provides special instructions specifically manipulate single pins. serial transmission driver been into subroutines called transmitting eight bits data receiving eight bits data. flowcharts DS1620 serial drivers shown Figure through Figure These routines were written especially DS1620 able properly drive other peripherals with serial buses. Figure shows flowchart main test routine. step-bystep sequence testing Write configuration register. This sets DS1620 continuous conversion mode. Write register. value Read register. Store reading locations TH_MSB TH_LSB. Write register. value Read register. Store reading locations TL_MSB TL_LSB. Send start conversion command. Stop code from running emulator allow second time temperature reading. Restart code. temperature read placed locations TEMP_MSB TEMP_LSB. After test sequence finished, temperature values verified. temperature reading again, restart code step Freescale Semiconductor, Inc. AN1754 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note test thermostat outputs, increase temperature higher than THigh should read Decrease temperature below TLow should read Since DS1620 configured continuous conversion, software needed output thermostatic outputs. This inherent function DS1620. assembly code test routine provided Code Listing. Development Tools Freescale Semiconductor, Inc. interface created tested using these development tools: M68MMPFB0508 Motorola MMEVS platform board M68EM05J1A Motorola emulation module Version 1.02 Editor, assembler, debugger Microcomputer Systems AN1754 More Information This Product, www.freescale.com MOTOROLA Application Note Flowcharts Serial Drivers Flowcharts Serial Drivers COUNTER RIGHT SHIFT ACCA, CARRY Freescale Semiconductor, Inc. CARRY TOGGLE THEN HIGH DECREMENT LOOP DONE? RETURN FROM Figure Subroutine Flowchart AN1754 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note CONFIGURE INPUT COUNTER Freescale Semiconductor, Inc. CARRY ROTATE RIGHT, CARRY ACCA DECREMENT LOOP DONE? CONFIGURE OUTPUT RETURN FROM Figure Subroutine Flowchart AN1754 More Information This Product, www.freescale.com MOTOROLA Application Note Flowcharts Serial Drivers START INITIALIZE PORTA DATA DIRECTION PORTA COMMAND WRITE_CONFIG $00, CONT CONV TOGGLE WAIT MEMORY Freescale Semiconductor, Inc. COMMAND WRITE_TH $3C, TOGGLE WAIT MEMORY COMMAND WRITE_TL $28, TOGGLE WAIT MEMORY COMMAND READ_TH TH_LSB STORE TH_MSB STORE TOGGLE COMMAND READ_TL TL_LSB STORE TL_MSB STORE TOGGLE COMMAND START_CONV TOGGLE COMMAND READ_TEMP TEMP_LSB STORE TEMP_MSB STORE TOGGLE INFINITE LOOP Figure Flowchart Main Test Routine AN1754 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note Code Listing File name: DS1620.ASM Example Code MC68HC705J1A Interface Dallas DS1620 Digital Thermometer 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 MC68HC705J1A DS1620 Digital Thermometer" Literature AN1754/D SYSTEM DEFINITIONS EQUATES Internal Register Definitions PORTA ;PortA DDRA ;data direction PortA Application Specific Definitions SER_ PORT DQ_DIR READ_TEMP START_CONV STOP_CONV WRITE_TH WRITE_TL READ_TH READ_TL WRITE_CONFIG READ_CONFIG Freescale Semiconductor, Inc. ;PORTA SER_PORT ;PORTA, clock signal ;PORTA, data signal ;PORTA, reset signal ;PortA Data signal ;instr ;instr ;instr ;instr ;instr ;instr ;instr ;instr ;instr reading temperature starting temperature conv stopping temperature conv writes high temp limit writes temp limit reads high temp limit from reads high temp limit from writes config reads from config Memory Definitions EPROM $300 RESET $7FE ;start EPROM ;start ;vector reset AN1754 More Information This Product, www.freescale.com MOTOROLA Application Note Code Listing VARIABLES TEMP_MSB ;temperature reading TEMP_LSB ;temperature reading TH_MSB ;High temp trigger TH_LSB ;High temp trigger TL_MSB ;Low temp trigger TL_LSB ;Low temp trigger MAIN ROUTINE EPROM ;start begining EPROM Intialize Ports START #$07 ;init SER_PORT SER_PORT #$07 ;make SER_PORT pins outputs DDRA Write Config reg, setup #WRITE_CONFIG #$00 bclr RST,SER_PORT bset RST,SER_PORT NV_WAIT #WRITE_TH #$3C #$00 bclr RST,SER_PORT bset RST,SER_PORT NV_WAIT Read verify #READ_TH TH_LSB TH_MSB bclr RST,SER_PORT bset RST,SER_PORT #WRITE_TL #$28 AN1754 MOTOROLA More Information This Product, www.freescale.com cont conv ;load Acca with instruction ;transmit instruction ;load with data ;transmit data ;toggle ;wait memory operation Freescale Semiconductor, Inc. ;load Acca with instruction ;transmit instruction ;load with data ;transmit data ;load with data ;transmit data ;toggle ;wait memory operation ;load Acca with instruction ;transmit instruction ;receive data ;store away result ;receive data ;store away result ;toggle ;load Acca with instruction ;transmit instruction ;load with data Freescale Semiconductor, Inc. Application Note bclr bset #$00 RST,SER_PORT RST,SER_PORT NV_WAIT ;transmit data ;load with data ;transmit data ;toggle ;wait memory operation Freescale Semiconductor, Inc. Read verify #READ_TL TL_LSB TL_MSB bclr RST,SER_PORT bset RST,SER_PORT Start temperature conversion #START_CONV bclr RST,SER_PORT bset RST,SER_PORT Read current temperature #READ_TEMP TEMP_LSB TEMP_MSB bclr RST,SER_PORT bset RST,SER_PORT DUMMY DUMMY ;load Acca with instruction ;transmit instruction ;receive data ;store away result ;receive data ;store away result ;toggle ;load Acca with instruction ;transmit instruction ;toggle ;load Acca with instruction ;transmit instruction ;receive data ;store away result ;receive data ;store away result ;toggle ;test sequence over SUBROUTINES Routine takes contents AccA transmits serially DS1620, first ;set counter WRITE asra bset bclr bclr bset decx ;Carry DQ,SER_PORT CLOCK_IT DQ,SER_PORT CLK,SER_PORT CLK,SER_PORT WRITE ;return from AN1754 More Information This Product, www.freescale.com MOTOROLA ;DQ=1 ;branch clock_it ;DQ=0 ;evens ;CLK=0 ;CLK=1 ;decrement counter CLOCK_IT Application Note Code Listing Routine clocks contents bclr READ bclr brclr rora bset decx bset DS1620 read data from first AccA DQ_DIR,DDRA ;make input ;set counter CLK,SER_PORT DQ,SER_PORT,J2 CLK,SER_PORT ;CLK=0 ;carry ;put carry into AccA ;CLK=1 ;decrement counter READ DQ_DIR,DDRA ;make output ;return from Freescale Semiconductor, Inc. Routine creates routine with 2MHz internal memory correctly NV_WAIT #66T #255T deca decx VECTOR TABLE RESET START AN1754 MOTOROLA More Information This Product, www.freescale.com Freescale Semiconductor, Inc. Application Note References MC68HC705J1A Technical Data, document order number MC68HC705J1A/D, Motorola, 1996. M68HC05 Applications Guide, document order number M68HC05AG/AD, Motorola, 1996. DS1620 Data Sheet, Dallas Semiconductor, 1998. 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 AN1754/D More Information This Product, www.freescale.com Other recent searchesMB86298-EB01 - MB86298-EB01 MB86298-EB01 Datasheet MAX4599ExT - MAX4599ExT MAX4599ExT Datasheet LQ197V3DZ89 - LQ197V3DZ89 LQ197V3DZ89 Datasheet IRF730APbF - IRF730APbF IRF730APbF Datasheet GP1L50 - GP1L50 GP1L50 Datasheet GP1L51 - GP1L51 GP1L51 Datasheet GP1L52V - GP1L52V GP1L52V Datasheet GP1L54 - GP1L54 GP1L54 Datasheet DTH-019-001 - DTH-019-001 DTH-019-001 Datasheet
Privacy Policy | Disclaimer |