Hyper Terminal Setting for TTL putput


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2008
    Location
    Washington
    Posts
    14

    Default Hyper Terminal Setting for TTL putput

    I can't get the output from a PIC 16F877A to appear correctly on hyper terminal. When I use the melabs LabX-1 board it works fine. I have moved the pic to a proto board that does not have the MAX232 chip, and I am using a 1K resistor on pin 2 of the DB9, and pin 5 is to ground. I understand that this make the signal inverted, so I changed the serout code for inverted.

    with all lines set to T2400, this code works fine on the LabX-1 (with the MAX232).
    when ran on the board without the MAX232, my understanding is that I need to change from T2400 to N2400. But when I do that I receive what appears to be symbol font or ???? on hyperterminal. I am setting hyperterminal to 2400-8-N-1, hardware flow control. I can't find anything on how to configure hyper terminal for TTL.

    Serout PORTC.6,N2400,["********************",10,13] ' rs232 output
    Serout PORTC.6,N2400,["* ce_ADCIN.BAS *",10,13] ' 10 and 13 are
    Serout PORTC.6,N2400,["* v1.0 * 2/29/2008 *",10,13] ' return and LF
    Serout PORTC.6,T2400,["* updated * 6/4/08 *",10,13] '
    Serout PORTC.6,T2400,["********************",10,13] '
    Serout PORTC.6,T2400,[10,13,10,13] '
    Pause 500 ' Wait .5 second


    Can anyone help?

    Thanks,

    Clay

  2. #2
    skimask's Avatar
    skimask Guest

    Default

    There is no setting inverted or normal logic levels in Hyperterminal or on any other normal PC. It's straight RS232 or nothing.

    Somehow I doubt that the code you posted is all there is.
    What does the rest of your schematic look like?
    What freq is your oscillator? How are your config bits set up?
    Does your new 'protoboard' have a decent set of cap's across Vdd/Vss?
    Put an LED on a pin...make a heartbeat LED...make sure your program at least looks like it's running correctly.

  3. #3
    Join Date
    Jun 2008
    Location
    Washington
    Posts
    14

    Default

    So Skimask, am I correct to understand that hyperterminal will read the TTL signl OK if everything else is OK?

    I'm not even sure if hypertermnal will read a TTL input or if TTL is intended for other types of devices.

    I was trying to determine if the only code change I needed when using the 1K resistor instead of the MAX232 was to change the Serout command from the T prefix to the N prefix.


    I programmed the PIC and ran it in the LabX-1 board. Blinking LEDs, output to a LCD, and rs232 output to hyperterminal. I used this to make sure the program was working properly. I then removed to PIC and inserted it into the board without the MAX232. The board without the MAx232 is a Picproto64 from microEngineering Labs. The only thing I added to the board was the 1K resistor between the RS232 transmit pin and the DB9. (I saw this on page 139 of the PicBasic Pro Compiler book.) I was trying to only add one new item at a time by testing the program out first on a purchased board. The components i put on the board without the MAX232 were a kit I purchased with the baord from microengineering Labs. The osc is 4MHz.


    skimask, thanks for taking the time to reply. This is my first non-basicstamp project, so I appreciate the replies.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924

    Default

    You should not have any problems without the inverter chip. N2400 is correct.

    Like skimask asked, are you sure the PIC is running on the new board?
    How long is the cable from PIC to PC?
    Dave
    Always wear safety glasses while programming.

  5. #5
    skimask's Avatar
    skimask Guest

    Default

    Forget about what Hyperterminal wants for a minute, because basically, Hyperterminal doesn't want anything. You tell Hyperterminal what you want. Hyperterminal is only going to read what the serial port sends it at the baud rate and format YOU select in Hyperterminal, which in turn, sets the serial port to transmit/receive.

    The PBP manual does a fairly decent job of explaining why, generally speaking, a MAX232 chip is not needed when using PICs (or most MCUs for that matter).
    If the voltage levels coming into the serial port from the PIC without a level converter (MAX232) happen to fall within that serial port's high and low voltage specifications (which can and does ocassionally vary between manufacturers) levels, then, all else being equal, everything should work. If they don't, it won't.

  6. #6
    Join Date
    Jun 2008
    Location
    Washington
    Posts
    14

    Default

    Thanks for the help. I have some work to do tomorrow. Your information has really helped. At least now I know that what I am trying to do will work if I do it correctly. It may sound funny, but that is a huge help.

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818

    Default

    Quote Originally Posted by ClayE View Post
    and I am using a 1K resistor on pin 2 of the DB9, and pin 5 is to ground. I understand that this make the signal inverted, so I changed the serout code for inverted.Clay
    . . . not quite, the resistor gives short protection if either p/c or pic pulls the serial line in opposite polarities, grounding pin 5 simply gives both the p/c and pic a common reference, GROUND. Now that said, setting N2400 does set the serial data to Inverted.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 15:01
  2. Replies: 13
    Last Post: - 12th May 2009, 18:26
  3. what is hyper terminal?
    By moud_man in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th September 2005, 20:33

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts