This is almost impossible to do. USB is not just a serial protocol, it requires a special electrical interface and several layers of negotiation to work properly. Even if you could write code to emulate the functionality, you would still need some complex electronics to interface to the cable. Dedicated USB ICs have all this built on their silicon.
If you want to add a USB interface to a PC, there are multitudes of cheap cards available or if you want to add USB to an existing project, consider one of the FTDI serial interface devices.
Brian.