- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to take an ADC reading at a specific point in received data stream from a wireless system.
First I dropped an SAR_ADC on the project and tested it worked using this code.
ADC_Start();
ADC_StartConvert();
result = ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);
RSSI_Val = ADC_GetResult16();
Next, I set a flag at the point in data reception I wanted to start sample and when I read the flag in main code I do an ADC sample. Trouble is that I do not have control over the point a packet arrives and therfore the sampling of the ADC is not always occurring when I need it.
Would someone have an example how I could start and ADC conversion within the Uart Interrupt routine so that when I get back in main loop the conversion would have been doen at the right time and I can read the value at that point?
Thanks
- Labels:
-
PSoC 5LP