This has come up before (with no real satifactory answer, unless I missed it). Apparently this code FL51XINC.ASM doesnt work. And code that DOES work with a windowed part, WONT work with a OTP part. I have no ICE to play with, and was hoping to go right from the MATLAB (ver 5.31), to a windowed 12CE518 part, to a couple of OTP parts. (Yes, I know that MATLAB doesnt support the internal EEPROM; I'll work around that). Does anybody have a "corrected" version???? Also, I notice that within FL51XINC.ASM, the TRIS instruction is used repeatedly. Shouldnt a better way be to use a "shaddow" register to hold the value sent, so that the configuration of GP0 thru GP5 doesnt get screwed up from the direction I want them to be from my main program? Sorry if these turn out to be dumb questions, as this is my first PIC project. Mike Garber -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads