Propeller 2 Logic Analyzer

Hi All
Here's my latest version of the P2 logic analyser I've been tinkering with.
I have found it very useful for testing and diagnosis of the smartpins.
Included is a Windows app for capturing the video images produced by the LA.
Just drop your code at the end of the source, configure the trace labels and run the code.
The demo includes some test code that runs a few smartpins in different modes.
The four pushbuttons on the A9 board are used to control pan, zoom etc.
The blue labels on the bottom left of screen show the current function.
Use the mode key to cycle through the available functions.
The LA currently only works with PortA P0-P31.
Take a Look at my "test code" at the end of the source to see how the LA is configured.
Hope you folks find it as useful as I have.

As an aside, I'm a bit saddened to see design by committee occurring here. I now see USB periphericals and support, and so on, to be added. All I want is a 16 core design like the P1, only more fast, with the specs as promissed. USB is a broken standard, anyway. Any micros that had USB, I had to give up using them. For instance, the Microchip USB stack is a pain to implement and won't fit in a 32KB micro without optimization. I just don't want to see the same occurring here. A bad, broken feature is worse than none. To finish, the Propeller, as is, is beautiful for its simplicity. At first, the only think I didn't like was the lack of interrupts. But that turned out to be a plus.

@Rayman
Currently when the "test code" is started it's results are sent to the PC.
You can send a "capture" to the PC at any time using the "GRAB" function.
I modified the LA to send a screen grab on any button press.
This way you can operate the LA without a VGA monitor connected.
A slight delay from button press to PC update is the only downside.
Hope that helps.

As an aside, I'm a bit saddened to see design by committee occurring here. I now see USB periphericals and support, and so on, to be added. All I want is a 16 core design like the P1, only more fast, with the specs as promissed. USB is a broken standard, anyway. Any micros that had USB, I had to give up using them. For instance, the Microchip USB stack is a pain to implement and won't fit in a 32KB micro without optimization. I just don't want to see the same occurring here. A bad, broken feature is worse than none. To finish, the Propeller, as is, is beautiful for its simplicity. At first, the only think I didn't like was the lack of interrupts. But that turned out to be a plus.

What we implemented for USB is just the wire-level protocol without the CRC. It can be used as a communication link, without the USB baggage, if you wanted.

Any micros that had USB, I had to give up using them. For instance, the Microchip USB stack is a pain to implement and won't fit in a 32KB micro without optimization. I just don't want to see the same occurring here. A bad, broken feature is worse than none.

Yet others somehow manage to ship working products ?
Silabs, for example, have a ~1.5kB USB Bootloader, so I would expect a P2 to do 'useful work', inside one COG.

For keyboard and mice, I've read there is something called "boot protocol".
This looks to be very straightforward and relatively simple.
This is what lets new PC's BIOS use keyboards and mice for setup...

Too bad. No wonder why most promising projects die before launch. Well, a camel is a horse designed my committee. The word "committee" is also designed by "committee". To many 'm's, and 't's, and 'e's.

..and yet there are billions? of USB chips out there ?
The level of perceived design elegance is immaterial - the fact it is a standard serial link, is what is important.

Within the "millions" you give, only an uncertain small percentage is USB compliant. The others don't make it. If you were manager of Parallax, were you willing to pay dozens of thousands for the compliance testing of a secondary feature? Stick a USB brigde on the PCB and it is done. Remember that the goal of the P2 is to have 16 cores working at 200MIPS. ADCs and DACs are welcome if you want to compete with PSOC chips, like cortex M0 and M4. Adding USB is a great step, but may be a disaster in the making. If you want more speed, just use a CP2130 SPI bridge, or some other SPI bridge capable of 20MBaud operation.

Yet others somehow manage to ship working products ?
Silabs, for example, have a ~1.5kB USB Bootloader, so I would expect a P2 to do 'useful work', inside one COG.

So, you did referred a working example, but you didn't mentioned a chip at all. So, what would be the example of a micro-controller? Perhaps the Gecko, that has a Cortex-Mx in it, a design fully tested, a well paid IP, functional out of the box, that has native USB support?

So, since I mentioned those points in quotes, and counter-argued them, my reasoning is that the P2 might not get out the design stage because of a vampiric little feature such as USB. Anyways, I would dispense USB from my applications. For instance, a PLC can live well without USB, but ADCs are necessary for reading sensors. I can't imagine an application where USB is indispensable, unless you are planning to build a PC or something.

As an aside, I'm a bit saddened to see design by committee occurring here. I now see USB periphericals and support, and so on, to be added. All I want is a 16 core design like the P1, only more fast, with the specs as promissed. USB is a broken standard, anyway. Any micros that had USB, I had to give up using them. For instance, the Microchip USB stack is a pain to implement and won't fit in a 32KB micro without optimization. I just don't want to see the same occurring here. A bad, broken feature is worse than none. To finish, the Propeller, as is, is beautiful for its simplicity. At first, the only think I didn't like was the lack of interrupts. But that turned out to be a plus.

What we implemented for USB is just the wire-level protocol without the CRC. It can be used as a communication link, without the USB baggage, if you wanted.

Hi Chip,

Good to hear that USB is over with. It is always nice to keep it simple.

I'm all interested in the sheer processing power of this micro. That and the ease of programming that makes it attractive. Added peripherals on board for those who wish will take care of custom specifications.

Yet others somehow manage to ship working products ?
Silabs, for example, have a ~1.5kB USB Bootloader, so I would expect a P2 to do 'useful work', inside one COG.

So, you did referred a working example, but you didn't mentioned a chip at all. So, what would be the example of a micro-controller? Perhaps the Gecko, that has a Cortex-Mx in it, a design fully tested, a well paid IP, functional out of the box, that has native USB support?

Sorry for the lack of detail, I was thinking of the EFM8UB1, an 8 bit MCU, ~ 60c/1k
AN945 gives sizes on their UART/i2c/USB HID boot loaders. sub 512 bytes for each of UART & i2c choices and sub 1.5k for USB HID.

Not sure what you mean by 'native' but yes, it has a USB peripheral, but note that still requires quite a lot of code, 3x relative to UART or i2c.
The P2 USB in Pin-cell could also be called native, as it manages the bit level work, and stuff/destuff, leaving the byte level work to the user.
There will be more timing care, but the COG nature of P2 makes that easier to manage.

@Rayman
Currently when the "test code" is started it's results are sent to the PC.
You can send a "capture" to the PC at any time using the "GRAB" function.
I modified the LA to send a screen grab on any button press.
This way you can operate the LA without a VGA monitor connected.
A slight delay from button press to PC update is the only downside.
Hope that helps.

Brian, I'd like to get this running to see what it can do. I don't have VGA on my P2D2, nor the buttons (at least not wired anyway).
It might be better for me to extend this rather than build my own

How does the VGA screen capture work and what is sent to the PC? ie how do I display it on the PC?
(there is a lot of code there and I am just being lazy in not delving into it deeply to understand what is happening)

Ray
My TODO list includes updating this code to P2 silicon.
It's been a while since I played with this code and I have a PC utility that goes with it too.
I hope to revive this project tomorrow, I need it too!

What switches, buttons, etc are required as I will build them?
Also what will I need for the VGA connection (presume RGB + HS + VS = 5 pins + GND) and what order and preferred pins? Presume no external resistors required.

Update:
The code has been hacked about as the FPGA images evolved.
The button support broke when one of the buttons became a hardware reset.
It also used to support rotary encoders for pan/zoom but that won't work on silicon Rev A.

The PC utility for the LA gives remote control anyways so you can use it without buttons, VGA if you want to.
I've got up and running now, just need to tidy up a few loose ends and we should be good to go.

DAC0 can drive the DAC's of all pins numbered %XXXX00.
DAC1 can drive the DAC's of all pins numbered %XXXX01.
DAC2 can drive the DAC's of all pins numbered %XXXX10.
DAC3 can drive the DAC's of all pins numbered %XXXX11.