interactive menu with hyperterminal


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Posts
    8

    Default interactive menu with hyperterminal

    I'm making a menu driven datalogger and am having trouble with hyperterminal not showing all my menu items. If there are only a few lines, everything displays with no problems. but if certain additional menu items show up then the last line of my menu only shows some characters or not at all.
    if the "MEMORY CONTAINS DATA" OR "TURBINE IS DE-ACTIVATED" gets displayed then the last line shows:

    HOLD (A) while LOGGING re

    instead of

    HOLD (A) while LOGGING returns to this menu

    I know with hyperterminal and realterm I have 20 lines by 80 characters so I can't figure out why my menu doesn't fully display.... I cant add any more menu items as they simply dissapear. I'm under the 500 character buffer limit so It's not that.

    I start be sending 27,91,50,74 ' this is the ansi esc[2J to clear the buffer
    This clears the buffer and screen, then I send 8 lines to hyperterminal for my menu items ( around 400 characters but below the 500 char buffer) each line is terminated with ,13,10
    if I try adding more menu items hyperterminal simply wont display them. The text only fills the first 1/4 of hyperterminals windows so lots of room for more.

    Thanks for any insight!!

    Jamie

    the serial speed is 38400N81 pic 16f877a and 20mhz xtal
    otherwise the transfer is rock solid.

  2. #2
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    First of all, the information given by you is not sufficient to fully describe your problem.

    My impression is that your speed is unnecessarily high. Do you really need the 38400 baud speed? If not, drop it to 9600 and see if that helps improve things for you. Another thing you may try is to 'pace' the output from the PIC using the define meant for that.
    Code:
    define  CHAR_PACING  1000
    ' define the character pacing in microseconds

  3. #3
    Join Date
    Dec 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Here's the menu code

    Yes I need 38400 because it dumps 131k of data when downloading logs.
    here is the menu code. the last line "HOLD (A) while LOGGING returns to this menu" wont display fully if I add any other menu items.
    As I sais the serial connection is rock solid with no problems whatsoever. I can download the data, interact with the menu all with no trouble, It just wont let me add any other menu items without partially or fully deleting the lower lines such as the "HOLD (A) while LOGGING returns to this menu"

    Thanks



    Serout2 SO,6,[" ITCV2.0 Turbine Controller (SW - V1.0) System Voltage is ",Dec SYSVolts," Volts", 10,13]
    Serout2 SO,6,[" < ",HEX2 RTCHr,":",HEX2 RTCMin,":",HEX2 RTCSec," ",HEX2 RTCMonth,"/",HEX2 RTCDate,"/",HEX2 RTCYear," Sample time = ",Dec SamTime," Sec >",10,10,13]
    If DirtyMem <> 255 Then
    Serout2 SO,6,[27,91,53,109," MEMORY Contains DATA!",27,91,48,109,10,10,13] ' flash the text
    EndIf
    If TurStatus <> 255 Then
    Serout2 SO,6,[27,91,53,102," TURBINE IS DE-ACTIVATED!",27,91,48,109,10,10,13] ' flash the text
    EndIf
    Serout2 SO,6,[ " (1) Turbine Setup Menu (2) Download Memory Banks",13,10]
    Serout2 SO,6,[ " (3) Erase Memory Banks (4) Set the sample time",13,10]
    Serout2 SO,6,[ " (5) Set the Clock (6) Log Data ("]
    If LogData = 1 Then
    Serout2 SO,6,[ "ON)",13,10]
    Else
    Serout2 SO,6,[ "OFF)",13,10,13,10]
    EndIf

    Serout2 SO,6,[ " (C) CLEAR THE SCREEN",10,13]
    Serout2 SO,6,[ "HOLD (A) while LOGGING returns to this menu",13,10]
    SerIn2 SI,6,[PCCommand]
    If PCCommand = 49 Then TurbineSetup
    If PCCommand = 51 Then ClrMem
    If PCCommand = 53 Then SetClock
    If PCCommand = 52 Then SampleTime
    If PCCommand = 67 Or PCCommand = 99 Then Menu
    If PCCommand = 54 Then
    If LogData = 0 Then LogData = 1:GoTo Menu
    If LogData = 1 Then LogData = 0:GoTo Menu
    EndIf
    If PCCommand = 50 Then
    Serout2 SO,6,[ 13,10]
    ADDR = 0
    Cont = Bank0A
    GoTo DumpMem
    EndIf

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    HyperTerminal allows you to set certain areas of the screen to scroll independently of the rest of the screen. And that mode is saved with the .ht file, so it stays there until reset. A 1-line scrolling area can cause things to not show up because it immediately scrolls out of the 1-line area after every [13,10].

    When playing around with ANSI codes, it's easy to trigger the mode without even realizing it.

    Try adding this to the top of the program, which should reset it if it's in that mode.
    Code:
    Serout2 SO,6,[27,"[r"]
    Creating a New Connection would also reset it, if it's the cause.

    hth,
    DT

  5. #5
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    966


    Did you find this post helpful? Yes | No

    Default

    Did you try the character pacing define mentioned in my earlier post?

  6. #6
    Join Date
    Dec 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Thanks for the replies

    I tried character pacing and it had no effect on the way the menu displays. just mad it slower. I also tried making a new hyperterminal window also with no change. the menu displays the same on realterm and teraterm so the 1 line scrolling in hyperterminal was also not the problem.

    Thank you for trying

    jamie

Similar Threads

  1. load .hex file in PIC with hyperterminal
    By irenuska23 in forum General
    Replies: 8
    Last Post: - 1st September 2009, 09:52
  2. Hyperterminal problem
    By DR.Larq in forum Serial
    Replies: 2
    Last Post: - 9th May 2008, 18:40
  3. Replies: 1
    Last Post: - 30th March 2008, 15:53
  4. Sending menu to PC from PIC16F876A
    By joseph Degorio in forum Serial
    Replies: 2
    Last Post: - 12th November 2007, 07:03
  5. Interrupt Menu System Example and Help Needed
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 1st April 2005, 17:05

Members who have read this thread : 0

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