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.

Newbie question - What is LATA used for?

Status
Not open for further replies.

ex-navy

New Member
I have been playing with the 18F1320.

I understand that writing to TRISA or TRISB sets up either PORTA or PORTB as inputs or outputs but what is LATA for?

Thanks
 
Because reading the port location always returns the value the is on the port pins and not the value that you previously wrote, Microchip introduced a new register called Latch that keeps track of what was written to the port. The important difference is that if you read from the port register you will get the value that is on the pins. If you read from the Latch register you get the value that was previously written to it or the port register. This really only makes any difference if your pins are heavily loaded and take time to change I.E. driving capacitive loads.

Mike.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top