On 31-10-11 08:41, KPL wrote: > If I am using part of a port for some external device, and defined a > whole port as an output: > > portb_direction =3D output Be warned for this pitfall! 'output' is defined as '1'. As a consequence only pin_B0 would become=20 output. To make all pins of PortB output you should specify: portB_direction =3D all_output Regards, Rob. --=20 R. Hamerling, Netherlands --- http://www.robh.nl --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .