Netcruzer Library API  V2.03
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
nz_ow2482.h File Reference

Functions for DS2482 1-Wire interface. More...

Go to the source code of this file.

Detailed Description

Functions for DS2482 1-Wire interface.

Author
Modtronix Engineering
Compiler:
MPLAB XC16

Description

Functions for using the DS2482 1-Wire interface

Configuration

The following defines are used to configure this module, and should be placed in projdefs.h. Note that all items marked [-DEFAULT-] are defaults, and do not have to be placed in projdefs.h if they contain desired configuration! For details, see Project Configuration.

// *********************************************************************
// ------------ DS2482 Configuration (from nz_ds2482.h) -------------
// *********************************************************************
#define NZ_OW2482_ENABLED //Enable OW2482 module
//---- Disable WATE functions. Not required if only asynchronous functions are used
#define DS2482_DISABLE_WATE_FUNCTIONS

Usage

To use this module, the following must be done:

  • Include nz_ds2482.h in the c file it is used in.
  • Add nz_ds2482.c to the MPLAB project, this is the main DS2482 driver file.
  • The following additional files are required by nz_ds2482.c, and must be added to the project: nz_circularBufferPwr2.c, nz_helpers.c, nz_netcruzer.c and nz_serI2C.c
  • Add "NZ_I2C1_ENABLE" to projdefs.h file.
  • In code, initialize the DS2482. Ensure to delay 300ms from power up. For example:
    delay_ms(300);
    ds2482Init();
  • In projdefs.h, do any DS2482, I2C or other configuration required. This is done by copying the configuration section from the *.h files to projdefs.h. Nothing required, defaults will work!
  • In code, call ds2482Task() repetitively in main loop
  • All DONE! Can now use DS2482 functions defined in nz_ds2482.h! Some examples: lcdDisplayString(0, "\fHello\nWorld, Again!"); //Write parsed string to LCD display lcdDisplayChar(0, 'x'); //Display 'x' at current cursor position

Software License Agreement

The software supplied herewith is owned by Modtronix Engineering, and is protected under applicable copyright laws. The software supplied herewith is intended and supplied to you, the Company customer, for use solely and exclusively on products manufactured by Modtronix Engineering. The code may be modified and can be used free of charge for commercial and non commercial applications. All rights are reserved. Any use in violation of the foregoing restrictions may subject the user to criminal sanctions under applicable laws, as well as to civil liability for the breach of the terms and conditions of this license.

THIS SOFTWARE IS PROVIDED IN AN 'AS IS' CONDITION. NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.

File History

2014-01-02, David H. (DH):

  • Initial version