ADCINC problem | Cypress Semiconductor
I want to test a very simple code, insamp (with two PGA and one ADC). When I run the code, it stop in the line:
if (ADCINC_1_fIsDataAvailable() != 0);
Below is the code, can anyone tell me what wrongs, thankks a lot in advance!
#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
ADCINC_1_Start(ADCINC_1_HIGHPOWER); /* Turn on ADC power */
ADCINC_1_GetSamples(0); /* Sample forever */
if (ADCINC_1_fIsDataAvailable() != 0) /* If ADC sample is ready... */
iResult = ADCINC_1_iGetData() + 2048; /* Get result, convert to unsigned and clear flag */
The general system setup as below:
Analog Power: SC on/RefH
OpAmp bias Low
Switch Mode Pump OFF
Trip Voltage LVD4.81V
Including is my project codes.