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?
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.
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