Jump to content
43oh

rnightbane

Members
  • Content Count

    9
  • Joined

  • Last visited

  1. I see, but what if I want to change the ADC speed, how do I change it if analogRead() already has its ADC set up as it is? And how many bits does the ADC transfer to UART?
  2. #include "Energia.h" #include "driverlib/sysctl.h" #include "driverlib/adc.h" #define A3 PE_0 void setup() { Serial.begin(512000); SysCtlADCSpeedSet(SYSCTL_ADCSPEED_1MSPS); SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE); GPIOPinTypeADC(GPIO_PORTE_BASE, GPIO_PIN_0); ADCHardwareOversampleConfigure(ADC0_BASE, 64); ADCSequenceDisable(ADC0_BASE, 3); ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0); ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_CH0 | ADC_CTL_END);
  3. Hi! How do you access the result of the ADC? Given that you put an input analog signal on the GPIO pin...
  4. Okay, so I found out from my previous post that the output value from the ADC can be accessed through pui32ADC0Value...now, im trying to send that data via USB device mode in Tiva, however, my concerns are will my code work? And if it works, how do I access that data via MatLab. Thanks Once again, credits to the maker of the ADC code. #include <stdbool.h> #include <stdint.h> #include "inc/hw_memmap.h" #include "driverlib/adc.h" #include "driverlib/gpio.h" #include "driverlib/sysctl.h" #include "driverlib/adc.h" #include "inc/hw_types.h" #include "driverlib/debug.h"
  5. Thanks for the suggestions. Is it possible if I send pui32ADC0Value via UART?
  6. Yes. How to access the result AND how to display it. Actually, I had an idea of using MatLab to display the output by using the FFT function on MatLab for the result of the ADC, however, I have no idea how to.
  7. rnightbane

    ADC Output

    Hi, I recently found a ADC code in the forums. I plan to input it with a signal, but I dont know where to test the output. Here's the code, credits to the maker. #include <stdbool.h> #include <stdint.h> #include "inc/hw_memmap.h" #include "driverlib/adc.h" #include "driverlib/gpio.h" #include "driverlib/sysctl.h" #include "driverlib/adc.h" #include "inc/hw_types.h" #include "driverlib/debug.h" main(void) { uint32_t pui32ADC0Value[1]; SysCtlClockSet(SYSCTL_SYSDIV_10 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN| SYSCTL_XTAL_16MHZ); //Set clock at 40 Mhz , Sometimes //ADC may not
  8. how do i test the output of this adc using matlab? does this need a USB initialization code?
×
×
  • Create New...