Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Continious Input signal for ADC

Status
Not open for further replies.

Max.Otto11

Newbie level 6
Joined
Oct 13, 2014
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
180
Hello all, i m working with PSoC 5LP. I do 16-bit ADC program. Now i face Problem to continious reading of Analog Input for ADC. My program work only for 1 value, then when i changes the Input value than the Output don't Change. For that i Need Interrupt. For this work i Need your suggestions.

Regards
Max
 

It can be done without ISR.

But for doing with ISR, You needed to enable ADC ISR in initialization and you have to write a ISR for reading the data from ADC and to store it in a variable or array.
 
Just monitoring the ADC End of conversion (EOC) bit in its control registers. may be they will use some other names as well.
 
Just monitoring the ADC End of conversion (EOC) bit in its control registers. may be they will use some other names as well.

Thank u for ur Suggestion.
I use EOC in my Programm. But only for result. But i want everytime when i Change the Input value then LCD Display must have to Change.

Code:
 for(;;)
    {
        if(ADC_DelSig_IsEndConversion(ADC_DelSig_RETURN_STATUS))
        {
            ADC_Ans = ADC_DelSig_GetResult32();
			
            Volt_Read =  ADC_DelSig_CountsTo_mVolts(ADC_Ans); 				
			
            LCD_PrintDecUint16(Volt_Read) ;						
        }
    }
 

for that you have to start conversion again and again in ADC. You are already waiting tor End of conversion many times but without starting conversion


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
for(;;)
    {
        if(ADC_DelSig_IsEndConversion(ADC_DelSig_RETURN_STATUS))
        {
            ADC_Ans = ADC_DelSig_GetResult32();
            
            Volt_Read =  ADC_DelSig_CountsTo_mVolts(ADC_Ans);               
            
            LCD_PrintDecUint16(Volt_Read) ;     
 
          /* Small delay for better visibility of the last value */
 
          /* Start the conversion here once again * /               
        }
    }

 
  • Like
Reactions: Max.Otto11

    V

    Points: 2
    Helpful Answer Positive Rating

    Max.Otto11

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top