View previous topic :: View next topic |
Author |
Message |
kel
Joined: 17 Oct 2005 Posts: 68 Location: Brisbane
|
Is there an Einstein-like ready to help? |
Posted: Thu Oct 20, 2005 12:45 am |
|
|
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] [/img] |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Thu Oct 20, 2005 3:09 am |
|
|
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
|
Is there an Einstein-like ready to help? |
Posted: Thu Oct 20, 2005 7:06 pm |
|
|
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
|
Is there an Einstein-like ready to help? |
Posted: Thu Oct 20, 2005 7:06 pm |
|
|
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] [/img] |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
|
kel
Joined: 17 Oct 2005 Posts: 68 Location: Brisbane
|
Re: do you have the Einstein factor? |
Posted: Sat Oct 22, 2005 12:30 am |
|
|
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!!!!
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.. |
|
|
|