TRISx = 1 is used to read an analog input, ex: A/D input. It turns the port into a high impedance input. So, if you want the port to sink in current just make that port low with TRISx = 0 like in the example in that thread.