FLProg + nooLite (continued)

  • Tutorial


In a previous post, I talked about implementing support for nooLite equipment in the FLProg program. My omission was not to talk about one very convenient function of this equipment, which allows you to connect multiple transceivers to the same UART port and handle them independently. I decided to correct this omission.

The scheme for connecting several transceivers to one UART port (taken from the transceiver documentation) looks like this:



A feature of this inclusion is the use of SE transceiver inputs. If 0 V is supplied to this input, the transceiver will not respond to commands transmitted via UART, and if 3-5 V is applied, then the commands will be executed.
In this lesson we will turn on and off several loads using different transceivers.
Scheme of the test bench:



We create a new project, and in it we configure the input - output of the controller.
First, we create three inputs for the buttons:



Since we have the buttons connected between GND and the input, we turn on the pull-up resistors, well, for clear operation, we turn on the chatter protection.



Then we create three outputs for controlling transceivers.





Then we create six variables for the control commands.





Now drag the first input onto the circuit, two R-trigger blocks (Library of blocks - the “Triggers” folder), as well as two variables - “Command to turn on load 1” and “Command to turn off load 1”. Then we connect them in accordance with the scheme:



How does she work? Since we have a button connected between GND and the input, and a pull-up resistor is also turned on, when the button is released, the output of the input unit will be 1, and when the button is pressed, it will be 0. The upper R-Trigger selects the leading edge (transition from 0 to 1) - then there is a moment of releasing the button and creates a short impulse to disconnect the load in the variable "Load shedding command 1". The lower R-Trigger, since its input is inverted, produces a trailing edge (transition from 1 to 0) - that is, the moment the button is pressed. And it also forms at this moment a short impulse in the variable “Command to turn on load 1”.
Now repeat this circuit for the rest of the inputs.



We will call this board “Front Highlighting” and create another one. You can immediately call it - "Transceiver Management". Drag and drop the variables “Command to turn on the load 1” and “Command to turn off the load 1”, the OR block (Library of elements - the folder “Basic elements”) and the output “Turn on the transceiver 1”. Then we connect them in accordance with the scheme:



How does it work? If there is 1 in the variable “Command to turn on the load 1” OR in the variable “Command to turn off the load 1”, log 1 will appear at the output “Turn on transceiver 1” (that is, transceiver 1 will work out the commands sent to it). Repeat this circuit for the rest of the transceivers.



Let's create a new “Sending teams” board.

For this circuit to work, it is important that the transceiver control is located, and the sending of commands are on different boards, and the control board is located higher than the sending of commands. This ensures that the transceiver is turned on first, and then a command will go on it. The order of execution of commands within the same board is not so simple and obeys a more complex algorithm.


Drag and drop all the enable command variables onto the bottom board, the OR block (Element Library - Basic Elements folder), and the nooLite transceiver control unit (Element Library - Miscellaneous folder). Connect them.



In accordance with the scheme, when a log.1 appears in any of the variables, a command will be sent to turn on the load. Configure the nooLite transceiver control unit to transmit this command.



Repeat this circuit to send a shutdown command.



Set up the block.



That's it. Thanks for attention.

Also popular now: