Real Time Interrupt tick

Manage the built-in real time interrupt. More...


Defines

#define TIME_RATE_PSK31   4800
 The change in the CCP_1 register for each interrupt period. 1mS for PSK31, 104uS for 9600 baud APRS, 3.3mS for 300 baud HF-APRS.
#define TIME_RATE_APRS   500
#define TIME_RATE_HF_APRS   16000
#define TIME_ROLLOVER_PSK31   100
 The number of interrupts in a 100mS time period.
#define TIME_ROLLOVER_APRS   960
#define TIME_ROLLOVER_HF_APRS   30

Functions

uint8_t timeGetTicks ()
 Running 8-bit counter that ticks every 100mS.
void timeInit ()
 Initialize the real-time clock.
uint8_t timeGetHours ()
 Get the time since boot in hours.
uint8_t timeGetMinutes ()
 Get the time since boot in minutes.
void timeSetDutyCycle (uint8_t dutyCycle)
 Set the blink duty cycle of the heartbeat LED.
void timeSetRunFlag ()
 Set a flag to indicate the flight time should run.
void timeSetMode (TIME_MODE mode)
 Set the time base for PSK31 or APRS.
void timeUpdate ()

Variables

uint8_t timeTicks
 A counter that ticks every 100mS.
uint16_t timeInterruptCount
 Counts the number of 1mS interrupts for a 100mS time period.
uint8_t time100ms
 Counts the number of 100mS time periods in 1 second.
uint8_t timeSeconds
 System time in seconds.
uint8_t timeMinutes
 System time in minutes.
uint8_t timeHours
 System time in hours.
uint8_t timeDutyCycle
 Desired LED duty cycle 0 to 9.
uint16_t timeCompare
 Time compare register 1 value.
uint16_t timeRate
 The CCP1 timer delta between each interrupt.
bool_t timeUpdateFlag
 Flag set true once per second.
bool_t timeRunFlag
 Flag that indicate the flight time should run.
uint16_t timeInterruptCountRollOver
 The number of interrupts in a 100mS time period. The value changes based on the current mode.
TIME_MODE timeMode
 The current time base mode.


Detailed Description

Manage the built-in real time interrupt.

The interrupt clock PRI is 104uS (9600 bps).


Define Documentation

#define TIME_RATE_APRS   500

Referenced by timeInit(), and timeSetMode().

#define TIME_RATE_HF_APRS   16000

Referenced by timeSetMode().

#define TIME_RATE_PSK31   4800

The change in the CCP_1 register for each interrupt period. 1mS for PSK31, 104uS for 9600 baud APRS, 3.3mS for 300 baud HF-APRS.

Referenced by timeSetMode().

#define TIME_ROLLOVER_APRS   960

Referenced by timeInit(), and timeSetMode().

#define TIME_ROLLOVER_HF_APRS   30

Referenced by timeSetMode().

#define TIME_ROLLOVER_PSK31   100

The number of interrupts in a 100mS time period.

Referenced by timeSetMode().


Function Documentation

uint8_t timeGetHours (  ) 

Get the time since boot in hours.

Returns:
run time in hours

References timeHours.

Referenced by ballastCheck(), and cutDownCheck().

uint8_t timeGetMinutes (  ) 

Get the time since boot in minutes.

Returns:
run time in minutes

References timeMinutes.

Referenced by ballastCheck().

uint8_t timeGetTicks (  ) 

Running 8-bit counter that ticks every 100mS.

Returns:
100mS time tick

References timeTicks.

Referenced by gpsSetup().

void timeInit (  ) 

void timeSetDutyCycle ( uint8_t  dutyCycle  ) 

Set the blink duty cycle of the heartbeat LED.

The LED blinks at a 1Hz rate.

Parameters:
dutyCycle TIME_DUTYCYCLE_xx constant

References timeDutyCycle.

Referenced by gpsSetup(), and main().

void timeSetMode ( TIME_MODE  mode  ) 

Set the time base for PSK31 or APRS.

Parameters:
mode TIME_MODE_APRS or TIME_MODE_PSK31 constant

References TIME_MODE_APRS, TIME_MODE_HF_APRS, TIME_MODE_PSK31, TIME_RATE_APRS, TIME_RATE_HF_APRS, TIME_RATE_PSK31, TIME_ROLLOVER_APRS, TIME_ROLLOVER_HF_APRS, TIME_ROLLOVER_PSK31, timeInterruptCount, timeInterruptCountRollOver, timeMode, and timeRate.

Referenced by psk31TxPacket(), and tncTxPacket().

void timeSetRunFlag (  ) 

Set a flag to indicate the flight time should run.

This flag is typically set when the payload lifts off.

References timeRunFlag.

Referenced by main().

void timeUpdate (  ) 


Variable Documentation

Counts the number of 100mS time periods in 1 second.

Time compare register 1 value.

Referenced by timeInit(), and timeUpdate().

Desired LED duty cycle 0 to 9.

Referenced by timeInit(), timeSetDutyCycle(), and timeUpdate().

System time in hours.

Referenced by timeGetHours(), timeInit(), timeUpdate(), and tncStatusPacket().

Counts the number of 1mS interrupts for a 100mS time period.

Referenced by timeInit(), timeSetMode(), and timeUpdate().

The number of interrupts in a 100mS time period. The value changes based on the current mode.

Referenced by timeInit(), timeSetMode(), and timeUpdate().

System time in minutes.

Referenced by timeGetMinutes(), timeInit(), timeUpdate(), and tncStatusPacket().

The current time base mode.

Referenced by timeInit(), timeSetMode(), and timeUpdate().

The CCP1 timer delta between each interrupt.

Referenced by timeInit(), timeSetMode(), and timeUpdate().

Flag that indicate the flight time should run.

Referenced by timeInit(), timeSetRunFlag(), and timeUpdate().

System time in seconds.

Referenced by timeInit(), timeUpdate(), and tncStatusPacket().

A counter that ticks every 100mS.

Referenced by timeGetTicks(), timeInit(), and timeUpdate().

Flag set true once per second.

Referenced by main(), timeInit(), and timeUpdate().


Generated on Sun Oct 5 11:29:38 2008 for HF-APRS Beacon by  doxygen 1.5.7