Shop OBEX P1 Docs P2 Docs Learn Events
logic operators and debugging — Parallax Forums

logic operators and debugging

LudisLudis Posts: 69
edited 2009-03-01 23:10 in Propeller 1
New to the forums and the p8x32a. Not exaclty new to programming/micro controllers (intermediate)

I have two questions..

1) Is there a way to debug my propeller code?·say by defining all registers, i/o(s), and seeing the resulting code by stepping through (in the·editor)·line by line? I'm not seeing that in the propeller editor.

2) what exaclty do the >| and |< logic operations perform (if solo)?

Thanks for your help.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-03-01 22:51
    1) There are many ways to debug Propeller code. There's a debugger that's part of Viewport (sold by Parallax). You can use the programming port for serial I/O for debugging. You can attach an NTSC or PAL video monitor and display debugging information there. You can attach a VGA monitor and display debugging information there. You can also use a PS/2 keyboard to provide information for debugging. I've used combinations of all of these

    It's harder to debug assembly code since there's no way for one cog to directly control another. Generally, I've set up a text display using either video or VGA and written routines to "stuff" debug information into specific locations in the text buffer. There's also a Propeller simulator called GEAR that lets you watch the register contents while a program is running.

    2) "|<" is a unary operator that takes a bit number on the right and shifts a one bit left that number of bit positions (to make a bit-mask). The ">|" operator is well described in the Propeller Manual, page 266. Have a look at that. It essentially finds the left-most one bit in a number and returns the bit position of that (plus 1) or zero if no bits are set to one.
  • SRLMSRLM Posts: 5,045
    edited 2009-03-01 23:05
    For debugging, take a look at the propalyzer from Jazzed (http://forums.parallax.com/showthread.php?p=788230). I haven't had a chance to try it out yet, but it looks really nice.
  • LudisLudis Posts: 69
    edited 2009-03-01 23:10
    Mike, thanks. The propeller manual will be really helpful! I've been deciphering the p8x32a datasheet for the past month.

    I will also consider all the debugging options. I saw Viewport, but wanted to see the alternatives to debugging. GEAR may work! thanks again.

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