it's more a matter of how the data is sent. You may try to change b5 to #b5 in SERIN line.

doesn't work? comment out the SERIN line and use b5=3, it should display 3 on your 7 segment... right?