Cirrus-logic AN74 Manual do Utilizador

Consulte online ou descarregue Manual do Utilizador para Hardware Cirrus-logic AN74. Cirrus Logic AN74 User Manual Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 14
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
1
Copyright
Cirrus Logic, Inc. 1997
(All Rights Reserved)
Cirrus Logic, Inc.
Crystal Semiconductor Products Division
P.O. Box 17847, Austin, Texas 78760
(512) 445 7222 FAX: (512) 445 7581
http://www.crystal.com
AN74
Application Note
Interfacing the CS5525/6/9 to the 80C51
By Keith Coffey
INTRODUCTION
This application note details the interface of Crys-
tal Semiconductor’s CS5525/6/9 Analog-to-Digi-
tal Converter (ADC) to an 80C51 microcontroller.
This note takes the reader through a simple exam-
ple describing how to communicate with the ADC.
All algorithms discussed are included in the Ap-
pendix at the end of this note.
ADC DIGITAL INTERFACE
The CS5525/6/9 interfaces to the 80C51 through
either a three-wire or a four-wire interface. Figure
1 depicts the interface between the two devices.
Though this software was written to interface to
Port 1 (P1) on the 80C51 with a four-wire interface,
the algorithms can be easily modified to work with
the three-wire format.
The ADC’s serial port consists of four control
lines: CS
, SCLK, SDI, and SDO.
CS
, Chip Select, is the control line which enables
access to the serial port.
SCLK, Serial Clock, is the bit-clock which controls
the shifting of data to or from the ADC’s serial
port.
SDI, Serial Data In, is the data signal used to trans-
fer data from the 80C51 to the ADC.
SDO, Serial Data Out, is the data signal used to
transfer output data from the ADC to the 80C51.
SOFTWARE DESCRIPTION
This note presents algorithms to initialize the
80C51 and the CS5525/6/9, perform self-offset cal-
ibration, modify the CS5525/6/9’s gain register,
and acquire a conversion. Figure 2 depicts a block
CS5525/6/9 80C51
P1.0
P1.1
P1.2
P1.3
CS
SDI
SDO
SCLK
Figure 1. 3-Wire and 4-Wire Interfaces
CS5525/6/9 80C51
P1.0 (logic 0)
P1.1
P1.2
P1.3
CS
SDI
SDO
SCLK
NOV ‘97
AN74Rev2
Vista de página 0
1 2 3 4 5 6 ... 13 14

Resumo do Conteúdo

Página 1 - Application Note

1Copyright  Cirrus Logic, Inc. 1997(All Rights Reserved)Cirrus Logic, Inc.Crystal Semiconductor Products DivisionP.O. Box 17847, Austin, Texas 78760(

Página 2 - 2 AN74Rev2

AN7410 AN74Rev2;****************************************************************;* Routine - RECEIVE_BYTE;* Input - none;* Output - Byte received is

Página 3 - AN74Rev2 3

AN74AN74Rev2 11;****************************************************************;* Routine - TRANSFER_BYTE;* Input - byte to be transferred;* Output -

Página 4 - DEVELOPMENT TOOL DESCRIPTION

AN7412 AN74Rev2;****************************************************************;* Routine - TOGGLE_SDO;* Input - none;* Output - none;* Description

Página 7

AN742 AN74Rev2diagram. While reading this application note,please refer to the Appendix for the code listing.InitializeInitialize is a subroutine that

Página 8 - calibration

AN74AN74Rev2 3data-state where it waits until data is read from itsserial port. Read_register then calls receive_bytethree times and transfers three b

Página 9

AN744 AN74Rev2An alternative method can be used to acquire a con-version. By clearing the Port Flag bit, the serialport’s function isn’t modified. The

Página 10

AN74AN74Rev2 5CONCLUSIONThis application note presents an example of howto interface the CS5525/6/9 to the 80C51. It is di-vided into two main section

Página 11

AN746 AN74Rev2APPENDIX80C51 Microcode to Interface to the CS5525/6/9/***************************************************************************** Fil

Página 12

AN74AN74Rev2 7/*************************************************************************************** Program Code*****************************

Página 13 - • Notes •

AN748 AN74Rev2/*Reset Serial Port on CS5525/6/9*/SDI = 0x01; /*Assert SDI*/for(counter=0;counter<255;counter++) {SCLK = 0x01; /*Assert SCLK*/SCLK =

Página 14

AN74AN74Rev2 9/*************************************************************************************** Routine - read_register* Input - command* O

Comentários a estes Manuais

Sem comentários