1. Home
  2. Docs
  3. How-To
  4. Utilize Modules Ports as Independent Controller Ports Outside of BOS System

Utilize Modules Ports as Independent Controller Ports Outside of BOS System

To use a module port as a separate controller port independent of the BOS system, certain steps must be followed. This can be accomplished by configuring the module port to function as a standalone port so that it can operate independently of the BOS system. In this way, users can benefit from greater flexibility and control over their systems. Read on to learn more about how to use one of the module ports as a port of controller ports independent of the BOS system.

First, reduce the number of ports in the .h file. This can be achieved by replacing the original number of ports with one less, and commenting out the last port along with its related USART port and UART Init prototype. For example, if the original number of ports is 6, it should be reduced to 5 by commenting out (//#define _P6), (//#define _Usart6 1), and (//extern void MX_USART6_UART_Init(void);).

 

Second, comment the MX_USART6_UART_Init() port inside the Module_Peripheral_Init() function in the .c file, also commenting this port inside GetPort function.

Now the port can be used as GPIO (input/output) or as port for receiving data from external software (e.g., RealTermPuttyHyperTerminal, and SecureCRT).

How can we help?