No changes between revisions
/Designs/Measuring_instruments/RMDS02C/SW/PIC16F887/main.c
9,12 → 9,13
// I2C register address 0 = LSB
// I2C register address 3 = MSB
 
#define ID "$Id: main.c 2916 2013-04-14 17:42:03Z kaklik $"
#define ID "$Id$"
#include "main.h"
#use i2c(SLAVE, Fast, sda=PIN_C4, scl=PIN_C3, force_hw, address=0xA2)
 
#include <string.h>
 
#define LED PIN_B3 // heartbeat indicator
#define SEL0 PIN_E0 // external counter division ratio
#define SEL1 PIN_E1 // external counter division ratio
#define MR PIN_E2 // external counter master reset
135,6 → 136,7
// output_high(SEL1);
countL|=input(CLKI)<<3; // read bit 3 of external counter
 
output_toggle(LED); // heartbeat
output_low(MR); // External counter Master Reset
output_high(MR);
set_timer1(0); // Internal counter reset
194,6 → 196,7
setup_GPS(); // Write configuration to the GPS
fire_setup = 0;
}
output_toggle(LED); // heartbeat
//printf("%X %X %X %X\r\n", buffer[0],buffer[1],buffer[2],buffer[3]);
//printf("%010Lu\r\n", count);
}
Property changes:
Added: svn:keywords
+Id
\ No newline at end of property