2017-06-18 11:04 AM
Hello,
i'm using stm32f103c8t6 in order to send data to my PC using RS485 (max485) and an USB/RS485 adapter , i made the right connection between components and i used uart to send the data to the max485 and i tried to check the data at reception using a hyperterminal and i found that i'm not receiving the correct data.is there some special configuation to do to uart in order to communication with the max485 (data length , stop bit ...)
thank you
#rs4852017-06-18 11:19 AM
What I know the RS485 is just a quite simple level shifter. What are you trying to send, Ints or Floats or bytes. Then there is the full duplex and half duplex. Have you terminated the receiving end.
I have just spent some 'quality time' with RS485 connection, and it works. But you must connect it correctly. Have your PC and controller a common ground. Maxim probably has application notes and such for RS485 and Max485.
Edit: Do you know that you can connect your MAX chip for local echo. That is RX+ to TX+ and so on. At least it worked with my chip and helped knowing where the trouble was (in wiring).
2017-06-18 12:02 PM
The settings would need to be coherent.
Send a stream of 'U' characters, review the signalling on the scope, verify the bit timings,etc.
Make sure the HSE, HSE_VALUE, and PLL setting are correct, and that you can verify the clocks with a scope.
2017-06-18 01:33 PM
i declared as information to send a uint8_t with a value 0x22 or 0xBB
i'm using half dubplex and i putted DE and RE to High level (to use max485 as transmitter ) i added a picture of my RS485/USB adaptaer, it's small circuit wich use a MAX485 and CH340Gthank you for the reply