Shop OBEX P1 Docs P2 Docs Learn Events
Propeller 2 Assembly Language beginner guide v0.1 - Page 2 — Parallax Forums

Propeller 2 Assembly Language beginner guide v0.1

2»

Comments

  • @evanh

    Thank you

  • proppyproppy Posts: 48
    edited 2026-05-24 02:40

    Holy moly! I've been away for a bit but wow, thanks everybody for the out pouring!

    @"Christof Eb." said:
    Hi @proppy !
    this is a nice effort, thank you!

    I wonder, if some example of an inline section of propeller asm would be helpful. I think, most people will want to start with rather tiny routines embedded in some other high level code to have maximum speed there.

    Christof

    Hi @"Christof Eb." . Let me look into it. Honestly, bridging that gap might be pretty helpful for Spin2 at the very least.

    @pilot0315 said:
    @proppy

    I too will be headed to the print shop.
    Thank you for this effort.
    When do you think the examples and maybe some videos will be on github??
    Martin

    Hi @pilot0315.

    The examples should be on the github for all the examples in the manual. I started doing TikTok for the videos. Right now it's just text videos but the idea is to get some TikTok videos of the terminal/explaining code via TikTok Live. It allows me to clip stuff so I could make videos as well as run Live code cast.
    https://www.tiktok.com/@p2assembly

    @pilot0315 said:
    @proppy
    I assume that I can bleed some of this over to Pasm??
    Thank you and Evan.
    Martin

    Mostly, the only differences are in the way the cogs work between them, smart pins, hub access speed, etc. I may circle around

  • pilot0315pilot0315 Posts: 1,002
    edited 2026-05-24 04:59

    @proppy

    Thanks I will go back to github and look again. Found them on github. Tried the first one to print and then add. On propeller tool and on spin tools. Neither gives me anything. Checked the baudrate and even changed it 115200 just for giggles and got nothing.
    Using p2 eval rev b and c. Will try one of my edge devices and let you know.
    Thanks
    I checked the copy paste line by line.
    Martin

  • @pilot0315 said:
    @proppy

    Thanks I will go back to github and look again. Found them on github. Tried the first one to print and then add. On propeller tool and on spin tools. Neither gives me anything. Checked the baudrate and even changed it 115200 just for giggles and got nothing.
    Using p2 eval rev b and c. Will try one of my edge devices and let you know.
    Thanks
    I checked the copy paste line by line.
    Martin

    I had upgraded the example a bit ago. A few folks pointed out the same. I added jmp #$ and tested on a few setups other than FlexProp, which originally had zero issues. Let me know, at this point I'm just making vids so things have slowed down a bit and it's mostly just edits on the manual itself and including the suggestions. Thank you so much!

  • Thanks @proppy
    Martin I will let you know.

  • @proppy

    'print_character.spin2
    CON
    _CLKFREQ = 180_000_000
    BAUD_RATE = 2_000_000
    TRANSMISSION_PIN = 62
    BIT_PERIOD = (_CLKFREQ / BAUD_RATE)
    BAUD_MODE = (BIT_PERIOD << 16) | (8 - 1)

    DAT
    org 0
    asmclk

    dirl #TRANSMISSION_PIN
    wrpin ##(P_ASYNC_TX | P_OE), #TRANSMISSION_PIN
    wxpin ##BAUD_MODE, #TRANSMISSION_PIN
    dirh #TRANSMISSION_PIN
    wypin #1, #TRANSMISSION_PIN

    mov character, #"A"
    wypin character, #TRANSMISSION_PIN

    endprog
    jmp #$

    character res 1

    String:

    'send_string.spin2

    both files say last month.
    Tried in Pnut53 get lost hardware.
    Tested with Pnut 53 examples no issues.

    Tried also on Propeller tool and blank screen as well as Spin Tools ide.
    ????????????

    Tested all with existing code and they work.

    Sorry to bother you.
    Martin

    BTW. The book you wrote as I keep reading I really understand that is the great part.

  • proppyproppy Posts: 48
    edited 2026-05-26 22:15

    @pilot0315 said:
    @proppy
    Sorry to bother you.
    Martin

    BTW. The book you wrote as I keep reading I really understand that is the great part.

    It's not a bother at all really. I have been told I need to make sure things work across the board before. :) And thank you for the compliment.

    I tried the code under Spin Tools IDE, it works. I also tried it under FlexProp and it seemed to work as well. I am using the P2 edge setup. Is your Parallax Serial Terminal set to 2000000 by chance? The baud rate in the code is set to 2_000_000. The terminal should be set the same. I included a screenshot.

    Feel free to include screenshots. :) Also, can you describe your setup? Win, Linux, Mac? Emulator like WINE?

    EDIT: Also can you try the following? It has a waitx after the smartpin startup. I set the baud rate to 115_200, a much lower rate, just to test something I thought of.:

    CON
        _CLKFREQ = 180_000_000
        TRANSMISSION_PIN = 62
        BAUD_RATE  = 115_200
        BAUD_MODE = ((_CLKFREQ / BAUD_RATE) << 16) | (8 - 1)
    
    DAT
            org     0
            asmclk
    
            dirl   #TRANSMISSION_PIN
            wrpin  ##(P_ASYNC_TX | P_OE), #TRANSMISSION_PIN
            wxpin  ##BAUD_MODE, #TRANSMISSION_PIN
            dirh   #TRANSMISSION_PIN
    
            waitx ##10_000_000
    
    
            wypin  #"A", #TRANSMISSION_PIN
    
            jmp    #$
    
Sign In or Register to comment.