Shop OBEX P1 Docs P2 Docs Learn Events
Spin2 Code Generator (Work in Progress, most things working) — Parallax Forums

Spin2 Code Generator (Work in Progress, most things working)

RaymanRayman Posts: 13,959
edited 2023-07-06 20:12 in Propeller 2

P2S is a program to automatically generate Spin2 code for you.
It's a conversion of the P2C C code generator from C to Spin2.
Wasn't sure would work, but so far seems OK.

Most objects are working at the moment:
uSD
SimpleVGA
NeoPixel
I2C bus scanner
NCO
Sound
Servo
SmartPin
Global Digital Filters
DAC
ADC

The others need a few more hours of work to convert from C to Spin2, if don't run into any issues...

Note: Max file size seems to have decreased... The .zip version is too big now, but just fits with 7-Zip.
Update: Sound and servo now working.

Comments

  • RaymanRayman Posts: 13,959

    broke vga trying to make file smaller, but just posted fixed version...

  • RaymanRayman Posts: 13,959

    Got sound and servo objects working...

  • RaymanRayman Posts: 13,959

    got smarpins, DAC, and ADC working. Not sure if ADC from neighboring pins is working or not though....

  • @Rayman this is a handy little tool! I was checking it out because I was hoping to convert some C code to spin2 with it, but now I see how the tool is used. It doesn't appear to be that, but I really like it! Especially for the smartpins!

  • RaymanRayman Posts: 13,959

    Thanks for trying it @ke4pjw !
    Feedback is some motivation for completing it...

    It can't convert C to Spin2, but it can do the same things in C and Spin2 with P2C for C and P2S for Spin2. So, I guess that could interesting.

    Actually use P2C and P2S myself sometimes, when want to test some hardware fast without digging through all my files...

Sign In or Register to comment.