wrote readHMD() function
added AP2AC, PC2AC, AC2AP, PC2AP