Hi, >For a while I moved from assembly language to this C compiler from CCS >(as it was given to me free by somebody who got fed up with it). > >I'm getting on quite well with it, but I'm stuck now on the WRITE_BANK >command. > >Am I correct that this command can be used to output a byte to the I/O >ports? No >I have not managed to do so, and I would like someone to give me an >example of how to output a number to, say, port B. make sure first You are using standard, or fix i/o settings in your header files and set your inputs and outputs accordingly after that as easy as..... output_low ( PIN_B5); output_high(PIN_B4); If You arre using the fast I/O settings first You have to set the TRIS register, set_tris_b ( 0b00001111); output_low (........................ If You like to send a full byte to the port You have to set a STRUCTURE first. Follow the LCD.C example it will show the way to do it. Cheers, Peter Schultz DVP Inc. 3430 Ocean View Blvd. Unit A Glendale, CA (818) 541-9020 Fax: (818) 541-9423