Thanks to Harold and Jinx for their quick replies. Sounds good to me. I do have the MCLR tied high, and will plan to make it input, hadn't thought of that, that way. Thought I read somewhere that read that programming MCLR as output, could cause issues with in circuit programming, which I haven't been using. I have a Microengineering EPIC parallel programmer that has been doing OK with the 1320 chips. I had planned leaving RA4 floating, and just calling it an output. And I had seen the notation for referring to the registers before, but seem to get along better at this point with the bits. Thanks again. :) Harold Hallikainen wrote: >> For the 18f1320 TRISA register, what are the individual direction bits >> designated for the register bits 0 to 4? The manual only shows the 4 >> bits as alloted to "PORTA Data Direction Register", with no further >> direction, i.e. bit 0 >>RA0, and bit 4 >> RA4 ? >> >> I want the RA0 to RA2 as analog input, RA4 as digital output (unused), >> and RA5 MCLR tied high. I am thinking TRISA = 0b0001111. Is that >> correct, or do I have LSB/MSB backwards? >> -- >> > > TRISA = 0b0001111 makes RA0, RA1, RAd, and RA3 inputs, the rest of port A > outputs. I'd probably also make RA5 an input just in case you forget to > enable the MCLR pin in the config bits. If I'm not using MCLR as an I/O, I > tie it high through a 10k, then I can use the ICD-2 on it. > > In Microchip C, you can access the individual bits of a TRIS register like > this: > > TRISAbits.TIRSA0=1; > TRISAbits.TRISA1=1; > TRISAbits.TRISA2=1; > TRISAbits.TRISA3=1; > > Hope that helps! > > Harold > > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist