ds2740.c File Reference

#include <ioavr.h>
#include <inavr.h>
#include "OWIIntFunctions.h"
#include "OWIInterruptDriven.h"
#include "ds2740.h"
#include "..\uart.h"
#include "..\globales.h"

Include dependency graph for ds2740.c:


Defines

#define OWI_STATE_IDLE   0
#define OWI_STATE_DETECT_PRESENCE   1
#define OWI_STATE_READ_CURRENT   2
#define OWI_STATE_READ_ACCUMULATED   3
#define OWI_STATE_WRITE_REG   4
#define OWI_STATE_RESULT   6
#define OWI_STATE_NET_ADDRESS   7
#define FALSE   0
#define TRUE   1
#define DS2740_READ_DATA   0x69
 DS2740 read memory.
#define DS2740_WRITE_DATA   0x6C
 DS2740 write memory.
#define CURRENT_REG_ADDR   0X0E
#define ACCUMULATED_REG_ADDR   0X10

Functions

int OWI_StateMachine (unsigned char sel_state)
 Máquina de estados que controla la comunicación con el bus 1-Wire.
int ds2740 (unsigned char sel_func)

Variables

OWIflags OWIStatus
unsigned char * OWIDataBuffer
unsigned char espero
unsigned char timeout
static unsigned char buf [9]
static unsigned char buf2 [9]
unsigned char i
unsigned char j

Detailed Description

Atmel Corporation

Revision
1.7
Date
Thursday, August 19, 2004 14:27:16 UTC

Define Documentation

#define ACCUMULATED_REG_ADDR   0X10

#define CURRENT_REG_ADDR   0X0E

#define DS2740_READ_DATA   0x69

DS2740 read memory.

#define DS2740_WRITE_DATA   0x6C

DS2740 write memory.

#define FALSE   0

#define OWI_STATE_DETECT_PRESENCE   1

#define OWI_STATE_IDLE   0

#define OWI_STATE_NET_ADDRESS   7

#define OWI_STATE_READ_ACCUMULATED   3

#define OWI_STATE_READ_CURRENT   2

#define OWI_STATE_RESULT   6

#define OWI_STATE_WRITE_REG   4

#define TRUE   1


Function Documentation

int ds2740 ( unsigned char  sel_func  ) 

int OWI_StateMachine ( unsigned char  sel_state  ) 

Máquina de estados que controla la comunicación con el bus 1-Wire.

Esta funcion se encarga de leer el valor correspondiente según los parámetros recibido al llamar la función 1-wire


Variable Documentation

unsigned char buf[9] [static]

unsigned char buf2[9] [static]

unsigned char espero

unsigned char i

unsigned char j

unsigned char* OWIDataBuffer

unsigned char timeout


Generated on Thu Aug 21 14:29:39 2008 for Medidor de consumo by  doxygen 1.5.6