Jump to content
43oh

vineetp

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Thanks for the reply. The following code was used for the same effect. But the Serial.println() was returning no value on the serial monitor. So we used a DAC to convert the bits back and see the output on an oscilloscope. There was no output at all. No hardware faults were found. #include <tm4c123ge6pm.h> volatile int In = 0; // input from PF4 int cs = PA_2; int rd = PA_3; int wr = PA_4; // The above pins are connected to ADC for initialization. #define ldata (*((volatile unsigned long *)0x400053FC)) void PortB_Init(void){ volatile unsigned long delay; SYSCTL_RCGC2_R |= 0x0
  2. I'm using a Tiva C series launchpad (TM4C123G) to sample analog data using an external ADC (ADC0804). The ADC is clocked at 1.4MHz. The SysCtlClockSet command was used to set clock freq to 80MHz. A square wave is being generated on a pin, with a frequency same as the sampling rate, using the code given below. So this gives us the sampling rate on an oscilloscope. For some reason the sampling rate is TOO low. It is only ~330KHz with NO command in the loop. It drops to about ~280KHz with one digitalRead and to just a few hundred Hz with a SerialPrintln(). What is causing it to run so slow
×
×
  • Create New...