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.

UART Full duplex communication coding problem

Status
Not open for further replies.

sysysy

Member level 3
Joined
Nov 11, 2010
Messages
56
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,801
Hi,

with the datasheet of PIC 16F877A, state that support in full duplex communication.

I mange to make the half duplex communication working between my 2 MCU. but when come to full duplex , everything become not working.

Can anyone tell me why and guide me to solve this problem?

***
I am using the polling method in transmit and receive data for both main program of MCU. Someone suggest me using buffer with interrupt method, but i have no idea at all to implement this.
 

to work in full duplex communication you must use the interrupt signals and no wait for the flags.

if you use the interrupts i do not think you will have any problem.

:)
 

May i know in my interrupt service routine,

can i tranmit 2 byte data go out in sequence?
what i mean is just like

Code:
#INT_TBE
void transmit_isr()
{
     fputc(0xAA) ;//transmit the first byte header
     fputc('C');    //transmit the actual of data character 'c'
}

I doubt that this can work since the interrupt being call when the TXIF is set (mean the TXREG register is empty)

But why there is a compulsory to use interrupt since the receive and the transmit will be never conflict. they don't share any register or anythigs. But why make the whole program conflict?
 

the program you wrote it will work..

when you are in a interrupt the global interrupt is disabled unless you enable it.
The routine will transmit the 2 bytes and then after the interrupt routine will call again.

:)
 

It never work, i tried in many days already...many way i tried also not working...
the conclusion i made is the PIC not able to manipulate the transmitter and receiver uart together...

but i don't know deal with my coding part.... super FRUSTRATED

Tiger, anyway thanks for your reply and help....
 

what happens when you transmit only one char in the ISR..?
it will be helpful if you post the receive section and main program as well...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top