Part Number:TM4C123GH6PM
Hello everyone,
Q.1.There are two ADC Modules i.e. ADC0 and ADC1 in Tiva TM4C123GH6PM. I want to connect 6 sensors at a time.So I want to know whether can I use SS0 and SS0 for both the modules i.e. ADC0 and ADC1?
Q.2.In the block diagram of ADC module of Tiva there are blocks of SS0,Sample Sequencer 0 , so what is the difference between these two?
Q.3. What is the use of Control/Status block?
These block descriptions are not given properly in the datasheet.
I have attached the diagram below.![]()
#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/debug.h"
#include "driverlib/sysctl.h"
#include "driverlib/adc.h"
int main(void)
{
uint32_t ui32ADC0Value[4];
volatile uint32_t ui32TempAvg;
volatile uint32_t ui32TempValueC;
volatile uint32_t ui32TempValueF;
SysCtlClockSet(SYSCTL_SYSDIV_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);
SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0);
ADCSequenceConfigure(ADC0_BASE, 1, ADC_TRIGGER_PROCESSOR, 0);
ADCSequenceStepConfigure(ADC0_BASE, 1, 0, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 1, 1, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE, 1, 2, ADC_CTL_TS);
ADCSequenceStepConfigure(ADC0_BASE,1,3,ADC_CTL_TS|ADC_CTL_IE|ADC_CTL_END);
ADCSequenceEnable(ADC0_BASE, 1);
while(1)
{
}
}