Parameter setting device and parameter setting method

The parameter setting device and method automatically adjust characteristic parameters to ensure microcontrollers connect correctly to external devices by matching temporary settings with external device specifications, addressing connectivity issues due to varying parameters.

JP2025119984APending Publication Date: 2025-08-15ROHM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024015158
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-02
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

Microcontrollers face challenges in properly connecting to external devices due to varying characteristic parameters such as enable signal assertion period, clock output frequency, data output setup time, and data input capture timing, which depend on external device specifications, mounting board characteristics, and environmental conditions.

Method used

A parameter setting device and method that includes a setting unit to set temporary characteristic parameters, connect to the external device, write and read data, and match the data to set the temporary parameters as suitable for the external device.

Benefits of technology

Ensures proper connection to external devices by automatically adjusting characteristic parameters, even if initial settings are not suitable, by resetting to parameters that match the external device's requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025119984000001_ABST
    Figure 2025119984000001_ABST
Patent Text Reader

Abstract

To provide a parameter setting device and a parameter setting method capable of setting a control signal to a characteristic parameter suitable for an external device.SOLUTION: The parameter setting device is provided with a setting unit for setting a characteristic parameter of a control signal for connecting to an external device. The setting unit sets a temporary characteristic parameter, connects to the external device, writes data to the external device, reads the data written to the external device from the external device, and sets the temporary characteristic parameter as a characteristic parameter to be used when connecting to the external device in the case where the data written to the external device coincides with the data read from the external device.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a parameter setting device and a parameter setting method. [Background technology]

[0002] Patent Document 1 describes a parameter setting device that sets characteristic parameters of a control signal for connecting to an external device. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2011-130231 Summary of the Invention [Problem to be solved by the invention]

[0004] Generally, a device using a microcomputer connects the microcomputer to an external device using control signals, which have various characteristic parameters such as an enable signal assertion period, a clock output frequency, a data output setup time, a data output hold time, and a data input capture timing.

[0005] The characteristic parameters suitable for an external device vary depending on the specifications of the external device, the characteristics of the board on which the microcontroller and external device are mounted, and the surrounding environment such as the operating temperature.

[0006] When connecting to an external device, the microcontroller must set the control signal to characteristic parameters suitable for the external device, and there was a problem in that if the characteristic parameters suitable for the external device were not set, the microcontroller would not be able to connect to the external device properly.

[0007] An object of the present invention is to provide a parameter setting device and a parameter setting method that can set characteristic parameters suitable for an external device for a control signal. [Means for solving the problem]

[0008] The parameter setting device of the present invention includes a setting unit that sets characteristic parameters of a control signal for connecting to an external device, and the setting unit sets temporary characteristic parameters and connects to the external device, writes data to the external device, reads the data written to the external device from the external device, and if the data written to the external device and the data read from the external device match, sets the temporary characteristic parameters as characteristic parameters to be used when connecting to the external device.

[0009] The parameter setting method of the present invention is a parameter setting method for setting characteristic parameters of a control signal for connection to an external device, and includes the steps of setting temporary characteristic parameters and connecting to the external device, writing data to the external device, reading the data written to the external device from the external device, and, if the data written to the external device and the data read from the external device match, setting the temporary characteristic parameters as characteristic parameters to be used when connecting to the external device. [Brief explanation of the drawings]

[0010] [Figure 1] FIG. 2 is a diagram illustrating an example of a connection between a microcomputer and an external device. [Figure 2] FIG. 10 is a diagram illustrating an example of characteristic parameters of a control signal. [Figure 3] FIG. 1 is a schematic configuration diagram of a microcomputer of a comparative example. [Figure 4] FIG. 1 is a schematic configuration diagram of a microcomputer according to a first embodiment. [Figure 5] 5 is a flowchart showing the flow of a characteristic parameter setting process in the microcomputer of the first embodiment. [Figure 6] 5 is a flowchart showing the flow of a characteristic parameter setting process in the microcomputer of the first embodiment. [Figure 7] FIG. 10 is a schematic configuration diagram of a microcomputer according to a second embodiment. [Figure 8] 10 is a flowchart showing the flow of a characteristic parameter setting process in a microcomputer according to a second embodiment. [Figure 9] 10 is a flowchart showing the flow of a characteristic parameter setting process in a microcomputer according to a second embodiment. [Figure 10] 10 is a flowchart showing the flow of a characteristic parameter setting process in a microcomputer according to a second embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0011] [First embodiment] Next, a first embodiment of the present invention will be described in detail with reference to the drawings. Fig. 1 is a diagram showing an example of a connection between a microcomputer and an external device. Fig. 2 is a diagram showing an example of characteristic parameters of a control signal.

[0012] 1, a device using a microcomputer 10 generally connects the microcomputer 10 to an external device 20 using a control signal. The microcomputer 10 is an example of a parameter setting device in the technology of the present invention.

[0013] As shown in FIG. 2, the control signal for connecting to the external device 20 has various characteristic parameters, such as an enable signal assertion period, a clock output frequency, a data output setup time, a data output hold time, and a data input capture timing.

[0014] The characteristic parameters suitable for the external device 20 vary depending on the specifications of the external device 20. In addition, the characteristic parameters suitable for the external device 20 also vary depending on the characteristics of the board on which the microcomputer 10 and the external device 20 are mounted, or the surrounding environment such as the operating temperature.

[0015] When connecting to the external device 20, the microcomputer 10 needs to set characteristic parameters suitable for the external device 20 for the control signal.

[0016] Before describing the microcomputer 10 of this embodiment, a comparative example will be described, which is a general microcomputer 100. Fig. 3 is a schematic diagram of the microcomputer 100 of the comparative example.

[0017] As shown in FIG. 3, the microcomputer 100 of the comparative example includes a CPU (Central Processing Unit) 111, a memory 112, an internal clock generating unit 113, an external device control circuit 114, and an external device connection terminal 115.

[0018] The CPU 111 is a central processing unit that controls the entire microcomputer 100. It reads characteristic parameter setting values from the memory 112 and writes them to the characteristic parameter setting register 114b. The CPU 111 issues control commands (e.g., data write or data read) for the external device 20 to the external device control circuit 114 according to the program in the memory 112.

[0019] The memory 112 stores a program for operating the CPU 111, characteristic parameter setting values to be set in the characteristic parameter setting register 114b, and the like.

[0020] The internal clock generating unit 113 generates an internal clock used inside the microcomputer 100. The internal clock serves as a reference clock for the characteristic parameter adjusting circuit 114a.

[0021] The external device control circuit 114 includes a characteristic parameter adjusting circuit 114a and a characteristic parameter setting register 114b. The external device control circuit 114 controls the external device 20 connected to the external device connection terminal 115 in accordance with a control command issued by the CPU 111. The characteristic parameter adjusting circuit 114a generates a control signal for the external device 20 based on the internal clock, based on the setting value of the characteristic parameter setting register 114b.

[0022] The external device connection terminal 115 is connected to the external device 20. A signal generated by the external device control circuit 114 is used as a control signal for the external device 20.

[0023] The microcomputer 100 controls the external device 20 in the following procedure. First, the microcomputer 100 is started. Next, the CPU 111 reads the setting values of the characteristic parameters from the memory 112. Next, the CPU 111 writes the setting values of the characteristic parameters read from the memory 112 to the characteristic parameter setting register 114b. Next, the CPU 111 issues a control command to the external device 20.

[0024] The characteristic parameters suitable for the external device 20 vary depending on the specifications of the external device 20. Furthermore, the characteristic parameters suitable for the external device 20 also vary depending on the characteristics of the board on which the microcomputer 100 and the external device 20 are mounted, or the surrounding environment such as the operating temperature.

[0025] When connecting to an external device, the microcontroller 100 needs to set characteristic parameters for the control signal that are suitable for the external device 20, and there was a problem that if characteristic parameters that are suitable for the external device 20 are not set, the microcontroller 100 cannot connect to the external device 20 normally.

[0026] In order to solve this problem, the microcomputer 10 of this embodiment is configured so that the control signal can be set to a characteristic parameter suitable for the external device 20. Fig. 4 is a schematic diagram of the microcomputer 10 of this embodiment.

[0027] The microcontroller 10 of this embodiment has a setting unit that sets characteristic parameters of a control signal for connecting to the external device 20, and the setting unit sets temporary characteristic parameters, connects to the external device 20, writes data to the external device 20, reads the data written to the external device 20 from the external device 20, and if the data written to the external device 20 and the data read from the external device match, sets the temporary characteristic parameters as characteristic parameters to be used when connecting to the external device 20.

[0028] 4, the microcomputer 10 of this embodiment includes a CPU 11, a memory 12, an internal clock generating unit 13, an external device control circuit 14, an external device connecting terminal 15, an automatic setting circuit 16, a selector 17, and a selection terminal 18. The CPU 11 and the automatic setting circuit 16 constitute a setting unit in the technology of the present invention.

[0029] The memory 12 stores a program for operating the CPU 11, characteristic parameter setting values to be set in the characteristic parameter setting register 14b, a control program for the external device control circuit 14, a control program for the external device 20, and the like.

[0030] The internal clock generating unit 13 generates an internal clock used inside the microcomputer 10. The internal clock serves as a reference clock for the characteristic parameter adjusting circuit 14a.

[0031] The external device control circuit 14 includes a characteristic parameter adjusting circuit 14a and a characteristic parameter setting register 14b.

[0032] The external device connection terminal 15 is connected to an external device 20. A signal generated by an external device control circuit 14 is used as a control signal for the external device 20.

[0033] The selection terminal 18 is connected to a switch 30. The switch 30 is a switch for switching whether or not to perform automatic adjustment of the characteristic parameters, and outputs 0 when the user selects not to perform automatic adjustment of the characteristic parameters, and outputs 1 when the user selects to perform automatic adjustment of the characteristic parameters.

[0034] The selection terminal 18 outputs a signal to select either the CPU 11 or the automatic setting circuit 16 as the circuit to be connected to the external device control circuit 14 based on the input from the switch 30. When the input from the switch 30 is 0, the CPU 11 is connected to the external device control circuit 14, and when the input from the switch 30 is 1, the automatic setting circuit 16 is connected to the external device control circuit 14.

[0035] The CPU 11 is a central processing unit that controls the entire microcomputer 10. It reads characteristic parameter setting values from the memory 12 and writes them to the characteristic parameter setting register 14b. The CPU 11 issues control commands (e.g., data write or data read) for the external device 20 to the external device control circuit 14 according to the program in the memory 12.

[0036] When 0 is input from the selection terminal 18, the CPU 11 performs the following operations according to the program in the memory 12: Reads the characteristic parameter setting values from the memory 12. Also, writes the characteristic parameter setting values read from the memory 12 to the characteristic parameter setting register 14b of the external device control circuit 14. Also, issues a control command for the external device 20 to the external device control circuit 14.

[0037] Furthermore, when 1 is input from the selection terminal 18, the CPU 11 performs the following operations according to the program in the memory 12: it issues a control command for the external device 20 to the external device control circuit 14, and it receives an operation status signal of the automatic setting circuit 16 and an operation result signal of the automatic setting circuit 16 from the automatic setting circuit 16.

[0038] The automatic setting circuit 16 is an example of a setting unit in the technology of the present invention. The automatic setting circuit 16 is configured by an IC (Integrated Circuit) different from the CPU 11. This reduces the processing load on the CPU 11 when automatically setting the characteristic parameter setting values.

[0039] The automatic setting circuit 16 has an internal storage unit 16a that stores characteristic parameter setting values. A plurality of characteristic parameter setting values are stored in the storage unit 16a. Priorities are assigned to the plurality of characteristic parameter setting values stored in the storage unit 16a in order of communication speed, with the characteristic parameter setting value that allows connection to the external device 20 at the fastest communication speed being given first in the priority order.

[0040] Furthermore, the automatic setting circuit 16 outputs to the CPU 11 an operation status signal which is a signal notifying the CPU 11 of the operation status of the automatic setting circuit 16, and an operation result signal which is a signal notifying the CPU 11 of the operation result of the automatic setting circuit 16. The automatic setting circuit 16 outputs to the selector 17 a selector control signal which is a signal for controlling the selector 17.

[0041] When 0 is input from the selection terminal 18, the automatic setting circuit 16 outputs 0 to the selector 17 as a selector control signal.

[0042] When 1 is input from the selection terminal 18, the automatic setting circuit 16 performs the following operations: It writes the characteristic parameter setting value held within the automatic setting circuit 16 to the characteristic parameter setting register 14b. It also issues a data write command for the external device 20 to the external device control circuit 14, and writes the data to the external device. It also issues a data read command for the external device 20 to the external device control circuit 14, and reads the data from the external device 20. It also sets the data written to the external device as an expected value, and determines whether the expected value matches the data read from the external device.

[0043] Furthermore, when the automatic setting circuit 16 starts operating, it outputs 1 as a selector control signal to the selector 17. When the automatic setting circuit 16 completes its operation, it outputs 0 as a selector control signal to the selector 17.

[0044] Furthermore, when the automatic setting circuit 16 starts operation, it outputs 1 as an operation status signal to the CPU 11. When the automatic setting circuit 16 completes operation, it outputs 0 as an operation status signal to the CPU 11.

[0045] Furthermore, if the result of the automatic setting circuit 16 upon completion of its operation is normal, it outputs 0 as an operation result signal to the CPU 11. If the result of the automatic setting circuit 16 upon completion of its operation is abnormal, it outputs 1 as an operation result signal to the CPU 11.

[0046] The selector 17 switches the connection destination of the external device control circuit 14 between the CPU 11 and the automatic setting circuit 16. When the selector control signal input from the automatic setting circuit 16 is 0, the selector 17 connects the CPU 11 to the external device control circuit 14. When the selector control signal input from the automatic setting circuit 16 is 1, the selector 17 connects the automatic setting circuit 16 to the external device control circuit 14.

[0047] The external device control circuit 14 controls the external device 20 connected to the external device connection terminal 15 in response to a control command issued from the CPU 11 or the automatic setting circuit 16. The characteristic parameter adjustment circuit 14a generates a control signal for the external device 20 based on the internal clock, based on the setting value of the characteristic parameter setting register 14b.

[0048] Next, the flow of the characteristic parameter setting process in the microcomputer 10 of this embodiment will be described with reference to the flowcharts shown in FIGS.

[0049] 5, first, in step S01, the user starts up the microcomputer 10. At this time, the user selects via the switch 30 whether or not to automatically adjust the characteristic parameters.

[0050] Next, in step S02, if 0 is input from the switch 30 to the selection terminal 18, that is, if it is selected not to automatically adjust the characteristic parameters, in step S03, the automatic setting circuit 16 outputs 0 to the selector 17 as a selector control signal.

[0051] Next, in step S04, the CPU 11 reads out the characteristic parameter setting values from the memory 12.

[0052] Next, in step S05, the CPU 11 writes the characteristic parameter setting value read from the memory 12 into the characteristic parameter setting register 14b.

[0053] Next, in step S06, the CPU 11 issues a data write command to the external device 20 and writes the data to the external device 20.

[0054] Next, in step S07, the CPU 11 issues a data read command to the external device 20 and reads the data from the external device 20.

[0055] Next, in step S08, the CPU 11 sets the data written to the external device 20 in step S06 as an expected value.

[0056] Next, in step S09, the CPU 11 compares the data read from the external device 20 in step S07 with the expected value set in step S08.

[0057] If the comparison result in step S09 is a match, the CPU 11 determines in step S10 that it can control the external device 20, and starts using the external device 20 in step S11, and ends the process.

[0058] If the comparison result in step S09 is not a match, the CPU 11 determines in step S12 that it cannot control the external device 20, and ends the process in step S13 without starting to use the external device 20.

[0059] In step S02, if 1 is input from the switch 30 to the selection terminal 18, that is, if automatic adjustment of the characteristic parameters is selected, then in step S14, the automatic setting circuit 16 outputs 1 to the selector 17 as a selector control signal, as shown in FIG. 6.

[0060] Next, in step S15, the automatic setting circuit 16 outputs 1 to the CPU 11 as an operation status signal.

[0061] Next, in step S16, the automatic setting circuit 16 writes the characteristic parameter setting value with the highest priority among the multiple characteristic parameter setting values stored in the memory unit 16a into the characteristic parameter setting register 14b as a temporary characteristic parameter setting value.

[0062] Next, in step S17, the automatic setting circuit 16 issues a data write command to the external device 20 and writes the data to the external device 20.

[0063] Next, in step S18, the automatic setting circuit 16 issues a data read command to the external device 20 and reads the data from the external device 20.

[0064] Next, in step S19, the automatic setting circuit 16 sets the data written to the external device 20 in step S17 as an expected value.

[0065] Next, in step S20, the automatic setting circuit 16 compares the data read from the external device 20 in step S18 with the expected value set in step S19.

[0066] If the comparison result in step S20 indicates a match, the automatic setting circuit 16 outputs 0 to the selector 17 as a selector control signal in step S21.

[0067] Next, in step S22, the automatic setting circuit 16 outputs 0 to the CPU 11 as the operation state signal.

[0068] Next, in step S23, the automatic setting circuit 16 outputs 0 to the CPU 11 as an operation result signal.

[0069] Next, in step S24, the CPU 11 determines that it can control the external device 20, sets the current characteristic parameter setting values as the characteristic parameter setting values to be used when connecting to the external device 20, and in step S25, starts using the external device 20 and ends the processing.

[0070] If the comparison result in step S20 indicates a mismatch, the automatic setting circuit 16 determines in step S26 whether the current characteristic parameter setting value set in the characteristic parameter setting register 14b has the lowest priority.

[0071] If the result of determination in step S26 is that the current characteristic parameter setting value has the lowest priority, the automatic setting circuit 16 outputs 0 to the selector 17 as a selector control signal in step S27.

[0072] Next, in step S28, the automatic setting circuit 16 outputs 0 to the CPU 11 as the operation state signal.

[0073] Next, in step S29, the automatic setting circuit 16 outputs 1 to the CPU 11 as an operation result signal.

[0074] Next, in step S30, the CPU 11 determines that it cannot control the external device 20, and in step S31 ends the process without starting to use the external device 20.

[0075] If the result of the determination in step S26 is that the priority of the current characteristic parameter setting value is not the last, in step S32, the automatic setting circuit 16 writes the characteristic parameter setting value of the next priority after the current characteristic parameter setting value set in the characteristic parameter setting register 14b into the characteristic parameter setting register 14b as a temporary characteristic parameter setting value, and proceeds to step S17.

[0076] As described above, according to the microcontroller 10 of this embodiment, when the user selects automatic adjustment of the characteristic parameters via the switch 30, by automatically adjusting the characteristic parameters, even if characteristic parameters suitable for the external device 20 are not set for the control signal, another characteristic parameter suitable for the external device 20 is reset, making it possible to set the characteristic parameters suitable for the external device 20 for the control signal.

[0077] [Second embodiment] Next, a second embodiment of the present invention will be described in detail with reference to the drawings. Figure 7 is a schematic diagram of a microcomputer 10 of this embodiment.

[0078] In the microcomputer 10 of the first embodiment, the user selects whether or not to automatically adjust the characteristic parameters via the switch 30, but in the microcomputer 10 of the present embodiment, the CPU 11 controls whether or not to automatically adjust the characteristic parameters.

[0079] In the microcomputer 10 of this embodiment, the same components as those in the microcomputer 10 of the first embodiment are denoted by the same reference numerals, and descriptions thereof will be omitted unless otherwise necessary.

[0080] As shown in FIG. 7, the microcomputer 10 of this embodiment includes a CPU 11, a memory 12, an internal clock generating unit 13, an external device control circuit 14, an external device connection terminal 15, an automatic setting circuit 16, and a selector 17.

[0081] The CPU 11 performs the following operations according to the program stored in the memory 12: Reads characteristic parameter setting values from the memory 12. Also, writes the characteristic parameter setting values read from the memory 12 to the characteristic parameter setting register 14b of the external device control circuit 14. Also, issues a control command (e.g., data write or data read) for the external device 20 to the external device control circuit 14.

[0082] In addition, an operation state control signal, which is a signal for controlling the operation state of the automatic setting circuit 16, is output to the automatic setting circuit 16. When the automatic setting circuit 16 is to be operated, 1 is output as the operation state control signal. When the automatic setting circuit 16 is to be stopped, 0 is output as the operation state control signal.

[0083] The control circuit 14 also receives an operation status signal of the automatic setting circuit 16 and an operation result signal of the automatic setting circuit 16 from the automatic setting circuit 16 .

[0084] It also outputs a selector control signal that controls the selector. When connecting the CPU 11 and the external device control circuit 14, it outputs a selector control signal of 0. When connecting the automatic setting circuit 16 and the external device control circuit 14, it outputs a selector control signal of 1.

[0085] Next, the flow of the characteristic parameter setting process in the microcomputer 10 of this embodiment will be described with reference to the flowcharts shown in FIGS.

[0086] First, a case where the characteristic parameters are not automatically adjusted will be described. As shown in Fig. 8, first, in step S41, the user starts up the microcomputer 10.

[0087] Next, in step S42, the CPU 11 outputs 0 to the selector 17 as a selector control signal if automatic adjustment of the characteristic parameters is not to be performed.

[0088] Next, in step S43, the CPU 11 reads out the characteristic parameter setting values from the memory 12.

[0089] Next, in step S44, the CPU 11 writes the characteristic parameter setting value read from the memory 12 into the characteristic parameter setting register 14b.

[0090] Next, in step S45, the CPU 11 issues a data write command to the external device 20 and writes the data to the external device 20.

[0091] Next, in step S46, the CPU 11 issues a data read command to the external device 20 and reads the data from the external device 20.

[0092] Next, in step S47, the CPU 11 sets the data written to the external device 20 in step S45 as an expected value.

[0093] Next, in step S48, the CPU 11 compares the data read from the external device 20 in step S46 with the expected value set in step S47.

[0094] If the comparison result in step S48 is a match, the CPU 11 determines in step S49 that it can control the external device 20, and starts using the external device 20 in step S50, and ends the process.

[0095] If the comparison result in step S48 is not a match, the CPU 11 determines in step S51 that it cannot control the external device 20, and ends the process in step S52 without starting to use the external device 20.

[0096] First, the case where the characteristic parameters are automatically adjusted will be described. As shown in Figures 9 and 10, first, in step S61, the microcomputer 10 is started up by the user.

[0097] Next, in step S62, the CPU 11 outputs 1 to the selector 17 as a selector control signal when automatic adjustment of the characteristic parameters is to be performed.

[0098] Next, in step S63, the CPU 11 outputs 1 to the automatic setting circuit 16 as an operation state control signal.

[0099] Next, in step S64, the automatic setting circuit 16 outputs 1 to the CPU 11 as an operation status signal.

[0100] Next, in step S65, the automatic setting circuit 16 writes the characteristic parameter setting value with the highest priority among the plurality of characteristic parameter setting values stored in the storage unit 16a into the characteristic parameter setting register 14b as a temporary characteristic parameter.

[0101] Next, in step S66, the automatic setting circuit 16 issues a data write command to the external device 20 and writes the data to the external device 20.

[0102] Next, in step S67, the automatic setting circuit 16 issues a data read command to the external device 20 and reads the data from the external device 20.

[0103] Next, in step S68, the automatic setting circuit 16 sets the data written to the external device 20 in step S66 as an expected value.

[0104] Next, in step S69, the automatic setting circuit 16 compares the data read from the external device 20 in step S67 with the expected value set in step S68.

[0105] If the comparison result in step S69 indicates a match, the automatic setting circuit 16 outputs 0 to the CPU 11 as an operation status signal in step S70.

[0106] Next, in step S71, the automatic setting circuit 16 outputs 0 to the CPU 11 as an operation result signal.

[0107] Next, in step S72, the CPU 11 outputs 0 to the selector 17 as a selector control signal.

[0108] Next, in step S73, the CPU 11 determines that it can control the external device 20, sets the current characteristic parameter setting values as the characteristic parameter setting values to be used when connecting to the external device 20, and in step S75, starts using the external device 20 and ends the processing.

[0109] If the comparison result in step S69 indicates a mismatch, the automatic setting circuit 16 determines in step S75 whether the current characteristic parameter setting value set in the characteristic parameter setting register 14b has the lowest priority.

[0110] If the result of determination in step S75 is that the current characteristic parameter setting value has the lowest priority, the automatic setting circuit 16 outputs 0 to the CPU 11 as the operation status signal in step S76.

[0111] Next, in step S77, the automatic setting circuit 16 outputs 1 to the CPU 11 as an operation result signal.

[0112] Next, in step S78, the CPU 11 outputs 0 to the selector 17 as a selector control signal.

[0113] Next, in step S79, the CPU 11 outputs 0 to the automatic setting circuit 16 as an operation state control signal.

[0114] Next, in step S80, the CPU 11 determines that it cannot control the external device, and in step S81 ends the process without starting to use the external device 20.

[0115] If the result of the determination in step S75 is that the priority of the current characteristic parameter setting value is not the last, in step S82, the automatic setting circuit 16 writes the characteristic parameter setting value of the next priority after the current characteristic parameter setting value set in the characteristic parameter setting register 14b into the characteristic parameter setting register 14b as a temporary characteristic parameter setting value, and proceeds to step S66.

[0116] As described above, according to the microcontroller 10 of this embodiment, when the CPU 11 is controlled to automatically adjust the characteristic parameters, even if a characteristic parameter suitable for the external device 20 is not set for the control signal, another characteristic parameter suitable for the external device 20 is reset by automatically adjusting the characteristic parameters, so that it is possible to set the control signal to a characteristic parameter suitable for the external device 20.

[0117] The above describes the microcontroller 10 according to an embodiment of the present invention, but the present invention is not limited to the above embodiment. In addition to the above, appropriate changes may be made to the above-described and illustrated contents, such as deleting unnecessary parts, adding new elements, or substituting other elements, within the scope of the gist of the technology of the present invention. [Explanation of symbols]

[0118] 10 Microcomputer 11 CPU 12 Memory 13 Internal clock generator 14 External device control circuit 14a Characteristic parameter adjustment circuit 14b Characteristics parameter setting register 15 External device connection terminal 16 Automatic setting circuit 16a Storage section 17 Selectors 18 Selection terminal 20 External Devices 30 Switch

Claims

1. a setting unit for setting characteristic parameters of a control signal for connecting to an external device; The setting unit setting temporary characteristic parameters and connecting to the external device; writing data to the external device; reading the data written to the external device from the external device; If the data written to the external device and the data read from the external device match, the temporary characteristic parameters are set as characteristic parameters to be used when connecting to the external device. Parameter setting device.

2. a storage unit that stores a plurality of candidates for the characteristic parameter of the control signal; The setting unit Among the plurality of candidate characteristic parameters, a characteristic parameter that allows connection with the external device at the fastest communication speed is set as a tentative characteristic parameter; If the data written to the external device and the data read from the external device do not match, the characteristic parameters that can control the external device next fastest are set as temporary characteristic parameters.

2. The parameter setting device according to claim 1.

3. The setting unit is configured by an integrated circuit different from the central processing unit of the device itself.

3. The parameter setting device according to claim 1 or 2.

4. A parameter setting method for setting characteristic parameters of a control signal for connecting to an external device, comprising: setting temporary characteristic parameters and connecting to the external device; writing data to the external device; reading the data written to the external device from the external device; a step of setting a temporary characteristic parameter as a characteristic parameter to be used when connecting to the external device when the data written to the external device and the data read from the external device match; A parameter setting method comprising:

Citation Information

Patent Citations

  • Device and method for setting parameter

    JP2011130231A