Page 1 of 1

Does Flowcode support LAT?

Posted: Sat Mar 03, 2012 11:52 am
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

Re: Does Flowcode support LAT?

Posted: Mon Mar 05, 2012 10:53 am
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.

Re: Does Flowcode support LAT?

Posted: Sun Mar 18, 2012 10:59 am
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