On Mon, April 2, 2012 4:34 pm, eMyListsDDg wrote: > new to using hi-tech c and would like to know which is preferred way to > define a pin for use. > > one can use TRIS, PORT or LAT bits to define a pin to put a LED on, yes? > > does one use one of the above or is it as simple as this? > > #define LED1 RA0 > > > i'm a bit unsure which of the SFRs such as listed above that one would > use. i'm using 16f88 On a PIC16F88, I would use: #define LED1 PORTAbits.RA0 TRIS defines the direction (TRIState), PORT is the I/O, LAT defines an output LATch (but isn't on the PIC16F88- it was introduced on later PICs, like the PIC18Fxxxx and the PIC24, dsPICs, etc). Matt Bennett Just outside of Austin, TX 30.51,-97.91 The views I express are my own, not that of my employer, a large multinational corporation that you are familiar with. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .