Another reason the prop is great!

Hi All,
I thought I'd share this with you guys as I thought you'd appreciate it!
On Friday, a friend of mine, asked me to write an app to help him out, in which he had 10 serial ports all receiving data, and then having to be fed through a single port! Now to us propheads, it's yeah dead easy, but when you think about it, there's hardly another microcontroller out there that could do the job, Pic, nope, Arm, not without a LOT of messing! AVR, nope, ( OH and Leon, you're permission to quote your favourite on this thread, is denied, we all know already! lol ), but anyway, for the Prop it was a piece of cake, I wrote a 5 port reader in one cog, used it in two cogs, to read into 10*1K buffers, then had another cog scan those buffers for full lines ( ie check for carriage returns ) which then sent them to an 8K buffer for TX which was the fourth cog, leaving 4 cogs idle, proving the prop could handle it without breaking into a sweat, ( something Leon's couldn't do, as that breaks into a sweat just turning on!
)
Anyway, this is and other industry grade app win for the prop!
Thanks for reading!
Baggers.
I thought I'd share this with you guys as I thought you'd appreciate it!

On Friday, a friend of mine, asked me to write an app to help him out, in which he had 10 serial ports all receiving data, and then having to be fed through a single port! Now to us propheads, it's yeah dead easy, but when you think about it, there's hardly another microcontroller out there that could do the job, Pic, nope, Arm, not without a LOT of messing! AVR, nope, ( OH and Leon, you're permission to quote your favourite on this thread, is denied, we all know already! lol ), but anyway, for the Prop it was a piece of cake, I wrote a 5 port reader in one cog, used it in two cogs, to read into 10*1K buffers, then had another cog scan those buffers for full lines ( ie check for carriage returns ) which then sent them to an 8K buffer for TX which was the fourth cog, leaving 4 cogs idle, proving the prop could handle it without breaking into a sweat, ( something Leon's couldn't do, as that breaks into a sweat just turning on!

Anyway, this is and other industry grade app win for the prop!
Thanks for reading!
Baggers.
Comments
btw, they all go at 115200.
Yeah, I can imagine it being messy and a big chip count too!
I had a problem with some digital video recorders for a CCTV system which keep failing.
In trying to narrow down the exact cause the manufacturer had asked us to monitor the debug port on the DVR. This is great in theory but a little challenging when there is ten on the one site.
I needed a way to gather the data from each DVR and tag it with a label so I could then import it into Excel for sorting. This can be done by appending each string received with a deliumeter character then a reference.
I thought about it and immediately knew a Prop could do it and I'd been looking at the modified full duplex serial that can handle four ports in once cog by Tim Moore. Anyway long story short I'd had a few problems implementing it and was spoke to Baggers about it and he came up with the idea of doing a bespoke app.
Now this is the good part, in the space of a few hours (and I really mean a few hours) we had a framework up and running, Baggers writing the code, me setting up the hardware, testing and debugging all done on the fly.
The only reason it took as long as it did was because real life got in the way lol
Anyway we finished the code on Saturday afternoon and I spent Sunday making up the PCB. Final tests were done this morning when I connected them to the DVR's.
Now name me another micro that you could have done this so quickly with?
Or anybody that can code as fast as Baggers for that matter lol
Thanks Jim, you are a star!
Regards,
Coley
Leon
With one of the spare cogs you could use 1pin and a resistor for 1pin mono TV out to display what is being sent out the port. Of course it may be too fast to see the data.
These are the things that we appreciate in the prop. We don't have to go and look through all the pic chips (or whatever) family to find a chip with 5 UARTs (well we could do it with 4) and then set about coding it.
there isn't a PIC that comes anywhere close to be as good at just about everything
I can do it for the prop in 25 lines for RX+TX in PASM
I am curious - Coley mentions a problem with the quad serial object in a later posting - could you or Coley elaborate on what the problem was?
and if done in parallel, can you get 10 ports? how many threads can you have running?
using this method, we can have 30 ports/threads on the prop, plus the cog/thread supporting the ports for lines, and could have 5 tx ports +
jazzed, thanks, it was only a nice story, because the prop lends it's hands at everything, and is so quick and nice to code on.
Bill, Coley will give you better details on that, as it was before he talked to me about it.
cheers
TonyF
Yes, it's a good application for propeller - I designed a 4 port concentrator a few years ago.
I'm not sure, probably about the same as for the Propeller. Assembler isn't used much, of course.
Eight 50 MIPS hardware threads per core are available, and it should be possible to put several UARTs into each thread. They look like separate processors to the programmer. 64 I/Os are available, per core.
The Perl 5 programming language has a slogan: "It makes the easy things easy and he hard things possible. Perl 6 goes one better: "It makes the easy things trivial, the hard things easy, and the impossible things merely hard." The Propeller, OTOH, makes the impossible things (for other micros) easy.
Thanks, Baggers, for sharing your experience. It would make a great case study for Propeller marketing!
-Phil
Edit: I like this quote!
jazzed, yeah 30 serial ports on one prop
Leon, I bet it wouldn't have been anywhere near as nice and tidy to program though!
If you don't mind giving up your console and having one input unavailable on startup, recycling the EEPROM SCL pin is possible by forcing the SDA pin high from inside the Propeller after bootup. This allows 30 input pins and 1 output pin.
-Phil