beautypg.com

An118 – Cirrus Logic AN118 User Manual

Page 11

background image

AN118

AN118REV2

11

sbit PX1 =

0xBA;

sbit PT0 =

0xB9;

sbit PX0 =

0xB8;

/* P3 */
sbit RD =

0xB7;

sbit WR =

0xB6;

sbit T1

=

0xB5;

sbit T0

=

0xB4;

sbit INT1 =

0xB3;

sbit INT0 =

0xB2;

sbit TXD =

0xB1;

sbit RXD =

0xB0;

/* SCON */
sbit SM0 =

0x9F;

sbit SM1 =

0x9E;

sbit SM2 =

0x9D;

sbit REN =

0x9C;

sbit TB8 =

0x9B;

sbit RB8 =

0x9A;

sbit TI

=

0x99;

sbit RI

=

0x98;

/**************************************************************/
/* CDB5521/22/23/24/28 Engineering Microcontroller code Version 1.00

*/

/* Purpose: Interfaces the CCS5521/22/23/24/28 to a PC

*/

/* Comments:

*/

/**************************************************************/
#pragma nointvector

/* Disable Interrupt Vectors */

#pragma debug

/* Include Debug Information with .obj file */

#pragma code

/* Include Assemble Code with .lst file */

#pragma small

/* Use a Small Memory Model*/

#pragma RB(0)

/* Use Register Bank Zero */

#pragma OPTIMIZE(3)

/* Use Highest Level of Optimizing */

#include "cs5522.h"
/* Global Variable */
char

command,

/* One Byte Variables */

ext_byte,
high_byte,
mid_byte,
low_byte,
temp,
temp1;

int

sample_index,

/* Two Bytes Long */

sample_size,
i,
mode;

/* 0 = three wire 1 = 4 wire */