Thanks, that the approach I use. Once I find something that works, I change one thing at a time, until I am satisfied with that item, then move on to the next. Slow but sure. :) Found "while" was interesting, where first time through might be OK because LAT and PORT were same values, but, when comes through the loop (maybe extent of while would be better terminology) and goes to check the boolean, the LAT and PORT are different values. Maybe need another variable to set to PORT before entering the "while", and set the variable to LAT at the end of the while, or other way around. Maybe a 'if", or "for" would be a better choice, but haven't got that far. Just ported from 18F1320 to a 18F4320. Used the 1320 working one channel to perfect the method, the 4320 can handle 6 channels. I had 1320's on PICPROTO18 boards with space to add the few other components. Barry Gershenfeld wrote: >> Carl Denk wrote: >> >>> Thanks, understand what you are saying, and it's easy to do, but, why >>> the work around. >>> > > I was recommending that step, not as a workaround, but as a debugging step. > Once you change the mystery from "it doesn't work", to "that bit is in an > unexpected state", you can focus on answering > the real mystery. Then you can program your solution with confidence. > > Jan-Erik has addressed the issues with using ports. And port hardware is a > major factor that differentiates embedded programming from ordinary > programming. > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist