06-03-2009 12:49 PM
Hi everyone,
Before I begin I'll give you some background info:
I have a project at work which involves communicating with an atmel microcontroller using modbus. I have implemented the modbus protocal on the microcontroller (as a slave), and have tested it with some other modbus master softwares (downloaded from the web), which worked flawlessly.
I'm using the atmega324p microcontroller which sits on a development board by this company (http://www.ruggedcircuits.com/html/mb324p_nc.html)
Now, the tests that I performed were done via USB (not RS485). The development board has one of the UART ports connected to USB via FTDI's USB to UART converter (FT232R).
Now moving on the Labview. I'm using Labview 8.2 with the lastest VISA (version 4.5) and the latest modbus library (modbus 1.2). I have also downloaded the latest FTDI USB driver.
The microcontroller is programmed to work with:
mode: ascii
baudrate:9600
8 bits
1 stop bit
no parity
no control flow (as in no RTS etc...)
ok on to the "fun" part. The FTDI driver has created a virtual com port. In my case com11. I have not touched the modbus library functions (modbus init, write registers and etc.). Here's what I'm doing, I'm sending the slave a command to respond back x number of bytes. So basically I'm reading input registers. Now, mind you EVERYTHING WORKS. yes, there is no problem with the communication. BUT, for some odd reason the master can only communicate with the slave if I set the baud rate to 19200. yes, you read correctly, Although the slave is set to work with baudrate of 9600, the master can only communicate with it only if the baud rate is 19200.
I have checked the device manager for port settings and it matches the slave settings (9600, 8, 1stop bit, no parity)
what could be the problem??
Thanks
06-03-2009 04:43 PM