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.

[PIC] PIC24FJ128GA010 UART Problem

Status
Not open for further replies.

bhoobalan

Member level 1
Member level 1
Joined
Dec 28, 2013
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Visit site
Activity points
280
Hello friends,
I am new to this pic24fj128ga010 controller. In my project i want to use two pic24fj128ga010 controllers at a same time using UART communication. I have two Explorer 16 Boards, For Example i have taken that 1st board as Transmitter and 2nd board as Receiver. In the Transmitter i have Buttons and i Receiver i have Led's. Concept is that , when the button is pressed in the Transmitter and respective operation is done in Receiver Led.
I write the code for both transmitter and receiver and also i checked in Proteus simulation and it works fine. But in the hardware i did not get the out what i have already get from Proteus simulation.
I have attached the code and the simulator connection image that i have made.
Please refer this code and let me know if there is any mistake. And tell me that what should i want to do for the out put in hardware?

I am waiting for the reply
Thanks in advance
 

Attachments

  • Simulation Connection.png
    Simulation Connection.png
    36.4 KB · Views: 82
  • UART BOARD RX.txt
    3.3 KB · Views: 77
  • UART BOARD TX.txt
    3.3 KB · Views: 64

what are the crystal frequencies? do you receive anything? have you tried connected the explorer to a PC to see if anything works

have you an oscilloscope to look at the TX and Rx lines to see if any data is present?
 

Thanks for your reply Horace1,
Ya, i gave 8MHz crystal frequency for each boards. Ya, i have received led signal in the RX for first time then it is not responding with the switch(TX). No, i did not checked with the pc with explorer board.

No i don't have oscilloscope.

waiting for your reply
 

rather than transmitting binary 0 or 1 (switch value) try transmitting it as a digit, e.g. in TX
Code:
UART2PutChar(LATDbits.LATD7+'0');
and in RX
Code:
LATAbits.LATA7 = UART2GetChar()-'0';

if you connect the transmitter to a PC you should see it transmitting 0 or 1 as you change the switch which would confirm that the transmitter at least is working
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top