I am trying to interface ST7540 (power line transreciever)with Arduino Atmega328p using UART protocol(using Rx and Tx pins only).Please suggest me the examples which will help me in developing the necessary program for power line carrier communication.
The ST7540 (BTW: datasheet http://www.st.com/web/en/resource/technical/document/datasheet/CD00096923.pdf, you should have supplied this!) is half-duplex, so using Rx/Tx pins only doesn't work (the chip needs to know when to send and when to receive).
Provide a wiring diagram/schematics of your setup.
Please suggest me the examples which will help me in developing the necessary program for power line carrier communication.
What kind of examples are you expecting? Theoretically any example for RS485 based hardware works here too because it's also half-duplex and uses the UART for communication.
Thank you for replying .
As per the link of the datasheet provided (ST7540), pin 5(RxTx) will be used to set the modem in Rx mode(RxTx=1)
and in Tx mode(RxTx=0).
Looks like this solved your problem as you didn't provide the information I asked for.
Hello.
This is the wiring diagram which I have referred for making my hardware.
As i will be using UART communication,I will be connecting the following pins of the modem to my microcontroller.
Pin 2 (REG_DATA),Pin 4 (RxD),Pin 5 (RxTx),Pin 6 (TxD),Pin 12 (UART/SPI).
That's a copy of page 40 of the datasheet. Is you question academical without any practical implication? Why do you want to connect REG_DATA to the microcontroller if you want to use UART mode (it must be tied to GND in UART mode)? What about CD_PD and BU/THERM?
What do you want to achieve? Are you sure that you want to handle mains voltages with your level of experience? Such a project is not suited for beginners.
