I am trying to read values from a meter (WDM303FDWA1) through ATmega32. The communication to the meter has to be done by RS-485 modbus protocol. I would like to know what IC do I have to use to connect the Atmega32 and meter, sample codes for Modbus RS-485 protocol.
I am trying to communicate only with one meter and its Slave Id is 1, Baud rate could be anything (default is 9600)
Atmega32 communicating using rs-485 modbus protocol
atmegamodbusrs485
Related Topic
- Electrical – How to connect Arduino Uno to an energy meter
- Electronic – ASDA-A2 RS-485 Communication Configuration
- Electrical – Difference between PuTTY Serial and Modbus
- Electronic – RS485 without flow control
- Electrical – Modbus RTU Implementation to Automate Temperature through PIC Microcontroller
- Electrical – ModBus Timeout Error
- Electronic – Implementing Modbus RTU on a UART device
Best Answer
The WDM303FDWA1 uses RS485 as the line interface connection and this means you need to interface the Atmega to an RS485 chip such as a MAX485. Here is a link to Maxim's offerings on that device and here's the chip: -
If you look on page 8 of this document it details all the codes you need to send to talk to the device. It appears that you must send the "password" first followed by a function code, then the specific address of the data you want to read. The pdf file has that data.
As for the format of what comes back I can't help you with that - the document doesn't go into too much detail on this but, it does appear to be between 1 word and 3 words.
Neither can I help you with samples of modbus codes for use in the Atmega.