Implementing led interface matrix conversion code