Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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

:D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top