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.

Multi usart using pic16f877a

Status
Not open for further replies.

M.Imran Ali

Member level 5
Member level 5
Joined
Sep 28, 2012
Messages
86
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Activity points
1,814
Hi
I need to make a card that uses at least five usat channal. All shold be of interrupt based? How can it be possible? It is urgent pls reply any one
 

You can use the hardware module of the PIC16F877A. For the other four, use software USART. Your compiler may have library functions/routines for software UART/USART. Check in the compiler manual.

Hope this helps.
Tahmid.
 
I am using ccs compiler.But i want to use reciever interrupt for each usart.Is it possible .If yes than how?
 

do you know kbhit() function........first u study that function......do u want sample code....i will send you........
 
Pls send if possible? I'll be very thankfull to you.
 

Code:
 #include<16f877a.h>
 #use delay(clock=10000000)
 #use rs232(baud=9600, xmit=PIN_C6,rcv=PIN_C7,stream=uart1)
 #use rs232(baud=9600, xmit=PIN_D0,rcv=PIN_D1,stream=uart2)
unsigned char c;
unsigned char d;
 void main(void)
 {
while(true)
{
if(kbhit(uart1))
{
c=fgetc(uart1);
fputc(c,uart1);
}
if(kbhit(uart2))
{
d=fgetc(uart2);
fputc(d,uart2);
}
} 
 }

TRY THIS CODE.....IT WORKS PERFECTLY.....HERE I USE TWO UART.WHEN WE PUT CHARACTER IN ANY WINDOW,IT GETS THIS CHARCTER AND THEN DISPLAYED IN THAT WINDOW......CHECK AND THEN REPLY.........
 
Thanks dear manikandanshine . It works now
 

ok... do u have any help ask me...if i know,i will surely reply you...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top