Hi from Turkiye.I am newbie of this forum and CCS C and PIC.
Firstly i am sorry for my bad English.
If I explain my project;
I have 4 equivalent sound detector circuit and then i will use op-amp in the exit of this 4 circuits.If detector detects sound op-amp (comparator) shows +5V , if not it shows 0 V.
This detector circuit's microphones are in different points.So if i send a sound signal ,the signal arrives this detectors in different times.
So I want to find this different times.(Or time differences)
Firstly i am using 16F877 and exit of comparator line combined RB<4:7>
For example;
1.detector:RB4
2.detector:RB5
3.detector:RB6
4.detector:RB7
I want to find time differences with using INT_RB and Timer1.
I set Timer 1 with using my conditions.(Example; using sound velocity etc...)
I don't want to using Timer 1 with it's interrupt.
For example this time differences;
1.detector:0 second
2.detector:120us
3.detector:2000us (2ms)
4.detector:25000us (25ms)
In my calculation i must measure 30us to 30 msn (Timer 1 64536-65536)
But i didn't make it in CCS.
I want;
if detector1 is logical1;
if (input(pin_b4))
timer 1 starts
and time1=0
if (input(pin_b5))
time2=get_timer1()
if (input(pin_b6))
time3=get_timer1()
if (input(pin_b7))
time4=get_timer1()
I want to find with time differences not using interrupt timer 1.
And when RB<4:7>pins 5V-->0V i don't want a new interrupt.
I am waiting your answers.I hope i explained my problem...
Peace be with you...
Oguz
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Mon Mar 24, 2008 1:32 pm
Look at this CCS example file. You can set it to detect a "low to high"
edge on the input signal, or a "high to low" edge.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum