Brian Reilly wrote: > it should be possible to set the states of the ports A & B within > the MPSIM environment (using the 'f' command). The problem is that > whilst I can set or reset any bit of port B, bit 2 of port A > refuses to be set, unless bit 3 is also set. (....!?!?). I assembled > the source code with the command line: > > mpalc test -f inhx8m -p 16c84 Brian: Wow... MPALC and MPSIM. Where have you BEEN, dude? If I were you, I would download MPASM (the assembler that replaced MPALC a few years ago) and MPLAB (which includes a Windows-based simulator that's much more powerful and MUCH easier to use than MPSIM). Both are available for free from Microchip's web site: http://www.microchip.com By the way, your code is fine. I vaguely recall a bug in an ancient version of MPSIM that resulted in the behavior you describe. -Andy === Andrew Warren - fastfwd@ix.netcom.com === === Fast Forward Engineering - Vista, California === === === === Custodian of the PICLIST Fund -- For more info, see: === === http://www.geocities.com/SiliconValley/2499/fund.html ===