Shop OBEX P1 Docs P2 Docs Learn Events
Viewport 4.1.7; for some reason it doesn't like me — Parallax Forums

Viewport 4.1.7; for some reason it doesn't like me

HarleyHarley Posts: 997
edited 2010-03-06 22:27 in Propeller 1
Hi Hanno,

I'm back on an 'old' project and needed to look at some signals w/Viewport. For some reason the older version wouldn't work, so downloaded the latest from your site. And then found some changes are required by users to get our older source to run. Hopefully I created the required code lines properly. But for some reason it times out on trying COM3, which Viewport has set up from the previous version. Do you see what isn't right on this fragment of my source? I'd like for ALL the 32 I/Os to be present on LSA. Thanks (when you have a moment)

'*****************************
'*  Control_2Prop1  v 0.1    *  mod: 11:32 am  4 Mar.2010
'*  (C) 2007 h.a.s. designn  *
'*****************************  ViewPort = v4.1.1 , PASD = v0.3 latest versions   
CON
  _clkmode      = xtal1 + pll16x
  _xinfreq      = 5_000_000
  clockfreq = ((_CLKMODE - XTAL1) >> 6) * _XINFREQ
  _1mS  = clockfreq / 1_000 'Divisor for  1 mS
  Prop_Tx       = 27            ' Prop1 data to Prop2
  Prop_Rx       = 26            ' Prop1 data from Prop2  
  Prop_Baud     = 115_200       ' for Prop1 <=> Prop2 comm. (AT 8.68 microsec/bit)
  PIC_Tx        = 4             ' Data to D/K board     
  PIC_Rx        = 5             ' Data from D/K board
  PIC_Baud      = 35714         ' D/K PIC16F871 with a 4 MHz xtal runs 35714 baud
'TV parameter  (not enough pins or cogs left for VGA which uses 8 pins)
  #0, white, inverse, highlight, blue, magenta, green, orange, red ' text palette colors
VAR
  long stack[noparse][[/noparse]200], DTarray[noparse][[/noparse]6], rxpin,  txpin, c, rxbyte, rxcheck, txbyte
  long key, addrReg, dataReg, dirReg, id, CmdStatus 
  long keyReg, LpTimer, SBPtReg, DisplayReg, CmdP2, LEDreg, Prop2Reg
  LONG frame[noparse][[/noparse]400]  
  byte Lptest
OBJ
  PICSer        : "FullDuplexSerial"         ' comm w/ the D/K board
  PropSer       : "FullDuplexSerial"         ' comm w/ the other Propeller, Prop2 
  Display       : "TV_text"                  ' debug w/monitor (13 lines of 40 char.)
  vp            : "Conduit"                  ' transfers data to/from PC, 1 cog
  qs            : "QuickSample"              ' captures INA, variables, 1 cog @20 MHz
'  dbg           : "PASDebug"                 '<= Include for PASD Debugger 
'****email lc**************************************************************************
'  Prop#1: handles D/K, Prop#2, and p/o Pod i/f's, Command decoder, 5 MHz Prop#2 clock;
'    both Props connect to a 'Pod' board; and displays debug info to a TV monitor.
'****b55c1879**************************************************************************
PUB Main  '|INAFrame[noparse][[/noparse]400]          ' Cog 0
  vp.register(qs.sampleINA(@frame,1)) 'sample INA w/ 1 cog up to 20 MHz (MUST BE COG 0)
  optional_configure_viewport
  vp.share(@key,@id) 'share memory from 'key' to 'id';   END of VP commands <<===  
  
  PropSer.start(Prop_Rx, Prop_Tx, %0000, Prop_Baud)     ' s/b Cog 1 (if NO VP or PASD)
  PICSer.start(PIC_Rx, PIC_Tx, %0000, PIC_Baud)         '  "  Cog 2
  Display.start(12)                                     '  "  Cog 3
  id := cognew(@DTbus,@DTarray[noparse][[/noparse]0])  ' this sets up the DTbus registers for the DTbus cog 
'  id := cognew(@entry,@DTarray[noparse][[/noparse]0]) ' cog for DTbus R/Ws; Cog 3; PASD; CmdStatus=>StatAsm @ PAR
'  id := dbg.start(31,30,@entry) ' for PASD debugger (NOTE:  need 'xxx.bin' file for PASD )
        
  InitProp1
  repeat  ' Main Loop    *********** deals with inputs from D/K, Prop#2 and Pod ***********
    DKif                        ' check if input from Display/Keypad board
    P2if                        ' check if input from Prop#2
    LoopTest                    ' check if DK or Prop#2 returns a loop test response
'*************************************************************************************
PUB optional_configure_viewport
  vp.config(string("var:freq(unit=Hz,min=0,max=10000),io(bits=[noparse][[/noparse][noparse][[/noparse]0..29],30tx,31rx])"))
  vp.config(string("var:io,key,addrReg,dataReg,dirReg,id,CmdStatus")) ' show these VARs
  vp.config(string("lsa:view=io,timescale=100ns,trigger=io[noparse][[/noparse]7]f")) ' trig on A7 falling
  vp.config(string("edit:key(default=5,mode=text),CmdStatus(mode=text)"))
  vp.config(string("start:lsa"))
'*************************************************************************************
PUB LoopTest                                         


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko

Comments

  • Clock LoopClock Loop Posts: 2,069
    edited 2010-03-05 01:25
    Harley said...

    '*************************************************************************************
    PUB optional_configure_viewport
      vp.config(string("var:freq(unit=Hz,min=0,max=10000),io(bits=[noparse][[/noparse][noparse][[/noparse]0..29],30tx,31rx])"))
      vp.config(string("var:io,key,addrReg,dataReg,dirReg,id,CmdStatus")) ' show these VARs
      vp.config(string("lsa:view=io,timescale=100ns,trigger=io[noparse][[/noparse]7]f")) ' trig on A7 falling
      vp.config(string("edit:key(default=5,mode=text),CmdStatus(mode=text)"))
      vp.config(string("start:lsa"))
    '*************************************************************************************
                                          
    
    


    I noticed with my setup that I was limited to the amout of vp.config lines I can have.
    You will need to squeeze more into previous lines to see all your data.
    3 lines works for me.
  • HarleyHarley Posts: 997
    edited 2010-03-05 21:19
    Thanks Clock Loop, for the suggestion. However, I must have some other problem.

    @Hanno. When I try to run Viewport, it takes 24 seconds from clicking Run until getting an error message, which states "Error: 0 on Com3 Load: no configuration found." Yet the Prop Tool has no problem with Com3, which has always been used. I don't understand why my configuration lines aren't seen by Viewport. Any clue for me to try?

    It seems there has been some changes us user's need to make as various versions have been released. Makes for updating older programs quite a chore to get operational again to be able to use Viewport. Hopefully this situation will be minimal to zero in later releases. Frustrating to have to lose time debugging access to Viewport when this happens. I tried to use as much as the Manual tutorial provided. Compiles OK, but can't run Viewport. cry.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • HannoHanno Posts: 1,130
    edited 2010-03-05 22:37
    Hi Harley,
    Good to hear from you!
    ViewPort's configuration strings haven't changed in a while- at least a year- so your program should work.
    Here's what worked for me:
    CON
      _clkmode      = xtal1 + pll16x
      _xinfreq      = 5_000_000
      clockfreq = ((_CLKMODE - XTAL1) >> 6) * _XINFREQ
      _1mS  = clockfreq / 1_000 'Divisor for  1 mS
      Prop_Tx       = 27            ' Prop1 data to Prop2
      Prop_Rx       = 26            ' Prop1 data from Prop2  
      Prop_Baud     = 115_200       ' for Prop1 <=> Prop2 comm. (AT 8.68 microsec/bit)
      PIC_Tx        = 4             ' Data to D/K board     
      PIC_Rx        = 5             ' Data from D/K board
      PIC_Baud      = 35714         ' D/K PIC16F871 with a 4 MHz xtal runs 35714 baud
    'TV parameter  (not enough pins or cogs left for VGA which uses 8 pins)
      #0, white, inverse, highlight, blue, magenta, green, orange, red ' text palette colors
    VAR
      long stack[noparse][[/noparse]200], DTarray[noparse][[/noparse]6], rxpin,  txpin, c, rxbyte, rxcheck, txbyte
      long key, addrReg, dataReg, dirReg, id, CmdStatus 
      long keyReg, LpTimer, SBPtReg, DisplayReg, CmdP2, LEDreg, Prop2Reg
      LONG frame[noparse][[/noparse]400]
      byte Lptest
    OBJ
      PICSer        : "FullDuplexSerial"         ' comm w/ the D/K board
      PropSer       : "FullDuplexSerial"         ' comm w/ the other Propeller, Prop2 
      Display       : "TV_text"                  ' debug w/monitor (13 lines of 40 char.)
      vp            : "Conduit"                  ' transfers data to/from PC, 1 cog
      qs            : "QuickSample"              ' captures INA, variables, 1 cog @20 MHz
    '  dbg           : "PASDebug"                 '<= Include for PASD Debugger 
    '****email lc**************************************************************************
    '  Prop#1: handles D/K, Prop#2, and p/o Pod i/f's, Command decoder, 5 MHz Prop#2 clock;
    '    both Props connect to a 'Pod' board; and displays debug info to a TV monitor.
    '****b55c1879**************************************************************************
    PUB Main  '|INAFrame[noparse][[/noparse]400]          ' Cog 0
      vp.register(qs.sampleINA(@frame,1)) 'sample INA w/ 1 cog up to 20 MHz (MUST BE COG 0)
      optional_configure_viewport
      vp.share(@key,@id) 'share memory from 'key' to 'id';   END of VP commands <<===  
      
      PropSer.start(Prop_Rx, Prop_Tx, %0000, Prop_Baud)     ' s/b Cog 1 (if NO VP or PASD)
      PICSer.start(PIC_Rx, PIC_Tx, %0000, PIC_Baud)         '  "  Cog 2
      Display.start(12)                                     '  "  Cog 3
    '  id := cognew(@DTbus,@DTarray[noparse][[/noparse]0])  ' this sets up the DTbus registers for the DTbus cog 
    '  id := cognew(@entry,@DTarray[noparse][[/noparse]0]) ' cog for DTbus R/Ws; Cog 3; PASD; CmdStatus=>StatAsm @ PAR
    '  id := dbg.start(31,30,@entry) ' for PASD debugger (NOTE:  need 'xxx.bin' file for PASD )
            
    {  InitProp1
      repeat  ' Main Loop    *********** deals with inputs from D/K, Prop#2 and Pod ***********
        DKif                        ' check if input from Display/Keypad board
        P2if                        ' check if input from Prop#2
        LoopTest                    ' check if DK or Prop#2 returns a loop test response
        }
    '*************************************************************************************
    PUB optional_configure_viewport
      vp.config(string("var:freq(unit=Hz,min=0,max=10000),io(bits=[noparse][[/noparse]all[noparse][[/noparse]0..29],30tx,31rx])"))
      vp.config(string("var:io,key,addrReg,dataReg,dirReg,id,CmdStatus")) ' show these VARs
      vp.config(string("lsa:view=io,timescale=100ns,trigger=io[noparse][[/noparse]7]f")) ' trig on A7 falling
      vp.config(string("edit:key(default=5,mode=text),CmdStatus(mode=text)"))
      vp.config(string("start:lsa"))
    '*************************************************************************************
    PUB LoopTest
                                                                                                    
    
    


    Notice that I uncommented some more of your code to be able to run your fragment.
    I also tweaked this item so that your bit group is properly named:
    bits=[noparse][[/noparse][noparse][[/noparse]0..29],30tx,31rx]
    so it now reads:
    bits=[noparse][[/noparse]all[noparse][[/noparse]0..29],30tx,31rx]

    See attached screenshot...
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
    781 x 461 - 55K
  • HarleyHarley Posts: 997
    edited 2010-03-06 01:17
    Thanks Hanno,

    I tried your suggestion, but didn't help. I looked in Configuration and it had a 'suggestion' of 'vp.config(string("start:dll"))' at the bottom pane. For some reason it says Viewport can't configure.

    I don't presently have a way to use the Internet with Windows (under Parallels on my iMac). So when I downloaded Viewport it came in by way of the iMac OS and then I moved the VP folder to the Windows desktop. That's always seemed to work for me. Hopefully some things don't get lost in the process.

    Might that 'vp.config(string("start:dll"))' line be needed?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • HannoHanno Posts: 1,130
    edited 2010-03-06 08:31
    Hi Harley,
    You've always had a slightly complex setup- with multiple Propellers and running ViewPort under emulation on a Mac- might be better to take this to email since I doubt others will learn much.... But, since we're here, a couple more ideas:
    - The VP application folder should be in "Program Files"- but I guess it could be anywhere.
    - When VP installs, it creates a "ViewPort" directory in your "My Documents" folder- with the included objects and tutorials. Are you sure you're using the objects from that directory?
    - As always, before trying exotic things, try a known good program from ViewPort to give me and you some confidence...
    - The code as I posted above works fine on my setup, and should work on yours- as long as you're using the right clock speed, good usb connection, and right object.
    - No- you don't need "vp.config(string("start:dll"))"- you want to start up in LSA mode, so you should use vp.config(string("start:lsa")) as I entered above.
    Hanno

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Co-author of the official Propeller Guide- available at Amazon
    Developer of ViewPort, the premier visual debugger for the Propeller (read the review here, thread here),
    12Blocks, the block-based programming environment (thread here)
    and PropScope, the multi-function USB oscilloscope/function generator/logic analyzer
  • HarleyHarley Posts: 997
    edited 2010-03-06 22:27
    Hanno,

    Will use the forum to 'close out' this problem. It must have been the 'nut behind the wheel' bug. I decided to Uninstall VP and moved another copy from the iMac OS side. Now Viewport runs.

    I tried the 4-bit counter example on a Protoboard and it didn't work. But did after the uninstall old/install new effort. Then I moved to the 2-Prop board and that ran finally. Seemed to take longer to load than I recall, but ran OK. Phew! I thought I was going crazy for a while with such happening.

    Thanks Hanno, once more. Would be lost without this tool and PASD to clear up problems/bugs. Another satisfied customer again. yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
Sign In or Register to comment.