AN1154 STMicroelectronics, AN1154 Datasheet - Page 66
AN1154
Manufacturer Part Number
AN1154
Description
8031-PSD DESIGN TUTORIAL
Manufacturer
STMicroelectronics
Datasheet
1.AN1154.pdf
(83 pages)
- Current page: 66 of 83
- Download datasheet (677Kb)
AN1154 - APPLICATION NOTE
//There is only one output on Port D (RTCcs/), so the direction register is
//setup as follows:
write(Port_D_Dir_Reg,’h04);
//Set up the mask registers so that only the desired portion of the OMCs get
//written. Only the desired value (MCELLAB[7:4]), and begin (MCELLBC7) can be
//written to.
write(Port_AB_OMC_Mask, ’h0f);
write(Port_BC_OMC_Mask, ’h7f);
//Write the EEPROM segment ees0, and the Flash segment fs1
//then read the SRAM
write(’h0020,’h5a);//write 5a to ees0
write(’h5A00,’ha5);//write a5 to fs1
read (’h07FE); //read the internal SRAM
// Wait, then initialize the gain to one and output the data on the pins
// pb2 to pb0.
#40 write(Port_B_Dout_Reg,’h01);
// Assume a small value for the output of the ADC since the gain is set
// to one
measured_value=’h3;
// Load 5 into the desired value register
write(Port_AB_OMC, ’h50);
// Take the state machine out of the idle state and generate the ADC
// chip select.
#20 write(Port_BC_OMC, ’h80);
// Since the measured value is less than the desired one, the gain would
// be boosted after the interrupt was generated (3 cycles after the start
// of the state machine). The MCU should increment the gain by 1 at that
// time.
#400 write(Port_B_Dout_Reg, ’h02);
#10 $finish;
66/83
Related parts for AN1154
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
An Overview og the Phase Locked Loop
Manufacturer:
Philips
Datasheet:
Part Number:
Description:
AN OVERVIEW OF THE LPC FLASH INTERFACE
Manufacturer:
STMicroelectronics
Part Number:
Description:
An Evaluation System Interfacing the MPX2000 Series Pressure Sensors to a Microprocessor
Manufacturer:
Motorola / Freescale Semiconductor
Part Number:
Description:
An FM-IF system for DECT and other high speed GFSK applications
Manufacturer:
Philips Semiconductors / NXP Semiconductors
Part Number:
Description:
An 8 x 8 Discrete Cosine Transform on the StarCore SC140/SC1400 Cores
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
An Overview of the HCS12 ATD Module
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
An Introduction to the External Bus Interface on the HCS12X
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
An RF Data Link Using Tango3 and Romeo2 RF Modules
Manufacturer:
Freescale Semiconductor / Motorola
Part Number:
Description:
STMicroelectronics [RIPPLE-CARRY BINARY COUNTER/DIVIDERS]
Manufacturer:
STMicroelectronics
Datasheet:
Part Number:
Description:
STMicroelectronics [LIQUID-CRYSTAL DISPLAY DRIVERS]
Manufacturer:
STMicroelectronics
Datasheet:
Part Number:
Description:
BOARD EVAL FOR MEMS SENSORS
Manufacturer:
STMicroelectronics
Datasheet:
Part Number:
Description:
NPN TRANSISTOR POWER MODULE
Manufacturer:
STMicroelectronics
Datasheet: