Chapter 679: Digital-to-Analog Conversion
"Sister, come and take a look." Xiao Yuan shouted.
Tang Sa opened his eyes and saw that Xiao Yuan was staring at the polar coordinate system with green characters on a black background on the screen of the machine, so he stood up and walked over and asked, "What's the matter?" ”
"It's strange to see this source." Xiao Yuan pointed to a flickering green dot on the polar coordinate system and said.
"What's so strange?" Tang Sa asked, at this moment, in addition to this point of light, there were other points of light flickering on the screen, but Xiao Yuan only picked out that point of light and only gave it to her, which made her wonderful.
"According to the diagram on the manual, the flickering frequency of this light spot does not belong to the mobile phone signal, nor is it the signal of the walkie-talkie, but an unknown signal source, and this signal source is continuously sending information outward." Xiao Yuan said.
Listening to Xiao Yuan's words, Tang Sa frowned, but did not speak.
"The most important thing is that the distance between this signal source and the polar center, that is, this machine, is 31.75 meters, it should be in a corner of the Queen's Ballroom, sister, do you want someone to find it according to the location shown on it." Xiao Yuan saw that Tang Sa didn't speak, so he added some more, and then asked.
"Don't look for it yet, it's better to figure out what message this source is sending." Tang Sa has his own ideas.
"This machine has a signal reception function, I can try to see if I can receive these signals." Xiao Yuan said.
"You try." Tang Sa said.
Xiao Yuan opened the manual, looked at the operation tips on it, and then recorded the frequency band of the strange signal source displayed on the screen with a pen, and then fiddled with the machine, switched to the signal receiving function, and set the receiving frequency band of the machine according to the frequency band that was just copied, and a constantly changing composite waveform appeared on the machine screen.
"The signal is received, but it is just a waveform output like an oscilloscope, and I can't see anything at all?" Xiao Yuan said.
"You flip through the manual, and I remember seeing that this machine has a digital-to-analog conversion function, to see if you can convert this analog waveform into a digital stream." Tang Sa said.
After being reminded by Tang Sa, Xiao Yuan flipped the manual backwards, turned to the detailed description of the signal reception function, looked through it carefully, and found the instructions and operation guide for digital-to-analog conversion.
"Sister, digital-to-analog conversion requires the help of a computer, and the machine and the computer need to be connected with a serial port, and there must be special data receiving software, do you have all these things?" Xiao Yuan looked at it and asked.
"This machine is stolen, it's nice to have a manual, how can there be what you said, it seems that digital-to-analog conversion is not used." Tang Sa said with some disappointment.
"It's a bit of a hassle." Xiao Yuan was also a little disappointed, and turned back two more pages, but saw that the interface specification of a digital-to-analog conversion module was attached to the back of the operation process, and after a simple scan, he said, "Sister, according to this interface specification, I can write a simple version without software, can you find a serial cable?" ”
"The serial cable is here, you wait, I'll help you find it." Tang Sa stood up, came to a cardboard box placed on the side of the room, opened it and took out a serial cable from it, took it to Xiao Yuan and asked, "Can you write this software?" ”
"The digital-to-analog conversion has actually been completed on this machine, and the work to be done by the computer is only to receive the digital stream converted from the analog signal into the computer for storage, there are interface specifications, and it is not difficult to write such software." Xiao Yuan said.
"Okay, but it looks like it's getting light, how long will it take you to write?" Tang Sa asked.
"If it goes well, three or four hours." Xiao Yuan said, after speaking, he felt that three or four hours seemed to be a bit long, so he added, "After all, it is something I am not familiar with, I need to be familiar with it first, plus the time for debugging, three or four hours is not much." ”
"Can you really write it in three or four hours?" Tang Sa was taken aback by Xiao Yuan's somewhat conservative estimate, and asked in disbelief.
"I'm talking about three or four hours if it's smooth, you are also a professional, you know that writing this kind of hardware interface real-time data acquisition software, there is still the possibility of encountering problems, if you encounter this kind of problem, there is no special tool to assist, how long it will take to solve, it is difficult to say, it is possible to use a day." Xiao Yuan said.
"Even if you can write it in one day, my sister really admires you, don't look at my sister as a doctor in this major, compared to hands-on ability, it is really much worse than you." Tang Sa said again.
"PhDs should mainly focus on theory and algorithm research, hands-on ability is secondary, you know, that is the foundation of computer science, with algorithms, you are afraid that you can't find someone to help you achieve it?" Xiao Yuan said.
"You know a lot, but my sister has also abandoned my theoretical research ability, and my current level may not even be comparable to a master's degree, forget it, you should hurry up and work, my sister will give you a hand." Tang Sa said.
"Actually, you don't have to do anything, you haven't slept all night, if you feel tired, just sleep for a while, maybe there will be some trouble waiting for you when it's dawn, it's not okay to be in bad spirits." Xiao Yuan said.
"No need, staying up late is nothing to my sister, once in order to carry out the task, my sister lurked in the grass nest for three days and three nights, and after coming out, she was still alive, and my sister wanted to watch you work." Tang Sa didn't care and refused Xiao Yuan's request to let her rest.
"Okay then." Xiao Yuan said, he changed his position, sat in front of the terminal display of the blade server, turned on the monitor, and logged in to the blade server, because this time he wanted to directly manipulate the hardware, so he used the root user root.
After logging in to the server, Xiao Yuan first set up a development environment, writing this kind of program that reads and writes hardware directly, there is no other choice, using C and assembly of joint programming is the best choice, C language is used to improve programming efficiency, those modules that need to deal directly with hardware use assembly fragments, this programming method is familiar to Xiao Yuan, and it is also his favorite.
After configuring the programming environment, Xiao Yuan did not start coding immediately, but first read the interface specification carefully, got a piece of paper and drew a system architecture diagram, and then opened his usual editor vi and began to code.
"It's already dawn, and I can't feel it in it at all, and if I stay for a long time, I'm afraid there will really be a feeling that there is no sun and moon in the mountains." Xiao Yuan ate the delicious breakfast that Tang Sa had prepared for himself, and said with a smile.
"Eat quickly, my sister is still counting on you to eat enough, hurry up and write things well." Tang Sa said.
"Soon, the first few paragraphs are written very smoothly, according to this progress, the program can be written in another hour, and then all the modules can be jointly debugged." Xiao Yuan said.
"Come on, my sister is optimistic." Tang Sa shook his fist and cheered for Xiao Yuan.
After eating, Tang Sa didn't come back after taking out the breakfast plate, and Xiao Yuan didn't notice this at all because all his attention was already immersed in his digital world.
The programming went smoothly, and there were no unforeseen errors as he said before, when he wrote all the modules and wanted to carry out joint debugging, he found that Tang Sa was not in the computer room, but he didn't think too much, because he knew that Tang Sa would definitely have a lot of things to do during the day, Tong Yuping's aftermath to do, and the Xinhua Yigang should also pay attention to beware and so on.
At this time, it was already eight o'clock in the morning, which was a little longer than the three or four hours he originally expected, so he was unwilling to delay any longer, and immediately started the program debugging, when he debugged all the functional modules, and finally compiled and generated a complete software, although the process was very smooth, the time still passed more than an hour, almost ten o'clock, Tang Sa still never came again.