Shop OBEX P1 Docs P2 Docs Learn Events
ViewPort and PropBasic Problem — Parallax Forums

ViewPort and PropBasic Problem

camelot2camelot2 Posts: 54
edited 2011-11-30 16:37 in Propeller 1
hi, I installed ViewPort 4.6.7 and PropBasic 1.27. When I click on the ViewPort icon it starts up and displays a PropBasic program. When I then click RUN > Load EEPROM with ViewPort support a window comes up saying Unable to load and connect PropBasic - Failed to configure on COM4. The view log is:

Log:
Reset Reset:PropBasic v1 on COM4
Reset Reset:PropBasic v1 on COM4
Wrote 8855 bytes!
Waiting for reply
Received reply of 254 after 5,1
Waiting for reply
Received reply of 254 after 97,1
Waiting for reply
Received reply of 254 after 38,1
Opening connection to COM4 at 115200
Sent request for configuration
Sent request for configuration
Timed out during configuration
Cfglen=0, FoundCfgMarker=0, CfgMismatch=-1, Read=0
s=

Note that my setup (Prop,PropPlug,USB cable etc) works fine using BST 19.3 and PropBasic 1.14 and on COM4. I want to change to ViewPort since Bean said that PropBasic 1.14 has a multiply problem.

QUESTION: WHAT AM I DOING WRONG OR HAVE NOT DONE TO VIEWPORT AND/OR PROPBASIC TO GET THEM TO WORK TOGETHER AND USE THE TERMINAL TO DISPLAY ON RESULTS ?

all help will be greatly appreciated thanks - Dave

Comments

  • HannoHanno Posts: 1,130
    edited 2011-11-30 12:51
    Hi Camelot2,
    When you press "load with viewport support", ViewPort will link your program with the "conduit.spin" object and and will attempt to set up a high speed connection with your program for easier debugging.
    This process if failing on your setup for some reason.

    You mention that you want to use the terminal. Is your code using pins 30, 31? If so, you're conflicting with conduit's use of those pins. ViewPort has an integrated terminal that you can use instead.
    If you don't want to use ViewPort's conduit, you can click "load ram/eeprom".
    Hanno
  • camelot2camelot2 Posts: 54
    edited 2011-11-30 15:02
    thanks Hanno for the reply. I am using pin 30 for serout, this is the program

    DEVICE P8X32A, XTAL1, PLL16X
    FREQ 80_000_000
    '
    BAUD CON "T115200" ' Baud rate for PC communications
    CR CON 13
    '
    TX PIN 30 HIGH ' Output pin for PC communications

    ascii HUB STRING(20)
    ans VAR LONG
    '
    PROGRAM Start
    '
    Start:
    ans = 3 * 10
    ascii = STR ans,10,1
    SEROUT TX, BAUD, ascii ' Send to terminal
    END

    When I click RUN then Load EEPROM and then click the Terminal button at the top middle and then click Connect I still get the same error message as in the 1st post. While trying to understand the problem I loaded the program using ViewPort then opened BST and viewed its terminal and the answer was there, 30
    Any thoughts as to why I can't use the terminl in ViewPort. - Dave
  • HannoHanno Posts: 1,130
    edited 2011-11-30 16:37
    Hi,
    As I suspected, you're trying to use pin 30- this creates a conflict with ViewPort's conduit program.
    Two solutions:
    - Don't use ViewPort's conduit, by just clicking "Run" or "Load to EEPROM" and then DO NOT press Connect.
    - Or, use only ViewPort's conduit. This will let you do terminal IO as well as viewing/editing variable values.
    Here's an example .pbas program that inputs and outputs strings with ViewPort's integrated terminal while watching the cntr value and IO pin state.(You'll need v1.27 of PropBasic http://forums.parallax.com/showthread.php?135678-Download-latest-version-of-PropBasic-for-Viewport-here...[/ur]) :

    DEVICE P8X32A, XTAL1, PLL16X
    FREQ 80_000_000
    PROGRAM Main
    cntr var long
    name hub string(10)
    watch cntr
    Main:
    load "vpterminal_lib.pbas"
    cntr=0
    do
    cntr=cntr+1
    vp_str "What's your name?"
    vp_strin name
    vp_str "Hello "
    vp_str name
    vp_dec cntr
    pause 1000
    vp_clear
    loop
    END
Sign In or Register to comment.