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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…