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 CCS Technical Support

Is there an Einstein-like ready to help?

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



Joined: 17 Oct 2005
Posts: 68
Location: Brisbane

View user's profile Send private message

Is there an Einstein-like ready to help?
PostPosted: Thu Oct 20, 2005 12:45 am     Reply with quote

thanks Kender for ur response.i'm very new to user pic
how can i get PIC to synthesize acoustic frequency with a PWM unit. PIC can do timing too.
did you mean i can use the pwm to generate a tone burst?
did you also mean i can write a function time the returning signal?
but don't you think that will be like measuring the distance travelled by the sound?
my signal is a smooth rising hyperbolic signal after integration and only reduce in amplitude when a smaller object is detected...
how can i use pic many functionalies to solve this problem?
i know i can write a simple code as shown below to generate a pulse..but how about using pwm or interrupts?



#include <16f877a.h>
#define sonar_pin PIN_B3

void sign_generator()
{
output_high(soanr_pin);
delay_ms(80); //setting the operating frequency fr=12.5kHZ
output_low(sonar_pin);
delay_ms(900); //delay for 900 milliseconds for returning signal


}

void main()
{
set_trisb(0x00); //set portb for output
portb=0x00;

while(1)
{
sign_generator();

}

}

project description
thanks Andrew and Kender for your responses.i do agree that the description is very simplistic.some of the suggestions you have posted are very sensible indeed.
the device i have built is rather simple.the tone burst is rather produced by a ic555 timers.it's controlled by timing ics such as jk flipflop and a high speed voltage comparators.i would be more pleased to replace these components with PIC.
also i would be more happy to show you the scope results but i was not able to post it.i have tried but it doesn't seem to have a link to add an image from the desktop utility. if you have an idea on how to upload image from the desktop to the forum please let me know.
the simplified sketch shows echoes amplified and integrated so that a smooth rising and falling curve is produced.this is the sonar net in the pool under normal conditions with rain,wind,salinity,water temperature and smaller objects taken into account.when object is in the pool,the signal received is lower and the integrated signal amplitude is lower and if the setpoints conditions are met,the alarm is sounded.i have tried to draw some schematics but it doesn't look decipherable when i preveiwed it.so i deleted it.
please help me out!


cheers mates.


[img] Embarassed [/img]
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Oct 20, 2005 3:09 am     Reply with quote

When posting in a thread please use the button 'Post reply' and not the 'new topic' button. This is the third topic you started today for the same topic which causes a lot of 'noise' in this forum and the connection with your previous posts is lost.
kel



Joined: 17 Oct 2005
Posts: 68
Location: Brisbane

View user's profile Send private message

Is there an Einstein-like ready to help?
PostPosted: Thu Oct 20, 2005 7:06 pm     Reply with quote

thanks ckielstra i'm very new to this forum...
cheers


Last edited by kel on Thu Oct 20, 2005 7:33 pm; edited 2 times in total
kel



Joined: 17 Oct 2005
Posts: 68
Location: Brisbane

View user's profile Send private message

Is there an Einstein-like ready to help?
PostPosted: Thu Oct 20, 2005 7:06 pm     Reply with quote

thanks Kender for ur response.i'm very new to user pic
how can i get PIC to synthesize acoustic frequency with a PWM unit. PIC can do timing too.
did you mean i can use the pwm to generate a tone burst?
did you also mean i can write a function time the returning signal?
but don't you think that will be like measuring the distance travelled by the sound?
my signal is a smooth rising hyperbolic signal after integration and only reduce in amplitude when a smaller object is detected...
how can i use pic many functionalies to solve this problem?
i know i can write a simple code as shown below to generate a pulse..but how about using pwm or interrupts?



#include <16f877a.h>
#define sonar_pin PIN_B3

void sign_generator()
{
output_high(soanr_pin);
delay_ms(80); //setting the operating frequency fr=12.5kHZ
output_low(sonar_pin);
delay_ms(900); //delay for 900 milliseconds for returning signal


}

void main()
{
set_trisb(0x00); //set portb for output
portb=0x00;

while(1)
{
sign_generator();

}

}

project description
thanks Andrew and Kender for your responses.i do agree that the description is very simplistic.some of the suggestions you have posted are very sensible indeed.
the device i have built is rather simple.the tone burst is rather produced by a ic555 timers.it's controlled by timing ics such as jk flipflop and a high speed voltage comparators.i would be more pleased to replace these components with PIC.
also i would be more happy to show you the scope results but i was not able to post it.i have tried but it doesn't seem to have a link to add an image from the desktop utility. if you have an idea on how to upload image from the desktop to the forum please let me know.
the simplified sketch shows echoes amplified and integrated so that a smooth rising and falling curve is produced.this is the sonar net in the pool under normal conditions with rain,wind,salinity,water temperature and smaller objects taken into account.when object is in the pool,the signal received is lower and the integrated signal amplitude is lower and if the setpoints conditions are met,the alarm is sounded.i have tried to draw some schematics but it doesn't look decipherable when i preveiwed it.so i deleted it.
please help me out!


cheers mates.

[img] Rolling Eyes [/img]
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

View user's profile Send private message Visit poster's website

PostPosted: Fri Oct 21, 2005 7:52 am     Reply with quote

You might be looking for something like this ..
http://www.ccsinfo.com/forum/viewtopic.php?t=22010
kel



Joined: 17 Oct 2005
Posts: 68
Location: Brisbane

View user's profile Send private message

Re: do you have the Einstein factor?
PostPosted: Sat Oct 22, 2005 12:30 am     Reply with quote

what is going mr/mrs mtreitmey? the code looks extremely complicated.i found it extremely harder to comprehend.my profile suggests that i'm extremely new to CCS picc compiler and to programmming and was looking for assistance with my project!!!!
Mad
cheers mate
God bless!
PS:mtreitmey please ignore the previous post if you have already gotten it.i agreed with the responder from Perth, it did contain coarse/strong language and adult theme....
cheers God bless you.. Wink
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