At 05:52 PM 1/5/00 +0100, you wrote: >I'm a beginner and I apologize for this question (probably it is stupid >and you all know the answer). > >I'm using the Microchip C Compiler. >I know how to access ports. I can put the value 1 to Port D with this >simple piece of code: > > PORTD = 1 > >Is there a way to access single bits of port D ? >Thanks >Massimiliano Use the BSF & BCF instructions. These set & clear the specified bit. Eg. bcf porta,0 clears bit 0 on port A. BUT... read the Microchip data on Read-Modify-Write operations carefully. BCF & BSF can cause other bits on the same port to change if not used correctly. Regards... ___________________________________ David Duffy Audio Visual Devices Ph: +61 7 38210362 Fax +61 7 38210281 AVD@uq.net.au Unit 8, 9-11 Trade Street Cleveland, Qld, 4163, Australia. ___________________________________