Now have references printed out in the Proteus so the code should hopefully work.