Streamer for digital pin sampling
Cluso99
Posts: 18,069
in Propeller 2
I would like to use the P2 streamer to sample I/O pins and am not sure where to start.
I have a separate cog that will wait for a que to log a sample of pins.
What i need to understand is how to setup the streamer to read 'n' samples of pins, where these samples will be saved, and if I can save a group of pins.
Can I sample P0-P31 (a long) each clock?
Is there any sample code to look at?
I have a separate cog that will wait for a que to log a sample of pins.
What i need to understand is how to setup the streamer to read 'n' samples of pins, where these samples will be saved, and if I can save a group of pins.
Can I sample P0-P31 (a long) each clock?
Is there any sample code to look at?
Comments
Have a look at my P2 logic analyzer, it should help.
https://forums.parallax.com/discussion/163967/p123-a9-prop2-logic-analyzer
I often just want to see what is happening on a group of pins. I can easily set something to start the sample off, and let it run for 'x' samples.
Hopefully it samples on every clock. I presume this is possible?
I expected the streamer part to be way more complex to setup. Should get some time to try it today.
Thanks Chip. Similar to P1 timer setup
Using the streamer in writing pins to hub, if I just want to write 8 pins, I use WRBYTE.
The docs seem to imply that a byte is written to hub on every NCO rollover.
Does the hub address increment by 1 for each wrbyte?
And if I am streaming every clock, will the streamer/fifo pack the bytes up where necessary as the hub window is 8 clocks and each clock the window advances by a long address?
If I want to change the buffer during the screen display, do I need to insert an FBLOCK instruction (D[31]=0) in between one of the line displays? Will it store the new values ready for the RDFAST count expiration?
eg At the start of the visible lines, execute an FBLOCK ##blockcount,##hubaddr and halfway thru the visible lines, execute another FBLOCK ##blockcount,##hubaddr2 where blockcount= 1080 /2 /64 /2 = 135/32 ??
I want to build the 1080 screen into sections - part graphics and part text. I want the whole 512KB HUB for screen buffer, so I will need to load up cogs/luts first, then clear hub for the buffer.
This is the "FUN" that we all love
And it's testing out the P2 in different ways.
Anyone have it working in byte/nibble/nit modes?
Does the 'solved' above merely avoid this bug ?
Not sure, but the streamer is getting a big makeover. I'll need to recreate exactly what the problem was. It needs to be known for the current silicon.
Hope to combine my sampler with my VGA today. Wish me luck
There's another one, I believe, that has to do with WFBYTE 1/2/4-bit modes and count LSBs in D[2:0].