Thread: Getting Input from a Serial Connection (Hyperterminal)

  1. #1
    Registered User
    Join Date
    Feb 2013

    Getting Input from a Serial Connection (Hyperterminal)

    Wondering why I cannot communicate with my microcontroller dspic33 with the Hyperterminal program. In the sample test code, I also cannot use printf. They have it set up differently and I am wondering if it is possible to redirect the output of the printf, scanf functions to the port I am using?


  2. #2
    Registered User
    Join Date
    Sep 2006
    printf(), "under the hood", is simply fprintf() with a default stream of stdout (usually the console). In the same way, scanf() is fscanf(), with a default source of stdin (usually the keyboard). All streams must have a source or target, even if we C provides one by default for us.

    I'm not familiar with your micro controller, but your documentation and or a web site, should specify how to set up that source or target for a stream, as well as what streams are already set up, by default.

  3. #3
    Registered User
    Join Date
    Jun 2011
    Adak addressed your second query - regarding your first query, you should confirm the following:

    - Physically verify that the serial port is responding to data you enter into HyperTerminal (i.e. check voltages)
    - Verify the Rx/Tx lines are connected correctly between the computer and the PIC.
    - Verify that you have the same serial configuration settings at each note (number of data bits, parity, etc).

  4. #4
    Registered User
    Join Date
    Feb 2013
    Thanks guys! I currently just wrote a new code changing the printf to print to the serial port, now i am working on a scan function. I think it is in the Macros where these are being defined with Uart0.uart1.uart2 So I'll further investigate thanks again!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how its done(hyperterminal)?
    By stefan63 in forum Windows Programming
    Replies: 17
    Last Post: 03-25-2011, 04:24 AM
  2. Replies: 17
    Last Post: 07-14-2009, 08:17 AM
  3. Using threads for control input (keyboard, serial)
    By synthetix in forum C Programming
    Replies: 1
    Last Post: 07-06-2009, 07:43 PM
  4. Input via the serial port for a C program
    By Anthony in forum C++ Programming
    Replies: 2
    Last Post: 07-11-2005, 02:19 PM
  5. Hyperterminal????
    By gvector1 in forum C# Programming
    Replies: 3
    Last Post: 01-22-2004, 08:54 PM