At 04:52 PM 2/24/2003 -0700, you wrote: >At 03:00 PM 2/24/03 -0800, Andre Abelian wrote: > >>// Port Init >>void port_init(void){ >> TRISB=0; // set portb output >> TRISA=1; // set portc all input >> PORTB=0; // make sure all leds off >> } > >Not an answer to your question, but perhaps an observation: you have >written above: TRISA=1. As far as I can tell, all that does is make pin >RA1 an input; the rest of the pins in port A are outputs. Other words, >what you have written to TRISA is b'00000001'. > >Or maybe I grok C even less than I thought. No, you are correct. It should be something like this (using C99 comments) TRISA = 0xFF; // set port A all inputs The comment is misleading as well, obviously. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body