interactive menu with hyperterminal


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Dec 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Thanks Darrel

    Darrel, Thats exactly as it's supposed to look. Thank you for verifying the code. I wonder if you hit 'C' and clear the screen a bunch of times does it screw up the display for you?

    I will keep searching. That routine is was screws up on my end. if I try adding menu items (7) and (8) ect it really messes up.

    I will look at it much closer

    Thanks for taking the time Darrel

    Jamie

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jamied View Post
    I wonder if you hit 'C' and clear the screen a bunch of times does it screw up the display for you?
    The location MENU: (result of "C" PCCommand = 67) wasn't included in the snippet.
    Can I assume it's the routine shown?

    Happy to test any portions provided.
    <br>
    DT

  3. #3
    Join Date
    Dec 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Sorry about that

    I just realized the menu: lablel was missing from the top of the text
    That whole routine is called menu so when you hit 'C' it just repaints it while clearing the screen
    I added the routine Clearscreen: a few weeks ago to try and solve my problem but it never helped.

    here it is


    DEFINE OSC 10

    SO VAR PORTC.6
    SI VAR PORTC.7


    RTCHr VAR BYTE : RTCHr = $17
    RTCMin VAR BYTE : RTCMin = $44
    RTCSec VAR BYTE : RTCSec = $28
    RTCMonth VAR BYTE : RTCMonth = 1
    RTCDate VAR BYTE : RTCDate = 3
    RTCYear VAR BYTE : RTCYear = 9
    SamTime VAR BYTE : SamTime = 12
    SYSVolts VAR BYTE : SYSVolts = 5
    DirtyMem VAR BIT : DirtyMem = 1
    TurStatus VAR BIT : TurStatus = 1
    LogData VAR BIT : LogData = 1

    PCCommand VAR BYTE : PCCommand = 0
    ADDR VAR BYTE : ADDR = 0
    Cont VAR BYTE : Cont = 0


    Menu:

    Serout2 SO,32,[27,91,48,109]
    GoSub ClearScreen:Serout2 SO,32,[27,91,48,109]

    Serout2 SO,32,[" ITCV2.0 Turbine Controller (SW - V1.0) System Voltage is ",Dec SYSVolts," Volts", 10,13]
    Serout2 SO,32,[" < ",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,32,[27,91,53,109," MEMORY Contains DATA!",27,91,48,109,10,10,13] ' flash the text
    EndIf
    If TurStatus <> 255 Then
    Serout2 SO,32,[27,91,53,102," TURBINE IS DE-ACTIVATED!",27,91,48,109,10,10,13] ' flash the text
    EndIf
    Serout2 SO,32,[ " (1) Turbine Setup Menu (2) Download Memory Banks",13,10]
    Serout2 SO,32,[ " (3) Erase Memory Banks (4) Set the sample time",13,10]
    Serout2 SO,32,[ " (5) Set the Clock (6) Log Data ("]
    If LogData = 1 Then
    Serout2 SO,32,[ "ON)",13,10]
    Else
    Serout2 SO,32,[ "OFF)",13,10,13,10]
    EndIf

    Serout2 SO,32,[ " (C) CLEAR THE SCREEN",10,13]
    Serout2 SO,32,[ "HOLD (A) while LOGGING returns to this menu",13,10]
    SerIn2 SI,32,[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,32,[ 13,10]
    ADDR = 0
    Cont = Bank0A
    GoTo DumpMem
    EndIf


    ClearScreen:
    serout2 SO,32,[27,91,50,74]
    Return



    TurbineSetup:
    ClrMem:
    SetClock:
    SampleTime:
    Menu:
    DumpMem:

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


    Did you find this post helpful? Yes | No

    Default

    Still no problems Jamie.

    I get the same screen, and when pressing C it redraws the screen.

    Doesn't matter how many times or how fast I press C, it always comes up correct. I can press C fast enough that it misses some of them, but that's to be expected with SERIN2.

    Do you have any other ANSI sequences in your program?
    <br>
    DT

  5. #5
    Join Date
    Dec 2008
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Thanks Darrel

    No, thats the whole routine. I'm going to reinstall hyper terminal. This glitch never made any sense to me. Thank you for all your help!!!!
    I know its not the code now. I'll update when I get it squared away.. has to me my pc.

    Jamie

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Jumping in late here with a quick thought....
    Are you by any chance using a USB<->RS232 dongle? I've never had a problem with those myself but I've read about some weird behaviour. I know you said that the transfer was rock solid "otherwise" which may point away from said dongle - but then it would point away from the PC and terminal softwaret too.

    Anyway, just a thought.

    /Henrik.

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