Any ideas for P2 demos?
cgracey
Posts: 14,155
in Propeller 2
What would be good to show the P2 doing? I'm trying to think of some things that it can do uniquely well, without a lot of effort and code. We need some vehicles for getting the idea across to the world.
Comments
-Flexible I/O mapping, something that hot swaps/auto detects and reconfigures could show this.
-Video generation VGA/composite/component/DVI - multiple simultaneous outputs
-DACs/ADCs on any pin
-High bandwidth streamer - eg. capture DVI parallel output in real time, or other logic analyser demo
-ADC scope modes
-Smartpin modes for serial transfers, clock generation, USB etc
-Multiple language environments, Forth/C/PASM/Spin2/Python
-High bandwidth memory transfers
-Real time guaranteed/deterministic code timing
How to bundle it all together in something that gets the full idea across is the real challenge.
Edit: Oh I and I forgot, the Goetzel and CORDIC stuff of course. Your finger sensing demo is good for that.
> Protracker clone.
That's the Amiga sound program, right?
We must find a sure way to interest young people. What would get their attention? I made a cool VGA text driver to test Spin2 on and it works great, but I think it might look hopelessly dated to younger people. We need to interest them somehow. How to get it across to them? I suppose the P2 ought to commune with their smart phone somehow.
I like the better tunes I have heard. And it is a really different way to think about music.
Signal generator demo? With stats, using that spiffy calculator Chip made. Freq % jitter / error, etc.
Scope mode plus logic analyzer? We have those. Running them together might wow people.
the Propeller 2 is easy, and writing Propeller 2 programs can be
easy too.
Adapt Sigrok "PulseView" and it's protocol decoders as a free tool
for students to use with the Propeller 2.
Combine Sigrok and a flexible standard library.
Bill M.
Perhaps Sigrok can open up more possibilities to students.
Sure, there are micros out there that can do some of that but I don't think any can juggle all that stuff in real-time.
One possibility is to have sigrok talk to a P2 board, and so allow P2 to become the Logic Analyser.
That is a code project.
> Some sort of graphics demo? I imagine one can blit many hundreds of 8bpp sprites with SETQ+WMLONG.
If font pixels were stored as bytes, that would be a very good way to write a font into 8bpp display memory.
It can't easily handle horizontal mirroring though. Vertical mirroring as well as vertical stretching and shearing, are easy.
Or an open-source smartwatch?
A standalone board design with USB host for a keyboard/mouse and an HDMI output, with an SD card for storage.
You could make the software for this to run on your existing demo board, but ultimately a Raspberry Pi Zero formfactor (Quickstart?) would be an ideal embodiment of the P2 for real users.
A bunch of I/O pins (Pi has 40 pins, you'd have USB, HDMI, SD, etc and still have pins leftover) and an on-board dev environment would make the system very usable.
The SD card could have a autoexec.bin or startup.bin containing a loadable program that the P2 could run, so people could deploy these after development is done.
The SD also bridges the interoperability gap.
No harm in putting an ESP32 on there as a Wifi bridge too, opens the opportunities up.
But you really need to write and show reference implementations of USB, HDMI, etc so people can get a foothold.
If you can dream it, you can get it on your cellphone. Is Bluetooth pairing still a nightmare even with 4.0?
A few ideas for a few different audiences...
Those destined to be engineers:
The idea is that, eventually, a select few ask how all this stuff actually works.
For that crowd, all you need is the simple things: an easy to install editor with commented example code that gets them started.
You aren't stating 200 MHz loud enough. TWO HUNDRED MHz, 8 CORES. 5 nanoseconds update rate of 60 I/O PINS at that speed.
There's the indie crowd:
Port plasma pong. But you can't call it that, because Atari hands out cease and desists like Halloween candy. Call it fluid table tennis.
Here is a simple website example (use the WASD keys).
http://anirudhjoshi.github.io/fluid_table_tennis/#
But the real version used mouse control and had sliders to tweak the physics and put objects down in the playfield.
I know CORDIC is up to the task here for fluid simulation. Interpolate for whatever grid size for rock-solid 60 fps.
There's the enthusiast crowd:
Honestly, you don't have to agree with the imagery in DOOM (I don't), but if you can port DOOM to the P2 and have it be playable, you can get in the tech news on every major website in the world. Note: it HAS to be DOOM, exactly. No "kind of looks like it". No tech demo. The FULL thing. Use the SD card and parse the WAD level files, and at least 8 MB of whatever RAM you need: SRAM, SDRAM, HyperRAM. You will be judged at how much better than a 486 your chip is, by a very technical crowd very familiar with every aspect of DOOM. I'd say port over Quake 1 but that would be "Impossible".
https://github.com/id-Software/DOOM
There's the kinesthetic crowd:
Some kind of crazy modular synthesizer.
Internal oscillators and an audio microphone and line input as well.
Some way of patching in and out effects graphically. (draw patch wires with mouse click and drag).
Save/load settings in bulk storage like SD.
Maybe doing something cool with Goertzel position sensing as a theremin that's more stable or can be calmed down (recalibrated) easily. Unfortunately requires specific hardware or instructions on making antenna system from a cardboard box or 3D printout or even legos. Not disappointing like the accessory board because it's too small. At least 5x5 inches (hand-sized).
Have the sounds in certain frequency ranges trigger on/off to certain effects (Goertzel again). Do the dumb auto-tune voice effect.
Do voice record/playback. Let us mess with the speed and otherwise filter and distort the audio. Hilarity ensues.
There's the internet meme crowd:
Control a ripoff version of Superman N64 "solve my maze" where you flop around and fly poorly in crude 3D, fighting the controls and getting severely punished for missing the rings you're supposed to fly through. Gain notoriety and offer the source code so people can "fix it" (break it further, actually). Do something awful like use an accelerometer (fall back to mouse and keyboard control) so the player is never totally in control.
Nyan cat was actually a very cool demo on P1, but that's too old now. Minimum is Playstation level (320x240x8 3D). Think of janky and grainy graphics of the PS1 era silent hill or twisted metal games.
Now that you have CORDIC, fast multiply, and high clock speed, texture mapping is entirely possible. Even without that special texel unit circuit that P2-hot had.
It actually only needs 4MB RAM on DOS, not sure how that translates to P2. (DOS Doom runs under DPMI, so I wonder if it uses/needs the bottom 640K at all? However, that doesn't include the 256K of VGA memory a DOS PC has. Altough IIRC it renders to a buffer in main RAM and then just blits that into VGA memory in a sortof triple-buffering setup - maps well to external RAM on P2, so we only need to keep one ~64K work buffer in Hub RAM. Also not sure what actually hogs the main memory - I'm thinking the majority is textures(most of them are pretty small, but IIRC all textures used for thing sprites (monsters,decoration,pickups,projectiles,explosions,etc), as well as menu graphics are loaded at all times, so they add up quickly), which are efficient and easy to load from external RAM (especially if a draw command queue is implemented, so texture fetching can happen in parallel with rendering). Level data on disk is in the <200K ballpark, but I think it shrinks a bit when loaded (since texture names get converted into short array indices. OTOH, a lot of other indices in the files get converted into pointers, so IDK))
P2 likey has way better raw integer performance on a single cog than ye olde 486, but as always, memory is in short supply.
It depends a bit on how much added hardware you are prepared to add, for the demo to work ?
eg This stepper motor driver (18V/2A) has a 25MHz SPI link, as well as Step/Dirn and microstepping.
The Link takes a 32b word, and seems to have 10b quadrature DACs, so could support ROM calibration of motors.
Voltmeters & Frequency counters are easy to do with a basic P2, and a Signal Generator is a means to verify those work.
It would be nice to see some DAC Signal Generator measurements, around noise floor and distortion.
Adding a Stereo Audio Codec, should allow a higher performance Audio tester.
I also saw new parts added to Alps linear position sensors - they have dual-wiper 360' models, and linear models to 40mm, plus high rating models (price goes up, of course)
Yes, I think motor control could be really good to demonstrate. It does require some hardware to show, though. I wonder if we could demonstrate some motion control concepts which have important application, but could be done with some simple, small motor/encoder hardware. Something that would obviously scale up to much bigger power. We could have live (even 3D) graphics to show the system metrics during operation. Kind of like a control system and specialized oscilloscope, all in one.
Chip, Ken,
A "winding machine".
Something that probably any other microcontroller can do (P1). And something that will not make P2 stressed at all. But I think that P2 has some special features that will made it very simple (like smartpins modes and CORDIC).
It is also something that probably Parallax can sell as Kit, as I think that all main components (IR Sensors, motor, servo, ...) are already on current Parallax shop website.
Applications: (What can you do with an coil winding machine?)
Make/Repair a speaker coil :
Guitar coil/pickup :
Inductor/Coil :
Solenoid Motor coil :
Added below some Winding Machine examples (some of them very ingenious) with a brief description of interesting design concepts:
A very nice project ( ) with:
OLED display and rotary encoder (0:26s-0:35),
Winding control with Motor and Screw guides reused from old DVD (1:37s-1:43s)
wire guiding tool made from a screw (2:17s -3:45)
IR encoder used to count turns (10:11s - 10:45s)
(another use for that Sharp GP2A25J0000F sensor that parallax has put on early Spring cleaning area just days ago)
Similar concept :
In this project, the first minute shows how a simple switch is used to reverse winding direction:
On this one, second 45 shows how a servo is used to reverse winding direction:
Another video that shows a servo to control winding motion control. Also possible application of CORDIC engine (look nice coil at the end) :
This is some good imagineering. A motor controller with a built-in useful display...something better than what I'm currently working with:
I put them on to the YouTube videos of the Peavey AT-200 and they were gobsmacked. Even more so that the product had been dropped.
Hex piezo pickups are readily available and are attached to any guitar via a velcro strip.
A P2-based kit that could be attached to any guitar would be very popular and a great vehicle for publicising the P2.
Auto-tune is only one feature. There are many, many possibilities that can be instantly activated via footswitches or alternatively by plucking the appropriate string/fret whilst depressing a button on the guitar. Listing attached.
If I had the ability, I'd be all over this. I have been playing for 46 years, fallen for all the expensive BS such as "tone woods" and "warm, creamy, buttery" tube amps.
Dumped all of that horse hooey but I'm keeping my 3 Auto-tune guitars 👍
https://forums.parallax.com/discussion/101493/project-openstomp-tm-coyote-1-guitar-effects-pedal/p1
I'm thinking delay with the built in A/D and D/A with some HyperRam would bring parts count down, (minus some filtering).
Voice transformer
Sing along pitch corrector. On this one, do something silly like, "Mary had a little lamb", and no matter what they try to sing, it's "Mary had a little lamb" (in terms of pitch, not diction)