Fast Prop to Prop Communication
Bobb Fwed
Posts: 1,119
I am working on a way to send a grip of information quickly between two propellers. The program sends longs (not bytes) with only one start bit, and no terminating bit. Everything assumes the two propellers' clock cycles are +/- 0.5% of each other. But it goes really quick, and this is just the first day I've been able to work on it, so it will go faster once I figure out all the timing stuff.
The demo program (I have attached) is just testing the system between two pins and two cogs on one Propeller. The problem I am having is I am trying to send 32 longs, but the return is only showing 8 longs. I can't tell (with my cheap oscilloscope) if it is outputting all the information and it's not receiving it, or possibly the other way around.
Any help would be nice. As usual, I am sure it is something very simple, I just need more eyes looking at it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Post Edited (Bobb Fwed) : 9/18/2009 5:55:11 PM GMT
The demo program (I have attached) is just testing the system between two pins and two cogs on one Propeller. The problem I am having is I am trying to send 32 longs, but the return is only showing 8 longs. I can't tell (with my cheap oscilloscope) if it is outputting all the information and it's not receiving it, or possibly the other way around.
Any help would be nice. As usual, I am sure it is something very simple, I just need more eyes looking at it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Post Edited (Bobb Fwed) : 9/18/2009 5:55:11 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propeller Tools
is supposed to be
and
works when it is
.
But this looks like it would pull the whole thing out of symmetry. Maybe it is some other timing thing I am not seeing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
http://forums.parallax.com/forums/default.aspx?f=25&p=1&m=233212
Beau tested at 14.5Mb
I will look at your code later tonight when I swap laptops and post comments then.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
*Peter*
P.S. The Propeller doesn't have interrupts but people do. I jumped the gun a little but it is transmitting properly it's just that the timing for the rx didn't look right (for 5MHz). But with all these interruptions I haven't been able to check it out. I am just setting some extra debug pulses to check what the rx is doing.
Post Edited (Peter Jakacki) : 9/17/2009 9:49:47 AM GMT
Did you spot the typo in the original?
*Peter*
P.S. Changed back to 32 longs for both rx and tx - example
P.S. Removing the nop and unrolling the rx loop while increasing the buffer to 256 longs will transfer 1K bytes in around 1ms = 1MB/sec. (tested)
The equivalent at 10 bits per byte end-to-end would be 10.48M baud.
Post Edited (Peter Jakacki) : 9/17/2009 2:01:37 PM GMT
But the basic execution still functions the same, and the RX loop is still twice the value of the TX...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
*Peter*
@Peter: I still don't see the typo. The new version works that function a bit differently, but I don't want to make the same mistake twice. Please do tell (maybe I meant to do whatever the typo is :-P).
@Cluso99: I will look at Beau's program, but according to my first tests I am getting 8.66 million bits per second (8.93Mbaud). I don't have a stop bit, I use Beau's "Start bit 2" instruction to load data. The rest is just management of overhead (which may change as I troubleshoot). So if he has me that beat, I may not need to reinvent the wheel, no matter how fun it it. This info is assuming I get this all to work anyway.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Post Edited (Bobb Fwed) : 9/17/2009 11:29:20 PM GMT
So I think the speed of this thing is way fast at 1 megabytes per second after I remove the tx nop and unrolled the rx loop.
*Peter*
This one allows you to place the data in the buffer, then, at your leisure, send it. There is a SPIN RX command that has a watchdog. The original problem with the RX loop being twice as long as the TX loop has been resolved. The RX loop has been rolled out and the TX's NOP has been removed. And lots of minor changes.
After looking at Beau's program in a lot of ways we are, line-for-line, writing the exact same program. With a few difference (as said before[noparse]:)[/noparse] one start bit, no stop bit. The big difference (which should make mine faster -- please someone test them) is mine doesn't launch a cog every time it wants to send, it just provides the send command.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Post Edited (Bobb Fwed) : 9/18/2009 5:56:43 PM GMT
Like QAM, can carry more bits than the pulse rate frequency.
How about duty cycle also?
Some of the hardware is faster than the software, for example the video generator, but that is output only.