For other Samsung firmwares, click hereHow to flash or update Samsung Galaxy S5 with these firmwares
Download and install Samsung drivers
Download and extract the firmware
Hold volume down + home + power button for about 4 secs
When you see the warning message, press volume up button to enter odin mode
Connect Samsung device to PC and wait for drivers to install
Launch odin latest version preferable
When you see 0:[COM ..] in a blue bar below ID:COM your device is connected successfully to odin
Click on AP button (new versions) or PDA (old versions)
Navigate to the folder containing the firmware and select it
Wait for some seconds for odin to load the firmware
When the file is loaded successfully, Click Start button
A progress bar is seen at the top left of odin window
When you see a message PASS in green box, the flashing or updating process is complete
Your device will reboot
A factory reset is always good after this process