Shop OBEX P1 Docs P2 Docs Learn Events
Terminal not working (debug) — Parallax Forums

Terminal not working (debug)

JkaneJkane Posts: 113
edited 2015-01-10 14:36 in Propeller 1
Hello,

I having trouble with a pcb board,

the circuit is the same as the one in the propeller education kit, page 27,

I checked all the grounds, power and pins, all connections seem good,

the propeller plug, connects fine, the board is found and you can download and run verify code to eeprom and ram, all works fine,

I am running the Parallel Terminal Serial demo, but I get no output back to the debug window,

I can run the update status and view info, all looks good, but no output, It is as if the propeller chip is not running and I don't really know what to check.

I also have the propeller education board completed, it works fine, and i check all the power, ohms and grounds and all seems the same.

so I missed something and i don't know what I can check to validate what is going on.

thanks

Jeff

Comments

  • tomcrawfordtomcrawford Posts: 1,126
    edited 2015-01-08 09:56
    Terminal set up for the right COM port? Baud rate correct?

    Edit: Also check the crystal. You can blink a led at, say, 1 HZ, to make sure the crystal is right frequency.
  • JkaneJkane Posts: 113
    edited 2015-01-08 12:39
    Hello,

    I set up this for pin 6, first thing the code does, and the light does not blink, sadness

    dira[6] := 1

    repeat
    outa[6] := 1
    waitcnt(clkfreq*2 + cnt)
    outa[6] := 0
    waitcnt(clkfreq*2 + cnt)
  • Heater.Heater. Posts: 21,230
    edited 2015-01-08 13:04
    If you can download code to the Propeller successfully then at least the Propeller is working.

    After that we need to see your schematics, and code, and perhaps pictures of your final layout to see what is happening.
  • tomcrawfordtomcrawford Posts: 1,126
    edited 2015-01-08 13:05
    Jkane wrote: »
    Hello,

    I set up this for pin 6, first thing the code does, and the light does not blink, sadness

    dira[6] := 1

    repeat
    outa[6] := 1
    waitcnt(clkfreq*2 + cnt)
    outa[6] := 0
    waitcnt(clkfreq*2 + cnt)

    Everything below the repeat *IS* indented, yes? I see it is, in the quotes. That certainly should blink a LED, 2 seconds on, two seconds off.

    Do you have an oscilloscope? or a meter?
  • JkaneJkane Posts: 113
    edited 2015-01-08 15:41
    Everything below the repeat *IS* indented, yes? I see it is, in the quotes. That certainly should blink a LED, 2 seconds on, two seconds off.

    Do you have an oscilloscope? or a meter?

    Yes, I have both and a logic analyzer.

    Jeff
  • tomcrawfordtomcrawford Posts: 1,126
    edited 2015-01-08 17:17
    I'd say look at the crystal with your 'scope, and then, as Heater sez, post it all. Schematics, code, and especially photos.
  • JkaneJkane Posts: 113
    edited 2015-01-09 04:32
    I'd say look at the crystal with your 'scope, and then, as Heater sez, post it all. Schematics, code, and especially photos.

    Hello,

    I checked the crystal, not working, so I have to replace it, but just in case it is not that, here is the code and schematics for the board
    {{
    ┌────────────────────────────────────┐
    │ Parallax Serial Terminal Demo v1.0 │
    │ Author: Jeff Martin                │                     
    │ Copyright (c) 2009 Parallax Inc.   │                     
    │ See end of file for terms of use.  │                      
    └────────────────────────────────────┘
    
    Demonstration of various handy features of the Parallax Serial Terminal (object and software).  The Parallax Serial
    Terminal software is included with the Propeller Tool installer (v1.2.6 or newer) and provides a simple serial-based
    interface to the Propeller chip.  Typically this is done over the programming connection but may use other I/O pins
    if desired.
    
    How to use:
    
     o Run the Parallax Serial Terminal (included with the Propeller Tool) and set it to the connected Propeller
       chip's COM Port with a baud rate of 115200.
     o In the Propeller Tool, press the F10 (or F11) key to compile and load the code.
     o Immediately click the Parallax Serial Terminal's Enable button.  Do not wait until the program is finished
       downloading.
    }}
    
    CON
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
    CON
      ColPos = 8  
    
    OBJ
      pst   :       "Parallax Serial Terminal"
       LCD  :  "FDS2"  
    
    PUB Main | value, base, width, offset
    
    {
      dira[4] := 1 
      repeat
        outa[4] := 1
        waitcnt(clkfreq*2 + cnt)
        outa[4] := 0
        waitcnt(clkfreq*2 + cnt)  
        
     }
    
      pst.Start(115_200)                                                            'Set Parallax Serial Terminal to 115200 baud
    
    
      '-------- Demo 1 --------
      pst.Str(@DemoHeader)                                                          'Print header; uses string in DAT section.
      pst.Chars("-", strsize(@DemoHeader))                                          'Use Chars method to output hyphens "-"
      pst.Str(String(pst#NL, pst#NL, "*** Number Feedback Example ***"))
      repeat
        pst.Chars(pst#NL, 3)                                                        'Output multiple new lines
        pst.Str(String("Enter a decimal value : "))                                  'Prompt user to enter a number; uses immediate string.
        value := pst.DecIn                                                          'Get number (in decimal).
        pst.Str(String(pst#NL, "Your value is..."))                                 'Announce output
        pst.Str(String(pst#NL, " (Decimal):"))                                      'In decimal
        pst.PositionX(16)                                                           'Move cursor to column 16
        pst.Dec(value)
        pst.Str(String(pst#NL, " (Hexadecimal):", pst#PX, 16))                      'In hexadecimal.  We used PX control code to
        pst.Hex(value, 8)                                                           '  move cursor (alternative to PositionX method).
        pst.Str(String(pst#NL, " (Binary):"))                                       'In binary.
        pst.MoveRight(6)                                                            'Used MoveRight to move cursor (alternative
        pst.Bin(value, 32)                                                          '  to features used above).
        pst.Str(String(pst#NL, pst#NL, "Try again? (Y/N):"))                        'Prompt to repeat
        value := pst.CharIn
      while (value == "Y") or (value == "y")                                        'Loop back if desired
    
    
      '-------- Demo 2 --------
      repeat
        pst.Clear                                                                   'Clear screen
        pst.Str(@DemoHeader)                                                        'Print header.
        pst.Chars("-", strsize(@DemoHeader))                                        'Use Chars method to output hyphens "-"
        pst.Str(String(pst#NL, pst#NL, "*** Pseudo-Random Number Example ***"))    
        pst.Chars(pst#NL, 2)                                                        'Output multiple new lines
        pst.Str(String("Enter 'seed' value: "))                                     'Prompt for seed value
        value := pst.DecIn                                                          
        pst.Str(String(pst#NL, "Display decimal, hexadecimal, or binary? (D/H/B)")) 'Prompt for base size
        base := pst.CharIn
        pst.Str(@RandomHeader)                                                      'Output table header
        pst.Dec(value)
        base := lookdownz(base & %11011111: "B", "H", "D") <# 2                     'Convert base to number (B=0, H=1, else = 2)
        offset := ColPos + 4 + width := lookupz(base: 32, 8, 11)                    'Calculate column offset and field width
        pst.Chars(pst#NL, 2)                                                        'New lines
        pst.PositionX(ColPos)                                                       'Position and display first column heading
        pst.Str(@Forward)
        pst.PositionX(offset)                                                       'Position and display second column heading
        pst.Str(@Backward)
        pst.NewLine                                                                 'Draw underlines
        pst.PositionX(ColPos)
        pst.Chars("-", width)
        pst.PositionX(offset)
        pst.Chars("-", width)
        pst.NewLine
         
        'Pseudo-Random Number (Forward)
        repeat 10                                                                   
          waitcnt(clkfreq / 6 + cnt)                                                'Wait 1/6 second
          pst.PositionX(ColPos)                                                     'Position to first column
          ?value                                                                    'Generate random number forward
          case base                                                                 'Output in binary, hexadecimal, or decimal
            0: pst.Bin(value, width) {binary}                                       
            1: pst.Hex(value, width) {hex}
            2: pst.Dec(value)        {decimal}
          pst.MoveDown(1)                                                           'Move to next line
         
        'Pseudo-Random Number (Backward)
        repeat 10
          waitcnt(clkfreq / 6 + cnt)                                                'Wait 1/6 second                          
          pst.MoveUp(1)                                                             'Move to previous line                    
          pst.PositionX(offset)                                                     'Position to second column                
          case base                                                                 'Output in binary, hexadecimal, or decimal
            0: pst.Bin(value, width) {binary}                                                                                 
            1: pst.Hex(value, width) {hex}                                                                                    
            2: pst.Dec(value)        {decimal}                                                                                
          value?                                                                    'Generate random number backward
              
        pst.Position(0, 23)                                                         'Position below table
        pst.Str(String("Try again? (Y/N):"))                                        'Prompt to repeat
        value := pst.CharIn
      while (value == "Y") or (value == "y")                                        'Loop back if desired
    
      pst.Clear
      pst.Str(String("Thanks for playing."))  
      
    DAT
    
    DemoHeader    byte "Parallax Serial Terminal Demonstration", pst#NL, 0
    RandomHeader  byte pst#NL, pst#NL, "Pseudo-Random Numbers Generated by Seed Value ", 0
    Forward       byte "Forward", 0
    Backward      byte "Backward", 0
    
      
    {{
    &#9484;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9488;
    &#9474;                                                   TERMS OF USE: MIT License                                                  &#9474;                                                            
    &#9500;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9508;
    &#9474;Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation    &#9474; 
    &#9474;files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,    &#9474;
    &#9474;modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software&#9474;
    &#9474;is furnished to do so, subject to the following conditions:                                                                   &#9474;
    &#9474;                                                                                                                              &#9474;
    &#9474;The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.&#9474;
    &#9474;                                                                                                                              &#9474;
    &#9474;THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE          &#9474;
    &#9474;WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR         &#9474;
    &#9474;COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,   &#9474;
    &#9474;ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                         &#9474;
    &#9492;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9496;
    }}    
    
    

    regards

    Jeff
    960 x 541 - 305K
  • PublisonPublison Posts: 12,366
    edited 2015-01-09 04:44
    You will need to get rid of capacitor (C5) across the crystal. It is not needed and probably preventing the proper operation of the crystal.
  • PublisonPublison Posts: 12,366
    edited 2015-01-09 04:47
    Also, C6 is not enough to take care of both power and ground connections on the Prop. You need another on the bottom side power connection. Without the proper bypass conection, it is possible to fry the PLL on the Prop, which would also make the crystal not work.
  • JkaneJkane Posts: 113
    edited 2015-01-09 06:37
    Publison wrote: »
    Also, C6 is not enough to take care of both power and ground connections on the Prop. You need another on the bottom side power connection. Without the proper bypass conection, it is possible to fry the PLL on the Prop, which would also make the crystal not work.

    Yes, removing c5, it now works, as far as C6, I guess a C 104 is two small, any suggestions

    thanks for you help,

    regards

    Jeff
  • PublisonPublison Posts: 12,366
    edited 2015-01-09 07:43
  • tomcrawfordtomcrawford Posts: 1,126
    edited 2015-01-09 08:51
    I see you are supplying your 3.3V regulator directly from 12V. That means it is dropping nearly 9 volts. If you are running all 8 cogs, the Prop chip can draw 70 or more mA. That means 600+ mW in the regulator. If you haven't already done so, you need to carefully evaluate the thermal issue.

    Edit: The Connection Diagram on page 8 of the Prop DataSheet does not show any bypass caps. I would have thought that something so important would have been covered there. Bypassing *is* covered in the Prop Education Kit Labs book, but in what seems to me to be an afterthought (after the I/O pins are tested).
    Bypassing *has* been covered in the forum (Publison points to one of Mike Green's excellent discussions), AND good practice does dictate good power bypassing. Nevertheless, I think the official Parallax documentation is remiss in not covering it. In My Opinion.
  • JkaneJkane Posts: 113
    edited 2015-01-09 09:32
    I see you are supplying your 3.3V regulator directly from 12V. That means it is dropping nearly 9 volts. If you are running all 8 cogs, the Prop chip can draw 70 or more mA. That means 600+ mW in the regulator. If you haven't already done so, you need to carefully evaluate the thermal issue.

    ok, this board is a HCI (or will be) board, so it will probably run 4-5 cogs, I'll modify it and add note two suggested capacators. when I add all the code and have it running, I'll temp check it. I could lower the spec to 7 volts (using the propeller wall power supply), but let me finish up with what i got and I'll get back.

    thanks for the help

    regards

    Jeff
  • PublisonPublison Posts: 12,366
    edited 2015-01-09 10:21
    Jeff,

    You may be able to include a Cap on the back of the board very easily. (between Pins 9 and 12).
  • Cluso99Cluso99 Posts: 18,069
    edited 2015-01-10 14:36
    A few suggestions...

    Either rotate the prop 180 degrees (because all the pins are coming out the other end)

    Currently you have a 4 layer pcb. You should be able to do this in a 2 layer pcb. ( I am presuming this is a hobby board).

    Preferably a 100nF bypass for the eeprom.

    For your power LED use a 3K3 or larger - saves current and most superbright LEDs work fine with this. Consider adding another LED & resistor with the + end terminated in a pin - nice to be able to connect to any prop pin for simple debugging.



    For excellent bypass for the prop, if you are using a socket for the prop, you can place a 100nF and a 1-10uF inside the socket opening directly across the power/ground pins for the prop. Both sets of power and both sets of ground (plus BOE) should go directly across between their pins.

    When using a switch for reset, would be preferable to have a 10K pullup.

    While it is not necessary the way the prop works, 10K pullups on both SDA and SCL lines (P29 & P28) are preferred.

    Consider putting the transistor reset circuit on your board with a link to enable or bypass it. This permits you using a cheap USB-TTL module instead of the PropPlug. (BTW relabel it PropPlug). Consider adding 5V connector making a 5th pin for PropPlug (I place this above the GND connection and a NC the opposite end, making a 6 pin connector where the PropPlug uses the center 4 pins. This permits you using the 5V from USB provided by most USB-TTL modules. Provide a link to select 5V from USB or your 5V regulator, and conect the 3v3 regulator to the 5V output.

    As has been said, no cap across the xtal is required.
    BTW 12V in is typically too high. 7-9VDC is much better (or 5V from the USB)
Sign In or Register to comment.