On Tue, Dec 09, 1997 at 10:13:24PM +0100, Kees van Bruggen wrote: > When I program the I/O ports is assembly I use the TRIS instruction to set the data direction of the pins. I am wondering how I should do this in C because there is no actual TRIS register. Don't know about the other C compilers, but in HI-TECH C you just say: #include main() { TRIS = 0x1; // or whatever } The compiler will generate the appropriate TRIS instruction. -- Clyde Smith-Stubbs | HI-TECH Software Email: clyde@htsoft.com | Phone Fax WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885 PGP: finger clyde@htsoft.com | AUS: +61 7 3354 2411 +61 7 3354 2422 --------------------------------------------------------------------------- ANSI C for the PIC! Now shipping! See www.htsoft.com for more info.