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
Does Flowcode support LAT?
Moderator: Benj
- 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?
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 116
- Joined: Wed Feb 08, 2012 2:45 pm
- Has thanked: 7 times
- Been thanked: 11 times
- Contact:
Re: Does Flowcode support LAT?
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
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