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.

Transfering Strings Serially

Status
Not open for further replies.

Zhane

Member level 5
Joined
Feb 2, 2008
Messages
89
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,876
How can I transfer a string of data from 1 pic to another pic..and get the 2nd pic to decipher it correctly?

I've tried sending 8 packets of 1 bytes each...the target pic receives only part of it correctly while the remaining is distorted.
 

Hi,
If it is through serial port leave some gap between bytes to give time for the receiver to collect data. Better to use interrupt and ensure that the receiver collects the bytes immediately on arrival and do processing in background.
Regards,
Laktronics
 

what kind of interrupt can I use?
RCIF?
 

Hi,
I hope your PIC is having a hardware UART and in that case , set RCIE and in INTCON set GIE and PEIE.
Regards,
Laktronics
 

it does have hardware uart
so all i do is to set RCIE, GIE, PEIE

and..what do i check for? which flag will be triggered when there is an input?
 

Hi,

Once interrut is enabled thus, you will get an interrut when a byte is received and the program will automatically branch to the interrupt routine. There you read the byte and return back to the main program at the point of interruption. Read more about interrupt handling from the user manual of the chip.
You have to also ensure that while transmitting bytes you do not jam it by not giving gaps in between loading the bytes into transmit register.

Regards,
Laktronics
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top