We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Dear All, Who know how hyperterminal identifies input state of cpu connected to PC via serial port ? For example when codes in CPU reaches to scanf() func. the hyperterminal switches to input situation and is ready to receive data from user without any extra data exchanging . Regards. Majid
Who know how hyperterminal identifies input state of cpu connected to PC via serial port ? Nobody does, because hyperterm doesn't actually do anything like that. Hyperterm is ready to receive input from the user all the time, not just if the connected device wants to receive some. There is no such thing as an "input situation" in hyperterm (or any other terminal program, for that matter).
Hi Hans, We are unable to type character string in normal mode . Isn't it ? But in that situation we type any char. easily . Test it ! Regards,
And what makes you believe you're "unable to type" in that situation? What actually happens if you type something? Test it ! How do you propose I could do that, with you not leaving even the slightest hint what kind of device and program you're talking about, here? You may be confusing this with handshaking protocols used on serial lines. It depends on what your "CPU" is, how exactly it's linked to the PC, and how you configure the terminal program.
"We are unable to type character string in normal mode" What is "normal mode?" What do you mean, "unable to type?" Do the buttons on your keyboard seize up so that you can't press them? Or do you just mean that nothing appears on the Hypoterminal screen when you type? For characters to appear on the Hypoterminal (or any other terminal) screen when you type, you need to enable Local Echo. "But in that situation we type any char. easily" What situation? I though you just said you couldn't type?!
"Test it !" It works just fine on my systems.
Normal Mode : Connect Time and CPU does any function except input functions ex. getchar() or scanf() That Situation : When CPU reaches to scanf() and waits for serial data from PC In Normal mode We type via keyboard and don't see any char in hyper editbox . But when cpu run an input command , we can see what we are typing and with an Enter key , our chars transferred to CPU Get It ?!
'just fine on my systems' Can you explain me about "Fine" ? Regards,
I can use HyperTerminal (although I usually don't) to:
"But when cpu run an input command , we can see what we are typing and with an Enter key , our chars transferred to CPU" This is because scanf() calls getchar() to receive data from the UART. getchar() in turn calls putchar() to echo those characters back out through the UART. Hyperterminal displays those echoed characters. If the 'CPU' is doing something else you won't see the characters you type appear in the hyperterminal window. Most of the format specifiers you use with scanf() delimit their input when a character that is inappropriate for that specifier is received. For instance: scanf("%d",&someint); If you type '123[Enter]' scanf will return control to the calling function when the enter key is pressed, because that character is not valid as part of an integer. Every time a key is pressed that key will be echoed back to hyperterminal. Note that hyperterminal is completely dumb, it just displays characters received by the PC UART and transmits characters you type out through the PC UART.
I think that an (arguably) more conventional means of dealing with user input is to use a simple means of string input (e.g., repetitive getchar()'s until \r) and then parsing the string with sscanf() (or whatever). Sidenote: Hmm, several "means" in there -- I should be a patent attorney.
based on my experience with the product, I think "Hyperterminal Intelligence" is an oxymoron :) Erik
"I think 'Hyperterminal Intelligence' is an oxymoron :)" Hence my spelling, Hypoterminal... ;-)