View previous topic :: View next topic |
Author |
Message |
red32terra
Joined: 28 Sep 2008 Posts: 7
|
PIC operated FSK modem help |
Posted: Wed Nov 12, 2008 3:43 am |
|
|
hi, i'm interested building a FSK modem around a PIC microcontroller (PIC16F877A to be exact). we had XR2206/XR2211 as mod/demod, and zero a crossing detector. The modem will be used to communicate with other PIC modems in the same building. do we need to add more hardware like MAX232/485. I'm basically a newbie and I was hoping you guys could help us by giving us a kick in the right direction , suggestions or sample code so we could start. Thank you for any help. |
|
|
Ttelmah Guest
|
|
Posted: Wed Nov 12, 2008 9:49 am |
|
|
What are you going to communicate 'over'?.
The 2206/2211, would need at the least, a telephone line interface, that provides the connection and isolation. Without this, or an equivalent circuit, there is no point at all in using FSK. If you are just sending over wires that are not being used for something else, you might as well just use RS485 directly, without FSK.
What sort of data rate do you hope to achieve?. Simple FSK, is not going to give you great speed.
Remember that most standard telephone interface circuits, require the telephone line voltage to be present to power the gyrator used to provide the line hold current, and the opto coupler for carrier detect. More complexity, not really needed...
If this is not going over an actual 'telephone' connection, consider connecting another way.
Best Wishes |
|
|
Guest
|
|
Posted: Wed Nov 12, 2008 2:18 pm |
|
|
... Consider connecting another way .... I agree...
If you are using an actual Telephone line then consider using a pre-built modem. If you can take desktop size you can buy these for under 20 USD. If you need small you can buy embedded modems from MultiTech - check out the RJ series. You can communicate to these with a simple serial link with easy to understand AT Modem commands.
My 2 cents worth....
HTH - Steve H. |
|
|
red32terra
Joined: 28 Sep 2008 Posts: 7
|
|
Posted: Wed Nov 12, 2008 11:46 pm |
|
|
Hi, thank you guys for your quick reply.
Sorry, I forgot to tell you the detail that we'll be communicating over powerline, we are "tasked" to use VEPC-2 as an line coupling interface(LCU). Fortunately for us, speed is not much of concern because we are just transmitting a simple opcode( command/status codes) to control a system and not kilobytes of data. we can use pseudo x-10 but not exactly like x-10. We will send it during zero-crossing of the powerline carrier to limit the noise. Sorry for the complexity. Can this be done?
Microcontroller>> FSK (Xr2206/2211)>>LCU >>> powerline <<< LCU <<(Xr2206/2211) << PIC16F877A
There are actually 6 microcontroller communicating each other. Each has its own address.
Thanks for any reply. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu Nov 13, 2008 1:27 am |
|
|
I don't want to guess your effort for developing the application, cause it strongly depends on your knowledge in this field. But I think, you should have a power amplifier between XR2206 and line interface.
I don't know, the said VEPC-2 interface has sufficient overvoltage protection, it seems to have some diodes (most likely transsil/power zener types). I would design a second individual protection for sender/receiver circuit. |
|
|
red32terra
Joined: 28 Sep 2008 Posts: 7
|
|
Posted: Tue Nov 18, 2008 12:51 am |
|
|
Hi, FvM. thanks for replying . You are right. we are currently developing a signal conditioning circuit (optoisolator, amplifiers) between xr2206 and line interface.
But I'm much more concerned with the microcontroller part. Will I directly attach the usart to the xr2206? If I am sending data(with header, address, stop bit) every zero crossing of the powerline carrier using FSK modulation, how will the program look like. Will it be the same as pic communicating with multiple pic16f877? will this be implemented in an int_rda or int_rb0(for zero -crossing)? Pls. enlighten me, or tell me how to proceed with the code. Your reply is greatly appreciated. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Tue Nov 18, 2008 2:16 am |
|
|
I must confess, that I don't know by now, how your code should look like. I'm neither sure, if it's necessary or preferable at all to restrict powerline communication to zero crossing intervals nor if direct UART to FSK coding without additional modulation (e.g. Manchester encoding) is a reliable way. You can consult existing power line applications - or try on your own. The latter always works and would be also my preferred method. |
|
|
|