Modifying the interruption time becomes shorter, making the phenomenon less obvious.The main function of the lower computer is the generation and transmission of data.The upper computer mainly needs to store and process the transmitted data, which is divided into these two parts.
Say. Because these two AD acquisitions require different channels, different register values will be set to 1, for example, P13 and P1 are selected here. AD conversion channel. Here we use l and t to calculate the number of data collection and take the average value to reduce the fluctuation of data. Dynamic Web Twain Invalid Manual For SettingFinally, you can refer to the explanation of each value in the data manual for setting or clearing the register. It is enough to load these two data in here, so it is realized through a setdata function. The content displayed by the data tube is the data we collected. The eight-digit digital tube displays the light on the left and the temperature on the right. The problem is that I do not have enough understanding of the SBUF, TI, and RI registers. My previous idea was to use an array to save the data, each time TI is 1 All assign the values of the array to SBUF in turn, which is wrong, and it stops after sending the first value. If the sending is not finished, then modify the pointer to the next byte and assign it to SBUF. When the sending is completed, the current state will be changed to FREE, the specific implementation is as follows. Dynamic Web Twain Invalid Serial Port ThisHere we can understand it as providing a method for this component, such as open serial port This button goes to the slot, select the onclick method, that is, we call this method when we click the button. What does this method do First of all, I judged the text content of the button here. Dynamic Web Twain Invalid Series Of ParametersIf it is to open the serial port, set a series of parameters of the serial port as above, and then judge whether the open of QSerailPort returns true. If it is, it means that the serial port is successfully opened, otherwise it means that it is open. What is a sender You can see the serial port object corresponding to us, which is the source of the data. What method Corresponding to our code, we can see that it is a way to reflect the read and write status, and treat it as a signal, that is, if our read and write status is normal, the connect method can be executed normally. The following parameters include the receiver, which is the object corresponding to our host computer. You can fetch all the data through the readall method of the serial port object. In fact, I didnt think about why, but when I use QString storage Later, I found that the output was some garbled characters. I suddenly remembered that when we sent it to the lower computer, we filled and sent it in bytes.
0 Comments
Leave a Reply. |