CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Using #INT_RB in 16F877

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
oguzmania



Joined: 24 Mar 2008
Posts: 2

View user's profile Send private message MSN Messenger

Using #INT_RB in 16F877
PostPosted: Mon Mar 24, 2008 1:01 pm     Reply with quote

Hi from Turkiye.I am newbie of this forum and CCS C and PIC.
Firstly i am sorry for my bad English. Embarassed

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

View user's profile Send private message

PostPosted: Mon Mar 24, 2008 1:32 pm     Reply with quote

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.
Quote:
c:\Program Files\picc\Examples\Ex_pbutt.c
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group