Hi, I was wondering.. is it possible to use 2 PIC16F84A with only 1 crystal oscillator..? If it is possible then how do I do it..? Connect it the usual way to 1 PIC and then connect both of the OSC input of the 2 PIC in parallel..?
I am thinking of doing a ultrasonic range finder.. From reading the posts in the forum, i understand that i need to modulate it to a certain frequency such as 40KHz so that other frequency of sound wont interfere with it..
I plan to use 4MHz crystal and in order to generate 40KHz, the time period should be 100us rite..?
Below is the code snippet for BoostC (SourceBoost) written in C. The transmitter of the Ultrasonic is connected to RB0.
Is the code correct..?
How about the receiver part..?
How do I cause the receiver to receive 40Khz..? Is it the part of the component (as in the receiver can only receive 40Khz or is it the PIC16F84A part? If it is the PIC then how do I program the PIC..?
I am thinking of doing a ultrasonic range finder.. From reading the posts in the forum, i understand that i need to modulate it to a certain frequency such as 40KHz so that other frequency of sound wont interfere with it..
I plan to use 4MHz crystal and in order to generate 40KHz, the time period should be 100us rite..?
Below is the code snippet for BoostC (SourceBoost) written in C. The transmitter of the Ultrasonic is connected to RB0.
Code:
set_bit(portb,1);
delay_10us(5);
clear_bit(portb,1);
delay_10us(5);
Is the code correct..?
How about the receiver part..?
How do I cause the receiver to receive 40Khz..? Is it the part of the component (as in the receiver can only receive 40Khz or is it the PIC16F84A part? If it is the PIC then how do I program the PIC..?