Shop OBEX P1 Docs P2 Docs Learn Events
hyperterminal and reading a variable — Parallax Forums

hyperterminal and reading a variable

shmowshmow Posts: 109
edited 2008-03-26 12:54 in Propeller 1
I've never used hyperterminal before, and I'm having a hard time reading the value in
a variable - sample program below:

CON
  _clkmode = xtal1 + pll16x
  _xinfreq = 5_000_000
 
OBJ 
  SER   :"Fullduplexserial"
  
    
pub start   | TEMP_data
  temp_data := 100
  
  SER.start(31, 30, 0, 9600)                            'Sets up Com port for computer (Rxpin,TXpin,mode,baud)
  repeat
   waitcnt(100_000 * 20 + cnt)
   ser.tx(10)                                            'line feed
    ser.tx(13)                                            'carriage return
    ser.str(string("Results =   "))    
    ser.dec(TEMP_data)                                    'display decimal value of temp
    ser.str(string("binary value is   "))     
    ser.bin(TEMP_data,16)                                 'display binary value of temp 
    ser.tx(13)                                            'line feed
    ser.tx(10)  

Here's what I have done (and with no luck):
- downloaded·code to prop·(from forum - thanks)· http://forums.parallax.com/showthread.php?p=716483
- opened·hyperterminal on the same com port that was used to program prop
- configured hyperterminal baud rate to 9600
- pressed "Call" icon to connect to prop (through programming cable)
- screen doesn't change - just flashing cursor

Have I overlooked something or assumed incorrectly how to connect.
Any insights would really help.

Comments

  • RaymanRayman Posts: 14,162
    edited 2008-03-25 19:54
    Are you sure you picked the right com port? The "identify" function in the prop tool tells you what port it's connected to.

    Code looks OK.
  • shmowshmow Posts: 109
    edited 2008-03-25 20:41
    When I'm downloading the code I use com 12, and when I'm connecting the hyperterminal I use com 12 too.
    Is this the right way to do this?
  • lfreezelfreeze Posts: 174
    edited 2008-03-25 22:27
    I struggled with hyperterminal when I first started with the propeller. I ran

    your code and it worked fine on a hyperterminal sessions. I suggest you

    start a new hyperterminal connection with the following settings

    Com port = 12·· ( assume· you havent changed it)

    bits per second = 9600

    data bits········· = 8

    parity············· = none

    stop·bits········· = 1

    flow control····· = hardware

    good luck....

    Larry
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-25 23:07
    Hey Larry, I thought flow control should be set to Off, though I almost never use hyperterminal so I may be mistaken.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • lfreezelfreeze Posts: 174
    edited 2008-03-25 23:13
    You are probably right. In order to check the code, I set up a new hyperterminal session
    will the values in my message. It worked OKAY and I was able to display the variable.
    Now I am not certain if having flow control set to hardware will create a problem.

    I abandoned hyperterminal in favor of propterminal a while back just to avoid issues
    when I convert to vista.

    Larry
  • shmowshmow Posts: 109
    edited 2008-03-26 00:11
    Thanks Larry - I got it to work.

    In your last message, I read that you use propterminal;

    where do I get information on that?
  • lfreezelfreeze Posts: 174
    edited 2008-03-26 01:11
    You can download propterminal at http://www.insonix.ch/propeller/.Click on the english translation on the right of the screen, It's a great subsitute for Hyperterminal. Be sure to read the notes that come with it.

    Larry
  • shmowshmow Posts: 109
    edited 2008-03-26 12:54
    Larry, thanks for the link - tried it out and I got it to work too.
Sign In or Register to comment.