7 segment related routines extracted to libpca