Ozpropdev et al.

cgracey wrote: »
If you set up RDFAST or WRFAST, you can move data between cog and hub with a single instruction for each long. With the streamer, you can move data between pins and hub. And there are those SETQ/SETQ2-RDLONG/WRLONG combos that can move longs between cog/lut and hub on every clock.

I have been on hiatus. We finally sold a building that stored some medical equipment, which left me packing and then driving a uhaul truck to Las Vegas.
Just before leaving I destroyed one of my P123 boards, and just after arriving I think I have found a use for Parallax's remaining stock:)

So if you guys are thinking of ordering another P123, get to it before they are gone:)

BUT THAT'S NOT THE PURPOSE OF THIS THREAD>

My understanding is that the streamer can be used to transfer pin states to Hub Ram at a given frequency... I don't know how many pins or how to go about setting it up.

Having watched Chip work, I suspect I can transfer any number of pins, and I suspect that they should be consecutive, but I don't really know. If we can use the streamer in this way then I would like to fiddle with it to see if I can use it to improve the bandwidth for
image acquisition.... and then I think I might look seriously at building some cameras.

If you (or someone other than Chip) could spend a few minutes and code an 8-bit sample, I would deeply appreciate it.

Thanks

Rich

Comments

  • 2 Comments sorted by Date Added Votes
  • ozpropdevozpropdev Posts: 1,707
    edited January 27 Vote Up0Vote Down
    A while back I built a logic analyser using a P123-A9 board.
    It uses the streamer to capture pin data up to 32 bits.

    http://forums.parallax.com/discussion/163967/p123-a9-prop2-logic-analyzer

    I need to update to the latest version but here's a snippet from the code that captures the pins.
    dat		orgh
    		org
    
    capture_cog	loc	ptra,#@capcon
    
    .loop		rdlong	pa,ptra wz	'wait for start command
    	if_z	jmp	#.loop
    
    		setxfrq	##$8000_0000	'sysclk sample rate
    		wrfast	#0,##@samples
    		xinit	##%1111_0000_0000_0000 << 16 | sample_length,#0
    		waitxfi
    
    		wrlong	#0,ptra		'capture done
    
    		jmp	#.loop
    
    Melbourne, Australia
  • Ah hah!!!

    I looked at that a while back for other issues, very helpful.
    Stuck without my P123 at the moment. Will be home sometime next week.

    Thanks

    Rich
Sign In or Register to comment.