Multiplexing with TLC5940

My original idea was to use a 595 with a UDN2981 to source the current and the TLC5490 as the sink, but I'm quite a noob to multiplexing and really have no idea how to code it, the hardware is easy always been a hardware guy.