April 2, 2017 at 11:19 pm #13593
I made a transmitter and receiver using PIC 16F877A. It is designed for 8MHz and I am using zigbee module as transceiver. But I used 20MHz crystal while prototyping. It works fine but both the microcontroller should be powered simultaneously. (WHY ?)
Then I changed the frequency to 20MHz and reburned the IC. Now it is not working in wireless mode. In wired mode it is too lag to blink the led at the receiver.
Transmitting part consist of 3 switches and receiver section consists of 3 LEDs. Baud rate is 9600.April 3, 2017 at 11:58 am #13609
This is what I understand from your description.
You developed a program for PIC 16F877A with 8MHz frequency but while testing you used 20MHz crystal. It was working fine when you switching on both devices simultaneously. Then you changed the frequency to 20MHz in the program and rebuild it. Now it is not working.
Firstly, you need to use same frequency in both program and hardware. If you use different frequencies you will experience lot of problems like this. It is very difficult to track the problem without project code. Basically it will be some hardcoded delay or baud rate problem.April 9, 2017 at 6:26 pm #13653
Hello sir, Here i am attaching the documents related with my work.
As i mentioned, it comprises of a transmitter and receiver. Zigbee is used as transceivers here.
the circuit works fine for wired connection between the two controllers( TX to RX, RX to TX). But it works only even if the power supply is same for both(why). Since the RB1 in tx section is high, by logic the data is loaded to uart and recived at rx section and corrosponding RB1 LED blinks. Do i need to edit the code or circuit. How could i make the communication possible on the below mentioned circuit.
Attachments:You must be logged in to view attached files.April 17, 2017 at 8:15 am #13665
Grounds of both circuits (RX to TX and TX to RX) should be same for UART to work. In your case you are using ZigBee transceiver, so ground of ZigBee power should be same as microcontroller power.
You must be logged in to reply to this topic.