Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN2288 Datasheet(PDF) 18 Page - STMicroelectronics

Part # AN2288
Description  Single-phase energy meter with tamper detection based on ST7FLITE2x
PDF  29 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2288 Datasheet(HTML) 18 Page - STMicroelectronics

Back Button AN2288 Datasheet HTML 14Page - STMicroelectronics AN2288 Datasheet HTML 15Page - STMicroelectronics AN2288 Datasheet HTML 16Page - STMicroelectronics AN2288 Datasheet HTML 17Page - STMicroelectronics AN2288 Datasheet HTML 18Page - STMicroelectronics AN2288 Datasheet HTML 19Page - STMicroelectronics AN2288 Datasheet HTML 20Page - STMicroelectronics AN2288 Datasheet HTML 21Page - STMicroelectronics AN2288 Datasheet HTML 22Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 18 / 29 page
background image
Software routines
AN2288
18/29
5
Software routines
This section of the application note describe each function contained in the firmware. A
general description and flow diagram are provided for each routine.
5.1
Initialization routine
The two routines are used for initialization. The ASM_init routine is used to initialize the
global variables, which is done using the _stext routine, the auto startup routine. After this
routine the init routine is called which initializes different bool variables, portA register, ADC
bits and SPI.
Figure 15. Initialization routine
5.2
Main routine
The main routine is called after ASM_init (_stext), which called different functions.
Init routine
Initialize 18-bool variables;
Initialize portA;
Call a delay routine to wait for 5V supply to reach to 5V;
Initialize ADC: Amp not selected, calibration OFF, slow bit = 0
Initialize SPI: software slave is used, SPI freq = Fcpu/4, SPI inter-
rupt enabled, read from memory array
ASM_init
Initialize global variables



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com