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.

18f1320 - Tris = Ok, Lat = ?

Status
Not open for further replies.

UTMonkey

New Member
Hi All,

I have been reviewing all the documentation I have on PICs, now I have my first PIC to program I am trying to make sense of my first Blinky LED program (I think BlueRoomElectronics wrote it).

It all makes sense except I am not sure what LATA does (Latch A)?

Any help gratefully received.

Mark
 
Glad to hear it, try the PORT instruction should still work.
The 18F1320 can be reprogrammed at least 100,000 times so you'll probably never wear it out :)
 
Well you need to use the PORT register while reading (TRIS must be 1 for any pin you're reading). Always use the LAT register while assigning the output pin (TRIS must be 0 for those pins). PORT does technically work but has the read-modify-write prob and even though that doesn't show up in most circumstances there's no reason at all to be using it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top