16f628 all ( most ) port as ouput with pic basic ?

Status
Not open for further replies.

michel

New Member
HI,
I test an 16f628 with internal clock and it work fine but how can I do to have at least 12 output pins ? What is the initialization with PIC BASIC ?
Thanks
 
For a pin to be a input set the it to '1' using Tris or '0' for output

eg
TrisA=%11110000
TrisB=%00000000

this set the upper 4 bits of port A for input and the lower 4 for output and all of port b for output


Hope that helps

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…