|
|
@@ -32,7 +32,7 @@ void TISR_HANDLER(5) |
|
|
|
float i; |
|
|
|
|
|
|
|
/* toggle A9 every time an interrupt occurs */ |
|
|
|
LATAbits.LATA9 ^= 1; |
|
|
|
LATAbits.LATA9 = 1; |
|
|
|
timer_clear_txif(5); |
|
|
|
|
|
|
|
/* Get most recent sample from 12-bit ADC. */ |
|
|
@@ -65,6 +65,8 @@ void TISR_HANDLER(5) |
|
|
|
/* Now send it out */ |
|
|
|
dac_cmd = current_to_dac(dac_current); |
|
|
|
dac_write(dac_cmd); |
|
|
|
|
|
|
|
LATAbits.LATA9 = 0; |
|
|
|
} |
|
|
|
|
|
|
|
void send_to_pc(uint16_t adc, uint16_t dac) |
|
|
|