Continue to Site

Welcome to EDAboard.com

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.

PWM problem pic16f877

Status
Not open for further replies.

masab_ahmad

Member level 1
Joined
Jul 20, 2010
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Pakistan
Activity points
1,564
hi all,

I am using the pwm port RC1 of the pic16f877 to generate a 40khz wave to drive an ultrasonic sensor/transmitter.....,the sensor uses the timer and ADC of the pic to find the distance from an object and drive the motors accordingly..,but i also have to drive 2 dc motors seperately (i'm assuming that 2 seperate pwm's will be used to drive them..)! So i'll somehow have to drive the ultrasonic device with something else, any suggestions?
 

Hi;
Here is a note on ultrasonic sensor, offers driving cct. May be your device is not this one, but theory in principle should be similiar.
**broken link removed**
If I were you, i would use 555 timer option (fig6 in doc). Also connect reset pin of 555 IC to control ultrasonic tranmitter off and on.

Hope helps.
Goodluck
 

is the distance measurement and motor driving continuously?
if the answer is NO, you can multiplex one of the PWM output.
 

You can have the sensor as it is and use software PWM for driving the motors. Or you could use a smaller PIC (eg 12F683) or another PWM (or similar) IC for driving it (eg. UC3843). You could look for alternatives such as the 555 suggestion by emresel.

Hope this helps.
Tahmid.
 

Use PWM drive for motors and for Ultrasonic sensor, just use simple delays between pin- high and pin- low. The go for ADC measurement, at that time 40Khz may not be present in Sensors, but that time is good enough to read ADC and get your distance measurement done.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top