/****************************************************************************/
/* Copyright 2004 MBARI.                                                    */
/* Monterey Bay Aquarium Research Institute Proprietary Information.        */
/* All rights reserved.                                                     */
/****************************************************************************/
#ifndef FREQ_GEN_H
#define FREQ_GEN_H

#define FREQ_GEN_VERSION 0
#define FREQ_GEN_SUB_VERSION 1

/*
    The ticks per second is based on an 8-bit counter over flowing that
    is driven by a 4 Mhz ocsillator prescaled by 4 and postscaled by 64.

    TICKS_PER_SEC = (OSC_CLK) / (PRESCALE) / (POSTSCALE) / (8_BIT_OVERFLOW)
                  = 3580000   /     4      /      64     /      256
                  = 54.626
*/
#define TICKS_PER_SEC           55
#define FREQ_DURATION           TICKS_PER_SEC

#define PORTC_CLEAR_ALL         0x00

#define PORTB_LED_ON            0x02
#define PORTB_LED_OFF           0x00

#define PORTC_CURRENT_UP        0x05
#define PORTC_CURRENT_DN        0x06

#define PORTC_1000HZ_FREQ_UP    0x09
#define PORTC_1000HZ_FREQ_DN    0x0A

#define PORTC_316HZ_FREQ_UP     0x29
#define PORTC_316HZ_FREQ_DN     0x2A

#define PORTC_100HZ_FREQ_UP     0x19
#define PORTC_100HZ_FREQ_DN     0x1A

#endif
