|
Carga Dinâmica
0.1
Sistemas de Instrumentação Electrónica
|
configuratoin for ADC More...
#include <stdint.h>#include <xc.h>#include <stdio.h>#include "interrup.h"#include "uart.h"#include "led.h"#include "confHardware.h"

Go to the source code of this file.
Macros | |
| #define | ANALOG_INPUTS inputAnalog |
| Number od ADC in using MAX: 4. | |
| #define | ResPower rSense |
| Power Resitence (vaule read) | |
| #define | gainOpamp gainCorrent |
| Gain opamp. | |
| #define | factorConv divResitiveV |
| factor de redução | |
Functions | |
| void | adcInit (void) |
| this function is to initialization ADC | |
| void | adcStart (void) |
| start A/D module | |
| void | adcReset (void) |
| stop A/D module | |
| void | adcValue (void) |
| reading 3 values per channel and makes convert 0 a 1024 to a read voltage value, 0 to 3,3V and places in the valueADC array. This process is repeated for the other channel. | |
| uint16_t | readInputVoltage (void) |
| Convert adc to voltage. More... | |
| uint16_t | readCorrentConsumer (void) |
| Convert adc value to corrent. More... | |
| void | debugADC (void) |
| function use for testing ADC | |
Variables | |
| uint16_t | valueADC [ANALOG_INPUTS] |
| Array of adc read. | |
configuratoin for ADC
| uint16_t readCorrentConsumer | ( | void | ) |
Convert adc value to corrent.
| uint16_t readInputVoltage | ( | void | ) |
Convert adc to voltage.