Hi Xiao, Important to use the correct topic tag when you post to the Piclist! I set it to PIC for this reply, but please do so when you post a new message. On Fri, 28 May 2010 17:31:11 -0400, "Xiao Xu" said: > To set, for example RA0, to high in C, can you just do PORTA0=1? In HiTech you can do RA0 = 1 plus all the other more "C" like methods like PORTA |= 0x01 There are several examples in the HiTech folder you have, you might have a look at them. You also need to do a few other things to set up the chip, looking at the examples will give you an idea of some of the things you need. Some of them are chip specific, but setting the TRIS register for the port is a must-do, since it defaults to all input. Again, those examples in the HiTech folder are essential to read! Cheerful regards, Bob -- http://www.fastmail.fm - Does exactly what it says on the tin -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist