Does Flowcode support LAT?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Does Flowcode support LAT?

Post by DirkB »

Hello,

does Flowcode support LAT Variable?


12.2.3 LAT Registers
The LATx register associated with an I/O pin eliminates the problems that could occur with read-modify-write instructions. A read of the LATx register returns the values held in the port output latches instead of the values on the I/O pins. A read-modify-write operation on the LATx register, associated with an I/O port, avoids the possibility of writing the input pin values into the port latches. A write to the LATx register has the same effect as a write to the PORTx register.
The differences between the PORTx and LATx registers can be summarized as follows:
" A write to the PORTx register writes the data value to the port latch. A write to the LATx register writes the data value to the port latch. A read of the PORTx register reads the data value on the I/O pin. A read of the LATx register reads the data value held in the port latch.
Any bit and its associated data and control registers that are not valid for a particular device will be disabled. That means the corresponding LATx and TRISx registers, and the port pin, will read as zeros.

Regards

Dirk
Last edited by DirkB on Mon Mar 19, 2012 3:00 pm, edited 1 time in total.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Does Flowcode support LAT?

Post by Benj »

Hello Dirk,

Flowcode generally supports the LAT register when and where necessary in the component code.

The standard I/O icons use the Port registers rather then the Lat registers but you can edit this if you require by modifying the I/O related definitions in the FCD file for your target chip.

DirkB
Posts: 116
Joined: Wed Feb 08, 2012 2:45 pm
Has thanked: 7 times
Been thanked: 11 times
Contact:

Re: Does Flowcode support LAT?

Post by DirkB »

Hello Ben

it should be a Input Icon or you can select these Function in Input Icon.
You can read Output State of a Pin without switching Pin to Input.
These is a great Funktion and makes code more simply and faster.
Is it possible to to integrate these Function in future Update?

Regards

Dirk

Post Reply