1 Product
2. Features
The main function of this product is to monitor the communication data in the serial line. It is very suitable for serial programming staff. By capturing the serial communication data, we can analyze the communication protocols or data of hardware and software, the biggest advantage of this prod
the receiver, and the effect is clear at a glance. For example:
After installing vspm, click vspm-> virtual serial port plug-in the Start menu, and overwrite the vspm. ini file in the directory to the program root directory. Remember to back up the original file. At this time you start vspm again, is the state of COM3-COM4 connection, COM5-COM6 connection.
Run two uartassist commands, set them to com
Reads digital signals from the serial portThis example shows how to monitor the switch status by establishing a serial port communication between the Arduino and the computer.Hardware requirementsArduino Development BoardAn instantaneous switch, button, or mobile Switch10 k ohm resistanceBreadWireCircuit
Image develope
Do not often contact computer friends may be a lot of small computer knowledge do not understand, today's editor in the QQ group of computer enthusiasts have found a friend asked a relatively simple, but the novice friends generally do not pay attention to the problem: what is a serial disk, what is the same port hard drive. Whichever speed is faster and so on. The author found that a lot of friends do not
How do you want to buy a computer or assemble a computer, you first need to know some hardware knowledge, in this article for you to specifically introduce the serial port and the hard disk, and the difference between the two. I hope to help you.
In order to facilitate understanding, you can understand the difference between the serial and the hard drives:
Coll
Keywords: Java serial port programming, SMS Modem, AT command
Ultimate Goal: provide a stable and reliable Java SMS sending server in Linux.
Stage 1: Coding and testing on the Win32 platform;
Stage 2: deploy and test on the Linux platform;
Directory:
Related Resources: (Java Communication package)
Preparation for Win32 serial Programming
Test procedure and
and cannot predict when it will end. In VB program, this problem can be solved by inserting a doevent statement in the loop structure. In Java, the best way is to use threads, just like the following code fragment.
Public Testport Extend Thread
{
...
InputStream input = Serialport.getinputstream ();
StringBuffer buf = new StringBuffer ();
Boolean stopped = false;
...
public void Run ()
{
try {
while (!stopped)
int ch = input.read ();
if (ch== ' q ' | | ch== ' q ')
{
/* End read,
writetotaltimeoutconstant;} Commtimeouts, * lpcommtimeouts;
Set the timeout function to setcommtimeouts. In its prototype, the pointer to receive commtimeouts is a parameter:
Bool setcommtimeouts (Handle hfile, // handle to communications deviceLpcommtimeouts // pointer to comm time-out Structure);
The following procedure sets the serial port read operation timeout to 10
language) to implement the quasi-Communication Letter Number _ p and _ outp.---- Although the number of API functions in Windows is widely used, the complexity is fixed by the complexity, the programming process is divided into the initial string port, configuration string port, ultra-time control system, data transmission, and closed string
Remember to close the port after it is enabled, andThe connection object is the same. It must be closed after it is used. Port. Close ();} Catch (Exception ex){ // Caught exception information MessageBox. Show (ex. Message, " Prompt " );}}
2. If you want to monitor the status of the device in real time, there is a good event. There is a datareceived event
the writefile () function returns (). because the asynchronous mode works normally in a single thread, the only difference is that when writefile () is executed, it may also execute readfile () (depending on the time when the writefile () function is executed ), the table is not listed here. 3. multi-thread comparison: the performance of a single thread is the same. What about multi-thread? The following code uses multithreading. It first creates a read thread to
Prepare
Raspberry Pi Development Board ( Click here to purchase ) (has been brushed into the official Raspbian system )
USB to Serial board ( click here to buy )
DuPont Line (4 root)
Connection
串口板 树莓派--------------------VCC +5V(非必须)RX TXD(GPIO15)TX RXD(GPIO14)GND Ground Raspberry Pi pin Map (40PIN Gpio For example, 26PIN Gpio compatible) serial
Http://blog.sina.com.cn/s/blog_6151984a0100ejfg.html/Sbin/Getty-l 38400 ttys0 VT100Command used:Tty view which terminal to useWho views logged-on usersW. View login usersEcho "ABC">/dev/pts /*Echo "123">/dev/ttyama0 information transmission between different terminalsWhen you run a program, the process will definitely correspond to a terminal, and the printf print information will appear on the terminal. When the program enters the kernel state (such as calling the driver ), printk prints inform
the original events. developers can directly
The following functions are called to trigger events. These events are loaded by default when the software platform starts.
1) void OnReceiveDataHandler (byte [] revdata );
Trigger receiving data events
2) void OnSendDataHandler (byte [] senddata );
Trigger the data sending event. When the Self mode is applied during network communication, you can use this event to independently send data.
3) void OnDeviceRuningLogHandler (stringstatetext );
Output
Debugging a serial port under Linux is a hassle, especially in an embedded environment, and many times it is time to debug with another device.Here to figure out a feasible serial debugging method, you can simply check whether the serial port is working correctly.1. Short-Co
retrospect, perhaps I did not notice that 51 single-chip serial port baud rate generator can only use T1, and I have been using T0 as a baud rate generator.Recently began to contact the STM32 series chip, because there is a firmware library for the operation of the underlying register is encapsulated, very close to advanced programming, learning and easy to use, and now many mobile chips are based on the A
performance, but it is not as good as it is. Once I debugged RK3188 Android car navigation with GYP, and the car terminal never received the data. The hardware engineer said that the CAN box would certainly be sent, and it had to be around for a long time, at last, we can only connect the USB to the serial port board to the computer to see that there is data, but the frame format is incorrect. If there is
The simplest example:
Void setup ()
{
Serial. Begin (9600); // open the serial port and set the baud rate to 9600 bps.
}
Void loop ()
{
Int val;
Val = analogread (5 );//The sensor is connected to the analog Port 5, and the value is variable according to your own needs.
S
If the data is obtained by the serial device, how to read the data information obtained by the serial device using PHP? Ask you.
Reply to discussion (solution)
Can ah, you use the application to monitor the serial port, get the data generated files, read files in PHP c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.