Hello
i'm working on a project at school and i need to program 2 serial interfaces on a PIC to communicate between a computer another device.
This is a summary of my project:
i want to create a Power line communication interface to enable 2 computers communicate via the seria port and over the 220V AC power line.
So i need an RS232 interface with the PIC (using a MAX232) to enable the PIC receive 8N1 (8 data bits and 1 stop bit) from the PC and transmit it over the power line to the receiving PC.
A the PIC sends the serial data over the power line through a Power line Modem chip. But the problem is i have to add some preamble to my data (as adviced a technical personal from the company i got the power line chip from) before i send it over the Power line through the Power line modem to prevent me loosing some of my data during reception.
So i need to send/receive 8bit data from/to the PC and send/receive about 24bit data to/from the power line modem
i know i'll implement my two serial interfaces using a hardware UART of the PIC16F877 and a software UART using any other pin. But how best do i implement this.
My major area of challenge is this
1. if i have to receive more than 8bits of data say from the PC, how do implement this? Or must i restrict the maximum amount of input bytes i can get at a time or can i send out each byte as i receive it
2. secondly what kind of pramble can i use? because due to the nature of entire system, i will loose some of my input data before actual reception begins so how can i ignore the preambel and collect just my data?
3. which interface would be better to implement the software and Hardware UARTs, the PIC to PC interface or the PIC to modem interface?
I'll appreciate all the help i can get. Thank you.
i'm working on a project at school and i need to program 2 serial interfaces on a PIC to communicate between a computer another device.
This is a summary of my project:
i want to create a Power line communication interface to enable 2 computers communicate via the seria port and over the 220V AC power line.
So i need an RS232 interface with the PIC (using a MAX232) to enable the PIC receive 8N1 (8 data bits and 1 stop bit) from the PC and transmit it over the power line to the receiving PC.
A the PIC sends the serial data over the power line through a Power line Modem chip. But the problem is i have to add some preamble to my data (as adviced a technical personal from the company i got the power line chip from) before i send it over the Power line through the Power line modem to prevent me loosing some of my data during reception.
So i need to send/receive 8bit data from/to the PC and send/receive about 24bit data to/from the power line modem
i know i'll implement my two serial interfaces using a hardware UART of the PIC16F877 and a software UART using any other pin. But how best do i implement this.
My major area of challenge is this
1. if i have to receive more than 8bits of data say from the PC, how do implement this? Or must i restrict the maximum amount of input bytes i can get at a time or can i send out each byte as i receive it
2. secondly what kind of pramble can i use? because due to the nature of entire system, i will loose some of my input data before actual reception begins so how can i ignore the preambel and collect just my data?
3. which interface would be better to implement the software and Hardware UARTs, the PIC to PC interface or the PIC to modem interface?
I'll appreciate all the help i can get. Thank you.