Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What’s the difference between the serial GET and INPUT commands?

commands input serial
0
Posted

What’s the difference between the serial GET and INPUT commands?

0

If you want to get a character from the serial port use GET. This command returns a character’s 7-bit ASCII value if one has been received by the serial input port, otherwise it returns a ‘0’ value to the program. The advantage of using GET is that it does not hold up your application program waiting for a character if no characters are present. The program is free to do other things while waiting. One caution, however. Any loop that gets a character and does something with it takes a finite amount of time. If that loop-processing time takes too long, additional characters coming into the serial port can be missed. This method shouldn’t be used for streaming data or at fast baud rates. For fast baud rates or streaming date you should use the INPUT command. The INPUT command accumulates input characters until either receiving a carriage return or 80 characters (input buffer full). This is good for receiving most serial data, providing it ends with a , like a network packet. The

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123