This application claims priority of Taiwan Patent Application No. 111149146, filed on Dec. 21, 2022, the entirety of which is incorporated by reference herein.
The present invention relates to a control device, and in particular it relates to a control device and an operation method thereof and an electronic device.
In general, control devices (such as micro controllers) are provided with registers, so that the data required by the display device may be temporarily stored and output through the registers. However, since the number of registers and the buffer width of the register are fixed, when the horizontal resolution of the display device is greater than the maximum buffer width of the register, a situation that the control device may not support the display device is occurred, or the bandwidth of the system bus is limited, a situation that the data may not transmitted in a timely manner to occur the error of the image display is occurred. Accordingly, the convenience of use is decreased.
Therefore, how to effectively design a control device has become a focus of technical improvements.
An embodiment of the present invention provides a control device and an operation method thereof, and an electronic device, so that the control device and the electronic device may have a structure in which the number of registers may vary, so as to avoid the situation in which the control device may not support the display device when the horizontal resolution of the display device is greater than the maximum bandwidth of the register, or the situation in which the data may not be transmitted in a timely manner leading to causing errors in the image display when the bandwidth of the system bus is limited, and increase the convenience of use.
An embodiment of the present invention provides a control device, which includes a storage module and a control module. The storage module includes a plurality of registers. The control module is configured to set the buffer width of the registers, the used number of the registers and the occupied number that a horizontal line signal occupies the registers according to the horizontal resolution. The control module receives the horizontal line signal. The control module assigns a plurality of pixels of the horizontal line signal to the registers, and sequentially outputs pixels of the horizontal line signal from the registers.
An embodiment of the present invention provides an operation method of a control device, which includes the following steps. A storage module including a plurality of registers is provided. A control module is used to set the buffer width of the registers, the used number of the registers and the occupied number that a horizontal line signal occupies the registers according to a horizontal resolution, receive the horizontal line signal, assign a plurality of pixels of the horizontal line signal to the registers, and sequentially output pixels of the horizontal line signal from the registers.
An embodiment of the present invention provides an electronic device, which includes a display device and a control device. The control device is coupled to the display device. The control device includes a storage module and a control module. The storage module includes a plurality of registers. The control module is configured to set the buffer width of the registers, the used number of the registers and the occupied number that a horizontal line signal occupies the registers according to the horizontal resolution, receive the horizontal line signal, assign a plurality of pixels of the horizontal line signal to the registers, and sequentially output pixels of the horizontal line signal from the registers.
According to the control device and the operation method thereof, as well as the electronic device disclosed by the present invention, the control module sets the buffer width of the registers of the storage module, the used number of the registers and the occupied number that the horizontal line signal occupies the registers according to the horizontal resolution. The control module receives the horizontal line signal, and assigns the pixels of the horizontal line signal to the registers. Therefore, the control device and the electronic device may have a structure in which the number of registers may vary, so as to avoid the situation in which the control device may not support the display device when the horizontal resolution of the display device is greater than the maximum bandwidth of the register, or the situation in which the data may not be transmitted in a timely manner leading to causing errors in the image display when the bandwidth of the system bus is limited, and increase the convenience of use.
The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
The following embodiments of the present invention are herein described in detail with reference to the accompanying drawings. These drawings show specific examples of the embodiments of the present invention. These embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. It should be acknowledged that these embodiments are exemplary implementations and are not to be construed as limiting the scope of the present invention in any way. Further modifications to the disclosed embodiments, as well as other embodiments, are also included within the scope of the appended claims. These embodiments are provided so that this disclosure is thorough and complete, and fully conveys the inventive concept to those skilled in the art. Regarding the drawings, the relative proportions and ratios of elements in the drawings may be exaggerated or diminished in size for the sake of clarity and convenience. Such arbitrary proportions are only illustrative and not limiting in any way. The same reference numbers are used in the drawings and description to refer to the same or like parts.
It should be acknowledged that although the terms “first”, “second”, “third”, and so on, may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used only for the purpose of distinguishing one component from another component. Thus, a first element discussed herein could be termed a second element without altering the description of the present disclosure. As used herein, the term “or” includes any and all combinations of one or more of the associated listed items.
It will be acknowledged that when an element or layer is referred to as being “on, ” “connected to” or “coupled to” another element or layer, it can be directly on, connected or coupled to the other element or layer, or intervening elements or layers may be present. In contrast, when an element is referred to as being “directly on, ” “directly connected to” or “directly coupled to” another element or layer, there are no intervening elements or layers present.
In addition, unless explicitly described to the contrary, the word “comprise” and variations such as “comprises” or “comprising”, will be acknowledged to imply the inclusion of stated elements but not the exclusion of any other elements.
In each of the following embodiments, the same reference number represents an element or component that is the same or similar.
The control device 130 may be coupled to the display device 110. The control device 130 may include a storage module 140 and a control module 150. The storage module 140 may include a plurality of registers 141_1˜141_N, wherein N is a positive integer greater than 1. In the embodiment, the storage module 140 is, for example, a static random access memory (SRAM), but the embodiment of the present invention is not limited thereto.
The control module 150 may be coupled to the storage module 140. The control module 150 may set the buffer width of the registers 141_1˜141_N, the used number of registers 141_1˜141_N and the occupied number that a horizontal line signal occupies the registers 141_1˜141_N according to a horizontal resolution of the display device 110. In the embodiment, the above occupied number and the above used number may be the same or different. In addition, the above occupied number may change according to changes in the horizontal resolution. Furthermore, the buffer width of the registers is the same. Moreover, the control module 150 may further averagely assign the pixels of the horizontal line signal to the registers 141_1˜141_N.
For example, in some embodiments, it is assumed that the resolution of the display device 110 is 800*480, wherein the horizontal resolution is 800, and the number of horizontal lines is 480. The control module 150 may set the buffer width of the registers 141_1˜141_N to 400, the used number of the registers 141_1˜141_N to 2 (such as the register 141_1 and the register 141_2) and the occupied number that the horizontal line signal occupies the registers 141_1˜141_N to 2 (i.e., 400*2=800) according to a horizontal resolution of 800, as shown in
In some embodiments, it is assumed that the resolution of the display device 110 is 900*600, wherein the horizontal resolution is 900, and the number of horizontal lines is 600. The control module 150 may set the buffer width of the registers 141_1˜141_N to 300, the used number of the registers 141_1˜141_N to 3 (such as the register 141_1, the register 141_2 and the register 141_3) and the occupied number that the horizontal line signal occupies the registers 141_1˜141_N to 3 (i.e., 300*3=900) according to a horizontal resolution of 900, as shown in
In some embodiments, it is assumed that the resolution of the display device 110 is 2048*1024, wherein the horizontal resolution is 2048, and the number of horizontal lines is 1024. The control module 150 may set the buffer width of the registers 141_1˜141_N to 512, the used number of the registers 141_1˜141_N to 4 (such as the register 141_1, the register 141_2, the register 141_3 and the register 141_4) and the occupied number that the horizontal line signal occupies the registers 141_1˜141_N to 4 (i.e., 512*4=2048) according to a horizontal resolution of 2048, as shown in
Then, the control module 150 may receive the horizontal line signal, and assign a plurality of pixels of the horizontal line signal to the registers 141_1˜141_N. For example, in some embodiments, it is assumed that the resolution of the display device 110 is 800*480, wherein each of the horizontal line signals may include 800 pixels, the control module 150 may averagely assign 800 pixels to the register 141_1 and the register 141_2, i.e., each of the register 141_1 and the register 141_2 includes 400 pixels, as shown in
In
In some embodiments, it is assumed that the resolution of the display device 110 is 900*600, wherein each of the horizontal line signals may include 900 pixels, the control module 150 may averagely assign 900 pixels to the register 141_1, the register 141_2 and the register 141_3, i.e., each of the register 141_1, the register 141_2 and the register 141_3 includes 300 pixels, as shown in
In some embodiments, it is assumed that the resolution of the display device 110 is 2048*1024, wherein each of the horizontal line signals may include 2048 pixels, the control module 150 may averagely assign 2048 pixels to the register 141_1, the register 141_2, the register 141_3 and the register 141_4, i.e., each of the register 141_1, the register 141_2, the register 141_3 and the register 141_4 includes 512 pixels, as shown in 4. In addition, the 2048 pixels included in the register 141_1, the register 141_2, the register 141_3 and the register 141_4 correspond to, for example, the horizontal display period THDP of the horizontal synchronization signal HSYNC shown in
Afterward, the control module 150 may sequentially output pixels of the horizontal line signal from the registers 141_1˜141_N to the display device 110, so that the display device 110 correspondingly displays the pixels of the horizontal line signal.
Therefore, the control device 130 and the electronic device 100 may have a structure with a variable number of registers, so as to avoid situations where the control device 130 may not support the display device 110 when the horizontal resolution of the display device 110 is greater than the maximum bandwidth of the register, and increase the convenience of use.
Furthermore, it is assumed that
Afterward, when determining that the one of the registers 141_1˜141_2 (i.e., the register 141_1) has completed the data output, the control module 150 accumulates the output number of the register, for example, adding “1” to the output number, i.e., “0+1=1”. Then, the control module 150 may determine whether the output number matches the occupied number. That is, the control module 150 may determine whether the output number of “1” matches the occupied number of “2”.
When determining that the output number of “1” does not match the occupied number of “2”, the control module 150 may determine whether the output number matches the used number. That is, the control module 150 may determine whether the output number of “1” matches the used number of “2”. When the control module 150 determines that the output number of “1” does not match a used number of “2”, the control module 150 may select another one of the registers 141_1˜141_N to serve as the one of the registers 141_1˜141_N, and output the pixels of the horizontal line signal again. That is, the control module 150 may select the register 141_2, and output 400 of the register 141_2 from the register 141_2.
Then, the control module 150 may determine whether the one of the registers 141_1˜141_2 (i.e., the register 141_2) has completed the data output. That is, the control module 150 may determine whether the 400 pixels of the register 141_2 has completed output.
Afterward, when determining that the one of the registers 141_1˜141_2 (i.e., the register 141_2) has completed the data output, the control module 150 accumulates the output number of the register, for example, adding “1” to the output number, i.e., “1+1=2”. Then, the control module 150 may determine whether the output number matches the occupied number. That is, the control module 150 may determine whether the output number of “2” matches the occupied number of “2”.
When determining that the output number of “2” matches the occupied number of “2”, it indicates that the control module 150 has output the last pixel of the horizontal line signal, the control module 150 may output an end pixel clock and a beginning pixel clock corresponding to the horizontal line signal. In the embodiment, the end pixel clock corresponds to, for example, the horizontal front porch THFP of the horizontal synchronization signal HSYNC shown in
Afterward, the control module 150 may determine whether output number matches the used number. That is, the control module 150 may determine whether the output number of “2” matches a used number of “2”. When the control module 150 determines that the output number of “2” matches a used number of “2”, the control module 150 resets the output number, for example, clearing the output number to “0”.
In addition, following the above, when the control module 150 determines that the one of the registers 141_1˜141_2 (i.e., the register 141_1) has completed the data output, the control module 150 accumulates the output number of the register (i.e., “0+1=1”), and the control module 150 may further clear the one of the registers 141_1˜141_2 (i.e., the register 141_1), for example, clearing the 400 pixels of the horizontal line signal of the register 141_1.
Then, the control module 150 may receive the next horizontal line signal, and assign a part of a plurality of pixels of the next horizontal line signal to the one of the registers. That is, the control module 150 may assign the first 400 pixels of the next horizontal line signal to the register 141_1, so that the control module 150 may perform a subsequent output operation on the first 400 pixels of the next horizontal line signal.
Furthermore, following the above, when the control module 150 determines that the one of the registers 141_1˜141_2 (i.e., the register 141_2) has completed the data output, the control module 150 accumulates the output number of the register (i.e., “1+1=2”), and the control module 150 may further clear the one of the registers 141_1˜141_2 (i.e., the register 141_2), for example, clearing the 400 pixels of the horizontal line signal of the register 141_2.
Then, the control module 150 may receive the next horizontal line signal, and assign a part of a plurality of pixels of the next horizontal line signal to the one of the registers. That is, the control module 150 may assign the last 400 pixels of the next horizontal line signal to the register 141_2, so that the control module 150 may perform a subsequent output operation on the last 400 pixels of the next horizontal line signal.
In addition, the output operation of the pixels of the registers 141_1˜141_3 as shown in
In some embodiments, the occupied number and the used number may be the same or different. In some embodiments, the occupied number changes according to the change of the horizontal resolution. In some embodiments, the buffer width of the registers is the same. In some embodiments, the control module further averagely assigns the pixels of the horizontal line signal to the registers.
When determining that the one of the registers has completed the data output, the method enters the step S706. In step S706, the method involves the control module accumulating the output number of the register. In step S708, the method involves determining whether the output number matches the occupied number. When determining that the output number matches the occupied number, the method enters step S710. In step S710, the method involves the control module outputting a beginning pixel clock and an end pixel clock corresponding to the horizontal line signal.
When determining that the output number does not match the occupied number, the method enters step S712. In step S712, the method involves the control module determining whether the output number matches the used number. When the control module determines that the output number does not match the used number, the method enters step S714. In step S714, the method involves the control module selecting another one of the register to serve as the one of the registers and returns to step S702. The control module outputs the pixels of the horizontal line signal from the one of the registers again. Then, steps S704˜S714 may be performed until the control module determines that the output number matches the used number.
When the control module determines that the output number matches the used number, the method enters step S716. In step S716, the method involves the control module resetting the output number. Then, the operation method may return to step S606 in
After step S716 is performed, the operation method may return to step S702, to perform subsequent operations on the next horizontal line data. Therefore, the next horizontal signal data may be assigned to the corresponding register in advance, so as to avoid situations where the data may not transmitted in a timely manner to occur the error of the image display when the bandwidth of the system bus is limited, and increase the convenience of use.
In summary, according to the control device and the operation method thereof and the electronic device disclosed by the embodiment of the present invention, the control module sets the buffer width of the registers of the storage module, the used number of the registers and the occupied number that the horizontal line signal occupies the registers according to the horizontal resolution. The control module receives the horizontal line signal, and assigns the pixels of the horizontal line signal to the registers. In addition, when the control module determines that the current register has completed the data output, the control module clears the current register. The control module then receives the next horizontal line signal and assigns a part of the pixels of the next horizontal line signal to the current register. Therefore, the control device and the electronic device may have a structure in which the number of registers may vary, so as to avoid the situation in which the control device may not support the display device when the horizontal resolution of the display device is greater than the maximum bandwidth of the register, or the situation in which the data may not be transmitted in a timely manner leading to causing errors in the image display when the bandwidth of the system bus is limited, and increase the convenience of use.
While the invention has been described by way of example and in terms of the preferred embodiments, it should be understood that the invention is not limited to the disclosed embodiments. On the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
Number | Date | Country | Kind |
---|---|---|---|
111149146 | Dec 2022 | TW | national |