研制了一种以80C196单片机加CPLD双片结构实现的16位绝对式光电轴角编码器,采用 80C196实现软件插值细分、代码转换、校正等,采用CPLD代替传统的外围集成电路,并且给出了系统硬件组成和软件控制流程。 关键词:光电轴角编码器;CPLD;80C196KC Design of optical encoder based on 80C196KC Microcontroller and CPLD LIU Han-ping1,2, FENG Chang-you1,DING Lin-hui1 (Changchun Institute of Optics, Fine Mechanics and Physics , Chinese Academy of Sciences ,Changchun 130033,China) Abstract: The optical-electric encoder was studied and developed using 80C196KC Microcontroller and CPLD. The 80C196KC Microcontroller was used for interpolation, Gray codes switching and modifying .Its hardware circuits and software structure were respectively analyzed in detail. To minimize the size of PCB and improve high reliability, the peripheral hardware circuits were designed in a single piece of CPLD. Key words: optical-electric encoders;CPLD;80C196KC Microcontroller