Embedded board card indicator light control method and device based on software programming

Through software programming, the indicator lights of embedded boards are controlled, and combined indicator light display is realized using I/O access, which solves the problem of limited panel space and realizes flexible status and fault information display, which is suitable for embedded boards.

CN120475601APending Publication Date: 2025-08-12CASCO SIGNAL LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510833321.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

Due to limited panel space on the embedded board, more indicators cannot be set to display more running status.

Method used

By detecting the operating status of the embedded board in real time, and using I/O access method to control the lighting and expiration of several indicator lights, software programming methods are used to bind different operating statuses to realize the combined display of indicator lights.

Benefits of technology

Under the premise of small space, custom board status and fault information are flexibly displayed. It is suitable for embedded boards with limited panel space and can locate faults in the startup stage during the BIOS and bootrom boot stages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120475601A_ABST
    Figure CN120475601A_ABST
Patent Text Reader

Abstract

The invention provides an embedded board card indicator light control method and device based on software programming. The method comprises the following steps: detecting the running state of the embedded board card in real time; when it is detected that the embedded board card enters the target operation state, on-off control is conducted on a plurality of indicator lamps in an I / O access mode, and for different operation states, the on-off states of the indicator lamps are different. The board card is used for solving the problem that in the prior art, due to the fact that the space of a panel on the board card is limited, more indicator lamps cannot be arranged to display more running states.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded board cards, and in particular to a method and device for controlling an indicator light of an embedded board card based on software programming. Background Art

[0002] Embedded boards are circuit boards equipped with a processor, various integrated circuits, interfaces, and other key components, all of which are assembled to perform specific functions, such as USB, Ethernet, serial ports, GPIO (general-purpose input / output ports), etc., in order to connect external devices and sensors.

[0003] Embedded boards typically use indicator lights to display the current device operating status or results. Typically, depending on application needs, boards include power indicators, status indicators (such as a network LINK indicator), data indicators (such as a network ACT indicator, serial port data receiving and sending indicators, and CAN port data receiving and sending indicators), switch indicator lights (off corresponds to a switch value of 0, on corresponds to a switch value of 1), and fault indicators (off in normal operation, on in the event of a fault).

[0004] The aforementioned indicators, primarily implemented through hardware control, can intuitively display operational and fault conditions. For example, if the serial port's data transmission indicator is off, problems with the serial port's data transmission can be quickly identified; if the board fault indicator is on, it indicates a board failure. However, in real-world applications, indicators are also needed to clearly indicate whether the system is operating normally, the causes of system failures, or the causes of startup failures. However, due to limited panel space on the board, adding more indicators to display a wider range of operational conditions is not feasible.

[0005] The statements herein merely provide background information related to the present invention and do not necessarily constitute prior art. Summary of the Invention

[0006] The purpose of the present invention is to provide an embedded board indicator light control method and device based on software programming to solve the problem in the prior art that due to the limited panel space on the board, more indicator lights cannot be set to display more operating states.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0008] A method for controlling an indicator light of an embedded board based on software programming, comprising:

[0009] Real-time detection of the operating status of the embedded board;

[0010] When it is detected that the embedded board enters the target operating state, the on and off states of the plurality of indicator lights are controlled by I / O access, wherein the on and off states of the plurality of indicator lights are different for different operating states.

[0011] Optionally, during the execution of the BIOS program, the bootrom boot program and the application program, the running status of the embedded board is detected in real time.

[0012] Optionally, the target operating state includes one or more of the following operating states: power-on state, entering BIOS state, BIOS failure state, entering bootrom state, bootrom failure state, entering application state, application initialization failure state, application operation failure state, application normal odd cycle state, application normal even cycle state.

[0013] Optionally, the controlling the on and off of the plurality of indicator lights by means of I / O access includes:

[0014] The sysOutByte function is used to write 0 or 1 into the port corresponding to each of the plurality of indicator lights, wherein one of 0 and 1 indicates that the light is on and the other indicates that the light is off.

[0015] Optionally, the number of the indicator lights is 4, and the 4 indicator lights are pre-combined using BCD codes and bound to different operating states.

[0016] An embedded board indicator light control device based on software programming, comprising:

[0017] A detection module, used for detecting the operating status of the embedded board in real time;

[0018] The control module is used to control the on and off of a plurality of indicator lights through I / O access when detecting that the embedded board enters the target operating state, wherein the on and off states of the plurality of indicator lights are different for different operating states.

[0019] Optionally, during the execution of the BIOS program, the bootrom boot program and the application program, the detection module detects the running status of the embedded board in real time.

[0020] Optionally, the target operating state includes one or more of the following operating states: power-on state, entering BIOS state, BIOS failure state, entering bootrom state, bootrom failure state, entering application state, application initialization failure state, application operation failure state, application normal odd cycle state, application normal even cycle state.

[0021] Optionally, the control module is specifically configured to write 0 or 1 to a port corresponding to each of the plurality of indicator lights through a sysOutByte function, wherein one of 0 and 1 indicates that the light is on and the other indicates that the light is off.

[0022] Optionally, the number of the indicator lights is 4, and the on and off states of the 4 indicator lights are pre-combined using BCD codes and bound to different operating states.

[0023] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the methods described above when executing the program.

[0024] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements any of the methods described above.

[0025] Compared with the prior art, the present invention has the following advantages:

[0026] 1. Small footprint, suitable for embedded boards with limited panel space;

[0027] 2. Software programming control indicator light is conducive to flexible display of customized board status and fault information;

[0028] 3. The indicator lights can also be controlled during the BIOS and bootrom boot phases, which helps locate board failures during the startup phase. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for the description. Obviously, the drawings described below are one embodiment of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort:

[0030] Figure 1 A flowchart of a method for controlling an indicator light of an embedded board based on software programming provided by the present invention;

[0031] Figure 2 Run the flowchart for the board.

[0032] Figure 3 This is a structural diagram of an embedded board indicator light control device based on software programming provided by the present invention. DETAILED DESCRIPTION

[0033] The scheme proposed in the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the drawings are in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the implementation methods of the present invention. In order to make the purposes, features and advantages of the present invention more obvious and easy to understand, please refer to the accompanying drawings. It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the limiting conditions for the implementation of the present invention, so they have no technical substantive significance. Any structural modification, change in proportional relationship or adjustment of size, without affecting the efficacy and purpose that can be achieved by the present invention, should still fall within the scope of the technical content disclosed by the present invention.

[0034] The present invention provides a software-programmable embedded board indicator light control method and device. Software-controlled indicator lights are configured to reflect system operating status and fault information by controlling the combination and dynamic display of multiple indicator light positions. Specifically, several software-programmable indicator lights are configured at the hardware level, with customizable light position combinations and meanings. The on / off control of the indicator lights is also implemented at the software level. This is described in detail below.

[0035] like Figure 1 As shown, an embodiment of the present invention provides an embedded board indicator light control method based on software programming, including step S101 and step S102.

[0036] Step S101: detecting the operating status of the embedded board in real time.

[0037] Step S102: When it is detected that the embedded board enters the target operating state, the on / off states of the plurality of indicator lights are controlled by I / O (Input / Output) access, wherein the on / off states of the plurality of indicator lights are different for different operating states.

[0038] Specifically, from the moment the embedded board is powered on, the central processing unit within the board begins real-time monitoring of the board's operating status. To intuitively identify whether the system is operating normally, the cause of system failures, or the cause of failures during the board startup phase, in this embodiment, the embedded board's operating status is monitored in real time during the execution of the BIOS, the BootROM boot program, and the application program.

[0039] Some operating states that require indicator light indication can be predefined as target operating states, for example, one or more of the following: power-on state, BIOS entry state, BIOS fault state, bootrom entry state, bootrom fault state, application entry state, application initialization fault state, application operation fault state, application normal odd cycle state, and application normal even cycle state can be set as target operating states, and a corresponding indicator light on / off state can be set for each state. The BIOS fault state can be further divided into multiple states based on the fault type, such as BIOS fault state 1 and BIOS fault state 2; the bootrom fault state can also be further divided into multiple states based on the fault type, such as bootrom fault state 1 and bootrom fault state 2; the application initialization fault state can also be further divided into multiple states based on the fault type, such as initialization fault state 1 and application initialization fault state 2; and the application operation fault state can also be further divided into multiple states based on the fault type, such as application operation fault state 1, application operation fault state 2, and application operation fault state 3.

[0040] When the board enters the corresponding operating state, the indicator lights are controlled to turn on and off through I / O access. Specifically, the sysOutByte function can be used to write 0 or 1 to the port corresponding to each of the plurality of indicator lights, where one of 0 and 1 indicates that the light is on and the other indicates that the light is off.

[0041] In this embodiment, four indicator lights may be used, and the correspondence between the indicator lights and the control bits for I / O access is defined as shown in Table 1 below.

[0042] Table 1

[0043]

[0044] In this embodiment, the on / off states of the four indicator lights can be pre-combined using BCD (Binary-Coded Decimal) codes (a maximum of 16 combinations can be displayed) and associated with different operating states. Table 2 shows only one example of a light position combination and its corresponding operating state definition.

[0045] Table 2

[0046] Light1 Light2 Light3 Light4 Power-on status Light up Light up Light up Light up Enter BIOS Turn off the lights Light up Turn off the lights Turn off the lights BIOS Failure State 1 Turn off the lights Light up Light up Turn off the lights BIOS Failure State 2 Turn off the lights Turn off the lights Light up Light up Enter bootrom Turn off the lights Light up Turn off the lights Light up Bootrom failure state 1 Turn off the lights Turn off the lights Turn off the lights Light up Bootrom failure state 2 Light up Light up Turn off the lights Turn off the lights Enter the application Turn off the lights Turn off the lights Turn off the lights Turn off the lights Application initialization failure state 1 Light up Turn off the lights Turn off the lights Turn off the lights Application initialization failure state 2 Turn off the lights Turn off the lights Light up Turn off the lights Application running failure state 1 Light up Turn off the lights Turn off the lights Light up Application running failure state 2 Light up Light up Turn off the lights Light up Application running failure state 3 Turn off the lights Light up Light up Light up Reserved (unused) Light up Turn off the lights Light up Turn off the lights Apply normal odd cycle state Light up Turn off the lights Light up Light up Apply normal even cycle state Light up Light up Light up Turn off the lights

[0047] The following Figure 2 Taking the board card operation process shown as an example, the solution of the present invention is described in detail.

[0048] Figure 2"Start" in the code indicates that the board is powered on. The card is detected to be in the powered-on state. At this point, the data to be written to the indicator light ports in the sysOutByte function is set to 0000 (as shown in Table 2), thereby controlling all four indicator lights to light up. The board then enters the BIOS state and detects that it has entered the BIOS state. At this point, the data to be written to the indicator light ports in the sysOutByte function is set to 1011, thereby controlling only light2 to light up, while the other indicators are all off. The BIOS then performs two key checks. If the check results in the first BIOS fault state, indicating that BIOS fault state 1 has been detected, the data to be written to the indicator light ports in the sysOutByte function is set to 1001, thereby controlling light2 and light3 to light up, while light1 and light4 are off. If the check results in the second BIOS fault state, indicating that BIOS fault state 2 has been detected, the data to be written to the indicator light ports in the sysOutByte function is set to 1100, thereby controlling light3 and light4 to light up, while light1 and light2 are off.

[0049] If both key points in the BIOS are checked normally, the system runs to the bootrom, and it is detected that it has entered the bootrom state. At this time, the data to be written to the indicator port in the sysOutByte function is set to 1010, so that light2 and light4 turn on, and light1 and light3 turn off. Then two key points are checked in the bootrom. If the check result is the first bootrom fault state, it means that bootrom fault state 1 is detected. At this time, the data to be written to the indicator port in the sysOutByte function is set to 1110, so that light4 turns on, and the other indicators turn off. If the check result is the second bootrom fault state, it means that bootrom fault state 2 is detected. At this time, the data to be written to the indicator port in the sysOutByte function is set to 0011, so that light1 and light2 turn on, and light3 and light4 turn off.

[0050] If both key points in the bootrom are checked without exception, the system runs to the application program and detects that it has entered the application state. At this time, the data to be written to the indicator port in the sysOutByte function is set to 1111, and all the indicators are turned off. Then, two key points are checked during the application initialization phase. If the check result is the first application initialization failure, it means that application initialization failure state 1 has been detected. At this time, the data to be written to the indicator port in the sysOutByte function is set to 0111, and light1 is turned on, and the other indicators are turned off. If the check result is the second application initialization failure, it means that application initialization failure state 2 has been detected. At this time, the data to be written to the indicator port in the sysOutByte function is set to 1101, and light3 is turned on, and the other indicators are turned off.

[0051] If there are no abnormalities in the two key point checks of application initialization, the system runs to the application cycle processing, and the application performs an operation status check during the cycle. If the first application operation failure is detected, it means that application operation failure state 1 is detected. At this time, the data to be written to the indicator port in the sysOutByte function is set to 0110, so that light1 and light4 are on, and light2 and light3 are off. If the second application operation failure is detected, it means that application operation failure state 2 is detected. At this time, the data to be written to the indicator port in the sysOutByte function is set to 0010, so that light3 is off and the other indicator lights are on. If the third application operation failure is detected, it means that application operation failure state 3 is detected. At this time, the data to be written to the indicator port in the sysOutByte function is set to 1000, so that light1 is off and the other indicator lights are on.

[0052] If there is no abnormality during the cycle, the normal odd cycle state or the normal even cycle state is set according to the parity attribute of the current cycle. If the normal odd cycle state is applied, the data to be written to the port of the indicator light in the sysOutByte function is set to 0100, so that light2 is turned off and the other indicator lights are on. If the normal even cycle state is applied, the data to be written to the port of the indicator light in the sysOutByte function is set to 0001, so that light4 is turned off and the other indicator lights are on, thereby realizing dynamic changes in the odd and even cycles of the indicator lights.

[0053] This embodiment provides several software-programmable indicator lights at the hardware level, allows for custom light position combinations and their meanings, and enables software-level control of the indicator lights. This invention is suitable for embedded boards where limited panel space makes it difficult to use digital tubes. By using software-programmable indicator lights and light position combinations, the invention provides intuitive display of system status and fault information.

[0054] Based on the same inventive concept, an embodiment of the present invention further provides an embedded board indicator light control device based on software programming, such as Figure 3 Shown, including:

[0055] The detection module 201 is used to detect the operating status of the embedded board in real time;

[0056] The control module 202 is used to control the on / off of a plurality of indicator lights through I / O access when detecting that the embedded board enters the target operating state. The on / off states of the plurality of indicator lights are different for different operating states.

[0057] Furthermore, during the execution of the BIOS program, the bootrom boot program and the application program, the detection module 201 detects the running status of the embedded board in real time.

[0058] Furthermore, the target operating state includes one or more of the following operating states: power-on state, entering BIOS state, BIOS failure state, entering bootrom state, bootrom failure state, entering application state, application initialization failure state, application operation failure state, application normal odd cycle state, and application normal even cycle state.

[0059] Furthermore, the control module 202 is specifically configured to write 0 or 1 to the port corresponding to each of the plurality of indicator lights through the sysOutByte function, wherein one of 0 and 1 indicates that the light is on and the other indicates that the light is off.

[0060] Furthermore, the number of the indicator lights is 4, and the on and off states of the 4 indicator lights are pre-combined using BCD codes and bound to different operating states.

[0061] For the specific content of the embedded board indicator light control device based on software programming, reference may be made to the above-mentioned embedded board indicator light control method based on software programming, which will not be described in detail here.

[0062] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned embedded board indicator light control method based on software programming is implemented.

[0063] The present invention also provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the above-mentioned embedded board indicator light control method based on software programming is implemented.

[0064] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0065] Although the present invention has been described in detail through the above preferred embodiments, it should be understood that the above description is not intended to limit the present invention. After reading the above description, various modifications and substitutions of the present invention will become apparent to those skilled in the art. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A method for controlling an embedded board indicator light based on software programming, characterized in that: include: Real-time detection of the operating status of the embedded board; When it is detected that the embedded board enters the target operating state, the on and off states of the plurality of indicator lights are controlled by I / O access, wherein the on and off states of the plurality of indicator lights are different for different operating states.

2. The software programming-based embedded board indicator light control method according to claim 1, characterized in that: During the execution of the BIOS program, the bootrom boot program and the application program, the running status of the embedded board is detected in real time.

3. The software programming-based embedded board indicator light control method according to claim 2, characterized in that: The target operating state includes one or more of the following operating states: power-on state, entering BIOS state, BIOS failure state, entering bootrom state, bootrom failure state, entering application state, application initialization failure state, application operation failure state, application normal odd cycle state, and application normal even cycle state.

4. The software programming-based embedded board indicator light control method according to claim 1, characterized in that: The method of controlling the on and off of several indicator lights through I / O access includes: The sysOutByte function is used to write 0 or 1 into the port corresponding to each of the plurality of indicator lights, wherein one of 0 and 1 indicates that the light is on and the other indicates that the light is off.

5. The software programming-based embedded board indicator light control method according to claim 1, characterized in that: The number of the indicator lights is 4, and the 4 indicator lights are pre-combined using BCD codes and bound to different operating states.

6. An embedded board indicator light control device based on software programming, characterized in that: include: A detection module, used for detecting the operating status of the embedded board in real time; The control module is used to control the on and off of a plurality of indicator lights through I / O access when detecting that the embedded board enters the target operating state, wherein the on and off states of the plurality of indicator lights are different for different operating states.

7. The software-programmed embedded board indicator light control device according to claim 6, characterized in that: During the execution of the BIOS program, the bootrom boot program and the application program, the detection module detects the running status of the embedded board in real time.

8. The software-programmed embedded board indicator light control device according to claim 7, characterized in that: The target operating state includes one or more of the following operating states: power-on state, entering BIOS state, BIOS failure state, entering bootrom state, bootrom failure state, entering application state, application initialization failure state, application operation failure state, application normal odd cycle state, and application normal even cycle state.

9. The software-programmed embedded board indicator light control device according to claim 6, wherein: The control module is specifically configured to write 0 or 1 to a port corresponding to each of the plurality of indicator lights through a sysOutByte function, wherein one of 0 and 1 indicates that the light is on and the other indicates that the light is off.

10. The software-programmed embedded board indicator light control device according to claim 6, characterized in that: The number of the indicator lights is 4, and the on and off states of the 4 indicator lights are pre-combined using BCD codes and bound to different operating states.

11. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method for representing BIOS POST progresses by utilizing lamps on USB keyboard

    CN106980569A

  • DSLAM equipment control method, device and system and computer readable storage medium

    CN111563025A

  • Indicator light control method and apparatus

    WO2016082334A1