Cirrus-logic AN89 Manual de usuario

Busca en linea o descarga Manual de usuario para Hardware Cirrus-logic AN89. Cirrus Logic AN89 User Manual Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 12
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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
AN89
Application Note
Interfacing the CS5525/6/9 to the 68HC05
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 a Motorola 68HC05
microcontroller. This note takes the reader through
a simple example describing how to communicate
with the ADC. All algorithms discussed are includ-
ed in the Appendix at the end of this note.
ADC DIGITAL INTERFACE
The CS5525/6/9 interfaces to the 68HC05 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 the
SPI
TM
on the 68HC05, the algorithms can be easily
modified to work in the four-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 68HC05 to the ADC.
SDO, Serial Data Out, is the data signal used to
transfer output data from the ADC to the 68HC05.
SOFTWARE DESCRIPTION
This note presents algorithms to initialize the
68HC05 and the CS5525/6/9, perform a self-offset
calibration, modify the CS5525/6/9’s gain register,
and acquire a conversion. Figure 2 depicts a block
CS5525/6/9 68HC05
PA0
MOSI (PD3)
MISO (PD2)
SCK (PD4)
CS
SDI
SDO
SCLK
Figure 1. 3-Wire and 4-Wire Interfaces
CS5525/6/9 68HC05
No Connect
MOSI (PD3)
MISO (PD2)
SCK(PD4)
CS
SDI
SDO
SCLK
NOV ‘97
AN89Rev2
Vista de pagina 0
1 2 3 4 5 6 ... 11 12

Indice de contenidos

Pagina 1 - Application Note

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

Pagina 2 - 2 AN89Rev2

AN8910 AN89Rev2*************************************************************************************** Routine - delay* Input - Count in register

Pagina 5 - APPENDIX

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

Pagina 6

AN89AN89Rev2 3information from the CS5525/6/9 to the 68HC05via the SPITM. Similar to send_spi, receive_spi re-ceives a byte one bit at a time MSB firs

Pagina 7

AN894 AN89Rev2.MSB High-ByteMid-ByteLow-ByteA) 20-Bit Conversion Data WordMSB High-ByteMid-ByteLow-ByteB) 16-Bit Conversion Data Word 0- always zero,

Pagina 8

AN89AN89Rev2 5APPENDIX68HC05 Microcode to Interface to the CS5525/6/9****************************************************************************** Fi

Pagina 9

AN896 AN89Rev2*************************************************************************************** Program Code******************************

Pagina 10

AN89AN89Rev2 7*************************************************************************************** Subroutines*******************************

Pagina 11 - • Notes •

AN898 AN89Rev2*************************************************************************************** Routine - convert* Input - none* Output -

Pagina 12

AN89AN89Rev2 9*************************************************************************************** Routine - read_register* Input - COMMANDBYTE

Comentarios a estos manuales

Sin comentarios