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.
Thank you for the nice link. Basically, the code in the first post use for ADC and detect the maximum values also generate pulse wave form. look at the picture in the first post. so
what I want is that how to measure the time between two wave form or between two peaks.
- - - Updated - - -...
Thank you for your reply, I used the ready library for ADC.
Why you want to use them !! is related to sampling or what?
could you please explain a bit. Thank you again.
I used sine wave with 3Hz, inserted to ADC and detect the maximum values. According to these max values I generated pulse sequences and I would like to measure the time between two pulses with the same pic not use anther one. I used pic16f877a.
int maximum=0;
void main()...
I appreciate that Brian,
yes I will do it with ADC. I understand what you said. could you please see what I did and give me your suggestions.
1- Insert sine wave (5Hz-0.2s) to ADC.
2- Detect the max value in one period (0.2s).
3- store every max value in an array of A[5] for 5 peaks, that mean...
Thank you very much Brian, in this case does not matter what max is ?
I want the spike in the max values, what I think about is that detect the max values and store in the array A and then I make the array A = B and then use if condition
if (A==B){portb.f0=1;delay_ms(10);portb.f0=0}
is it...
Thank you very much,
I do not get it could you explain a bit more because the pic has comparator and I used before and work fine with fixed sine amplitude, however, if the amplitude go up and down this will make a problem because I fix the second input of the comparator for the certain voltage...
Thanks for the link
but I think you misunderstand!!
I insert analog sine wave to ADC in the pic microcontroller and then detected the max values (this already done)
my question is there any way to generate from the pic a square wave in respect with max values.
Thank you very much for your answer. I have done this part I detect the max of the sine wave from ADC.
What I ask about how to generate square wave or spikes in these max.
Thanks again
Hi everyone,
I have a sine wave and detect the maximum values, I would the pic generate spike or square wave in these maximum values like in the picture. any idea !!
Yes! you are right
but in cause of using 3V as a power supply the two references voltage will stay as it is or gann change?
1.024V
2.048V
because in other pic microcontroller there is equation to determain the voltage reference and it bases on the power supply.
Hi every one!
just I want ask about the internal reference for comparator in PIC16F1827
it said in the datasheet :
FVR, is a stable voltage reference, independent of VDD, with 1.024V,
2.048V or 4.096V selectable output levels
so, can we use different or just these.
if the power supply is...
Thank you emresel ;
as you said using two channels for different comparators, and using interrupt when the first output goes high and then start the time and when the second output goes high stop the timer.
I would use ADC instead of using comparators is there any idea or code to help. Thanks.
Hi everyone!
I am trying to measure the phase shift between two signals that have the same frequency.
I want use two channels of ADC and then use a counter to count if the first signal reach zero and the counter stop when the second signal hit the zero and then measure this time with give the...
I have found a small module (FC04UAB) which is really fit with my design; however; I am not sure is it possible to connect with PIC16 or not.
It has UART pins connection and support HCI.
if it is OK! can we communicate with enable mobile Bluetooth, someone said no because the mobile support...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.