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.

PIC 18F1320 problems in assembly!

Status
Not open for further replies.
PORTA (18f1320)

I am having problems setting up PORTA on a 18f1320. I have written FF to TRISA and set up the configeration bits, but i still can't get RA4 to turn on could some one help please.

GreenP
 
I am having problems setting up PORTA on a 18f1320. I have written FF to TRISA and set up the configeration bits, but i still can't get RA4 to turn on could some one help please.
GreenP

Firstly, port pins are configured as outputs by clearing the corresponding bits in TRISA. (You have written 0FFH and have set all portA pins to inputs)

Secondly, Port pin RA4 is different to the others in that it is an "open-drain" output, if you need it to go high, you have to connect a pull-up resistor (e.g. 10Kohm) to VDD.
See section 10.2 of the PIC18F1320 manual for more info.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top