Added encoder interrupt service routines to read.