Defines | |
#define | TIME_RATE 125 |
The change in the CCP_1 register for each 104uS (9600bps) interrupt period. | |
Functions | |
uint8_t | timeGetTicks () |
Running 8-bit counter that ticks every 100mS. | |
void | timeInit () |
Initialize the real-time clock. | |
bool_t | timeIsUpdate () |
Function return true once a second based on real-time clock. | |
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 | timeUpdate () |
Timer interrupt handler called every 104uS (9600 times/second). | |
Variables | |
uint8_t | timeTicks |
A counter that ticks every 100mS. | |
uint16_t | timeInterruptCount |
Counts the number of 104uS 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 where 0 = 0% and 9 = 90%. | |
uint16_t | timeCompare |
Current value of the timer 1 compare register used to generate 104uS interrupt rate (9600bps). | |
uint16_t | timeNCO |
16-bit NCO where the upper 8-bits are used to index into the frequency generation table. | |
uint16_t | timeNCOFreq |
Audio tone NCO update step (phase). | |
uint8_t | timeLowRateCount |
Counter used to deciminate down from the 104uS to 833uS interrupt rate. (9600 to 1200 baud). | |
TNC_DATA_MODE | tncDataMode |
Current TNC mode (standby, 1200bps A-FSK, or 9600bps FSK). | |
bool_t | timeUpdateFlag |
Flag set true once per second. | |
bool_t | timeRunFlag |
Flag that indicate the flight time should run. |
The interrupt clock PRI is 104uS (9600 bps).
#define TIME_RATE 125 |
The change in the CCP_1 register for each 104uS (9600bps) interrupt period.
Definition at line 2132 of file PicoBeacon.c.
Referenced by timeInit(), and timeUpdate().
uint8_t timeGetTicks | ( | ) |
Running 8-bit counter that ticks every 100mS.
Definition at line 2139 of file PicoBeacon.c.
References timeTicks.
Referenced by gpsSetup().
void timeInit | ( | ) |
Initialize the real-time clock.
Definition at line 2147 of file PicoBeacon.c.
References TIME_DUTYCYCLE_70, TIME_RATE, timeCompare, timeDutyCycle, timeHours, timeInterruptCount, timeLowRateCount, timeMinutes, timeNCO, timeNCOFreq, timeRunFlag, timeSeconds, timeTicks, timeUpdateFlag, TNC_MODE_STANDBY, and tncDataMode.
Referenced by main().
bool_t timeIsUpdate | ( | ) |
Function return true once a second based on real-time clock.
Definition at line 2176 of file PicoBeacon.c.
References timeUpdateFlag.
Referenced by main().
void timeSetDutyCycle | ( | uint8_t | dutyCycle | ) |
Set the blink duty cycle of the heartbeat LED.
The LED blinks at a 1Hz rate.
dutyCycle | TIME_DUTYCYCLE_xx constant |
Definition at line 2192 of file PicoBeacon.c.
References timeDutyCycle.
Referenced by gpsSetup().
void timeSetRunFlag | ( | ) |
Set a flag to indicate the flight time should run.
This flag is typically set when the payload lifts off.
Definition at line 2201 of file PicoBeacon.c.
References timeRunFlag.
Referenced by main().
void timeUpdate | ( | ) |
Timer interrupt handler called every 104uS (9600 times/second).
Definition at line 2210 of file PicoBeacon.c.
References ddsSetFTW(), freqTable, IO_LED, serialUpdate(), TIME_RATE, timeCompare, timeDutyCycle, timeHours, timeInterruptCount, timeLowRateCount, timeMinutes, timeNCO, timeNCOFreq, timeRunFlag, timeSeconds, timeTicks, timeUpdateFlag, tnc1200TimerTick(), tnc9600TimerTick(), TNC_MODE_1200_AFSK, TNC_MODE_9600_FSK, TNC_MODE_STANDBY, and tncDataMode.
Current value of the timer 1 compare register used to generate 104uS interrupt rate (9600bps).
Definition at line 2111 of file PicoBeacon.c.
Referenced by timeInit(), and timeUpdate().
Desired LED duty cycle 0 to 9 where 0 = 0% and 9 = 90%.
Definition at line 2108 of file PicoBeacon.c.
Referenced by timeInit(), timeSetDutyCycle(), and timeUpdate().
System time in hours.
Definition at line 2105 of file PicoBeacon.c.
Referenced by main(), timeInit(), timeUpdate(), and tncStatusPacket().
Counts the number of 104uS interrupts for a 100mS time period.
Definition at line 2093 of file PicoBeacon.c.
Referenced by timeInit(), and timeUpdate().
Counter used to deciminate down from the 104uS to 833uS interrupt rate. (9600 to 1200 baud).
Definition at line 2120 of file PicoBeacon.c.
Referenced by timeInit(), and timeUpdate().
System time in minutes.
Definition at line 2102 of file PicoBeacon.c.
Referenced by main(), timeInit(), timeUpdate(), and tncStatusPacket().
16-bit NCO where the upper 8-bits are used to index into the frequency generation table.
Definition at line 2114 of file PicoBeacon.c.
Referenced by timeInit(), and timeUpdate().
Audio tone NCO update step (phase).
Definition at line 2117 of file PicoBeacon.c.
Referenced by timeInit(), timeUpdate(), and tnc1200TimerTick().
Flag that indicate the flight time should run.
Definition at line 2129 of file PicoBeacon.c.
Referenced by timeInit(), timeSetRunFlag(), and timeUpdate().
System time in seconds.
Definition at line 2099 of file PicoBeacon.c.
Referenced by main(), timeInit(), timeUpdate(), and tncStatusPacket().
A counter that ticks every 100mS.
Definition at line 2090 of file PicoBeacon.c.
Referenced by timeGetTicks(), timeInit(), and timeUpdate().
Flag set true once per second.
Definition at line 2126 of file PicoBeacon.c.
Referenced by timeInit(), timeIsUpdate(), and timeUpdate().
Current TNC mode (standby, 1200bps A-FSK, or 9600bps FSK).
Definition at line 2123 of file PicoBeacon.c.
Referenced by timeInit(), timeUpdate(), tnc1200TimerTick(), and tncSetMode().