How to connect RS485 Device to computer in Modbus RTU
If your computer doesn't support RS485 protocol, and if we're talking about regular PC's it most probably doesn't, then you cannot directly connect A and B to serial port. I would suggest using an USB-RS485 converter.