Shop OBEX P1 Docs P2 Docs Learn Events
When the Propeller met the Arduino — Parallax Forums

When the Propeller met the Arduino

blittledblittled Posts: 681
edited 2012-06-08 10:13 in Propeller 1
I just saw the post today that OBC is working on the Prop Shield for the Arduino http://forums.parallax.com/showthread.php?138525-BS2-meets-Arduino-shields-and-vice-versa . The timing is fortuitous since I have started something along the same lines http://www.savagecircuits.com/forums/showthread.php?1211-Project-Orthrus-%28Propeller-SPI-Slave-for-Arduino-Shield%29 but I really didn't want to develop the shield for it.

Since this is in its infancy I want to add my 2 cents on this. This is by no means a critique of OBC's project but to shine some light on other possiblities.

There are 2 other "game systems" for the Arduino. One is a simple composite/audio output in black and white generated by the Arduino. The second, the Gameduino, which does VGA and has a rich sound system. I feel this would be in between the two. This shield should have some "WOW" factors to lure Arduino users in.

IMHO SPI is better than serial since it can run at faster speeds. If you stream the data from the Arduino for audio it would be best to have a fast communication interface. I have almost completed a SPI slave for the Propeller in PASM which runs at 1MHZ and tested with an Arduino Pro Mini 3.3V in a PPDB. The only drawback is that the slave select pin has to be carefully chosen since it shouldn't interfere with too many of the other SPI shields. The best pin probably would be the same pin as the Gameduino :).

The audio should be stereo if you want to compete against the Gameduino. I feel monaural is not a feature that will bring in people but going stereo will get the game developers interested. I also feel the AYCog should be used since it is fairly simple and can directly use AY data so a user can use his/her choice of editors to make the sounds and music. The SIDCog is great but to use it you have to use customized software to create a dump of the data and that may be a show stopper.

As for video I agree that the standard composite RCA output is best. Since we have a world community it should be capable of NTSC and PAL outputs. To give it a true retro feel it should have a driver that produces 8x8 tiles and sprites such as JT Cook's RamQuest video driver.

I strongly feel an input device is definitely a WOW feature that puts it above the Gameduino. I suggest a PS2 interface so that a keyboard or mouse can easily be added to game development. Also a WII nunchuck connector would definitely be an eye catcher!

If the I2C EEPROM interface is made into a true I2C interface and then a jumper put in to make the eeprom switchable between the Propeller and the Arduino would be a plus. By doing this the EEPROM can be programmed by the Arduino using premade .bin files rather than using the Prop Plug. I feel alot of Arduino users would be turned off by having to buy one.

Finally where possible Spin should be replaced with PropGCC. There are bound to be Arduino users that will want to program the sheild and will utter "I don't want to learn Spin" and will not get the shield so let's not give them that excuse!

Thanks for listening to my 2 cents :).
«1

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-09 16:51
    My board is a work in progress..

    Before it ships.. {Nick and I were in discussion about the product this afternoon.}

    * I'll be replacing the single audio output with a R/L channel headphone jack.
    * I'll be adding several connection points to make it very easy to tie more than two lines together between the two.
    * I'm strongly considering a VGA option. (In addition to the composite hookup)
    * A couple other tricks possibly up my sleeve.

    The design is still lodged in my current work projects. I'll post updates on this thread.

    OBC
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-05-09 17:37
    I was about to suggest the stereo output via 1/8" jack but didn't because I felt you had in mind a particular goal for the product, and mono through RCA is often just fine. But I'm glad you're doing what I wanted to see, even if I didn't say it!

    I'm mostly a robot person, where VGA is not a primary need. I'm guessing if it fits on the board, and doesn't cost extra to put the pads there for it, then why not.

    I am ambivalent toward this retro gaming stuff, though I can see its popularity, and if that's the driving force behind the design, that's great. I'm just looking for a general purpose thru-hole project board for the Propeller that is smaller than the usual 3x4 footprint, and is reasonably priced. The Arduino form-factor is a plus because I know I can get protoshields, motor sheets, and other stuff for it. I also like the idea of socketing the EEPROM, for various reasons I'll just keep to myself for now. Most of the boards these days are surface mount with a permanent EEPROM chip on it.

    I have numerous magazine projects I could use this with. I recently finished a MIDI based project -- using a MIDI synthesizer shield -- that for various non-technical reasons had to be based on an Arduino. You'd think MIDI would be easy, but various aspects of the project used up all the Arduino's hardware timers and most of its core processing speed, and it was a bear getting everything to work. The Propeller would have made it much easier.

    -- Gordon
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-09 18:24
    Yeah, I'm running out of room on this design for VGA, so I'm going to have to forgo it to keep this in "kit" (DIP) form.

    Here's revD. I've got some routing cleanup to do and double checking, but it's edging closer to the finish line.

    Edit, the more I stare at this design, the more I wanted a Wii connector on it..

    OBC
    495 x 382 - 49K
  • blittledblittled Posts: 681
    edited 2012-05-09 19:23
    It's looking great OBC! I do see more uses than gaming as Gordon mentioned. In fact I have one of his Ardbots and with your board I can have a robot with two brains! But it probably would be of more popular as a gaming platform. I think there will be some rewiring of my project so I'll be ready for the new board :). Besides my SPI driver is giving me a headache with handshaking to the Arduino and serial is easier!
  • trodosstrodoss Posts: 577
    edited 2012-05-09 19:26
    Yeah, I'm running out of room on this design for VGA, so I'm going to have to forgo it to keep this in "kit" (DIP) form.
    I am surprised Nick let you get away with composite video (instead of VGA), considering ;)

    There are two things that the shields that are targeted for gaming are missing: SD/microSD card interfaces and ethernet. One of the things I have seen time and time again when people work with TVOut on the Arduino is that they want to use it with their ethernet shield and are then disappointed when they find out that they can't (at least not easily). Same with the SD shield. Primarily it has to do with the video generation interrupt handler. I would think you could bring enough pins out on the Prop to add support for say the microSD module.
  • blittledblittled Posts: 681
    edited 2012-05-09 19:33
    OBC,

    Is the pinout
    P0 - Nunchuck
    P10, 11 - Audio
    P12, 13, 14 - Video
    P16, 17 - Serial ?

    I know these are subject to change but I'll be able to start with that. The only problem is I don't have a way to connect to a nunchuck so I guess I'll get a breakout board for it.
  • trodosstrodoss Posts: 577
    edited 2012-05-09 19:38
    Another thing to consider is the "reset" button on the Arduino. On a lot of the older Arduino boards, it ends up being covered up by a shield. There are some (like this one) bring out a reset button on the shield itself. The Arduino Uno R3 did move the reset to the side of the board, which is nice, but having it on the shield is much more convenient. There also isn't that handy "off switch" on a lot of the boards either ;)

    Provided that you have something like 3.3K or 4.7K resistors, have a diode circuit, or something to handle the mixed voltage on the I/O you should be ok.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-09 19:55
    @trodoss

    Yeah, I can work in the microSD connection point. No issue there.

    Agree'd on the VGA thing. Perhaps a VGA version of this is worth looking at.

    OBC
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-09 19:56
    blittled wrote: »
    Is the pinout
    P0 - Nunchuck

    Most Nunchuck drivers I've seen use the Prop's I2C pins (P28 and P29) since the Nunchuck is an I2C device.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-09 20:02
    blittled wrote: »

    I know these are subject to change but I'll be able to start with that. The only problem is I don't have a way to connect to a nunchuck so I guess I'll get a breakout board for it.

    There's a nunchuck connector on the design now.. Diptrace 3D preview doesn't show the cut-outs. (Lower left corner)
    All of the I/O is in a state of flux at the moment. Video is 12,13,14, audio is 10,11,
    I just added a microSD connection point to 0,1,2,3 and moved the nunchuck to 4,5 (on my working copy)

    OBC
    498 x 383 - 51K
  • trodosstrodoss Posts: 577
    edited 2012-05-09 20:19
    Cool.
    Now ... swapping VGA for composite and a reset button would be nice ... Just saying ;)
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-09 20:37
    Decoupling capacitors near the power coming into the Propeller chip?
  • trodosstrodoss Posts: 577
    edited 2012-05-09 20:43
    mindrobots wrote: »
    Decoupling capacitors near the power coming into the Propeller chip?
    That would be a very good idea.

    @OBC,
    With there being so many iPod Video Out cables, you could re-purpose your audio jack to output video and mono sound. In a pinch it might get back some board real estate.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-05-09 21:07
    Agree on the reset button thing. The button should ideally be on the left, so a shield doesn't block it. As noted elsewhere, the new location for it on the R3 boards is where you have the stereo jack right now.

    On VGA or ethernet, remember that the whole concept supports shields. As long as enough unique pins are exposed through the shields you can have a VGA shield, either alone or combined with ethernet, microSD or whatever. This is the fundamental idea of the stack. Yes, eventually you run out of pins, but people can choose what shields they want.

    Jeff, I'm sure you're aware you can't use the name Arduino anywhere on the board, as that's trademarked. I'm guessing you're including it as tongue-in-cheek.

    Just out of curiosity, what circuit and values are you using for the sigma-delta reconstruction filter for audio out? I see the resistor is 1.1K, the cap is ??. And the big caps are AC coupling?

    Finally, if you want to try to be somewhat compatible with some of the popular Arduino shields (at least those that don't require analog and are not specifically for only 5V operation), you might reconsider things like the uSD pinout, so that they match the hardware SPI pins used by the Arduino. Remember that the Arduino can't just select random pins for things; functions like SPI, hardware serial, and I2C are hardwired. Pins are specific, so shields that support things like uSD always use the same pins.

    (This doesn't mean you can't keep pins 0-3 for a special purpose connector that just happens to match your uSD breakout. Someone could always use those four pins for something else, even if they implement uSD through a shield.)

    Yeah, I know it would be nice to sell your own versions of shields, but if there's no consistency with the form factor, why bother with the form factor? For things like SPI and uSD interface, worse case is that folks have to change the basepin in the SD object.

    -- Gordon
  • W9GFOW9GFO Posts: 4,010
    edited 2012-05-09 21:58
    Jeff, I'm sure you're aware you can't use the name Arduino anywhere on the board, as that's trademarked.

    You can however call it; DigiStorm (Arduino-Compatible)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-10 05:42
    mindrobots wrote: »
    Decoupling capacitors near the power coming into the Propeller chip?

    Yup! Was on my todo list, but was starting to get too tired to push forward last night. You'll find them on the final.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-05-10 06:14
    I forgot to add my thanks for making this and you other projects a "kit". I still enjoy soldering together a through hole kit and plugging it in and taking the pleasure of seeing my creation work. I don't know if I get the same relaxing pleasure from making a SMT kit.....old eyes can be frustrating!!
  • blittledblittled Posts: 681
    edited 2012-05-10 06:25
    I am with MindRobots in thanking you for keeping it as a kit. I never have done surface mounted soldering and also through hole IC's can be socketed making it MUCH easier to replace when you release the magic smoke.
  • trodosstrodoss Posts: 577
    edited 2012-05-10 06:40
    On VGA or ethernet, remember that the whole concept supports shields. As long as enough unique pins are exposed through the shields you can have a VGA shield, either alone or combined with ethernet, microSD or whatever. This is the fundamental idea of the stack. Yes, eventually you run out of pins, but people can choose what shields they want.
    I would think that video output (in some form, like VGA) is the primary usage of this particular shield. I think the purpose here is to be like a Gameduino.
    Finally, if you want to try to be somewhat compatible with some of the popular Arduino shields (at least those that don't require analog and are not specifically for only 5V operation), you might reconsider things like the uSD pinout, so that they match the hardware SPI pins used by the Arduino. Remember that the Arduino can't just select random pins for things; functions like SPI, hardware serial, and I2C are hardwired. Pins are specific, so shields that support things like uSD always use the same pins.
    If it was being designed for a stack, then you would have to make sure to reserve the necessary pins for the most "common" configuration of SD shield, ethernet shield, etc. There are some "combo" boards available that seem to have been made because someone wanted more than one device and had to change around the pin usage (XBee + SD, Ethernet + SD, etc.).

    I think the use case for SD/uSD on this particular board would be for the Propeller to load resources directly, rather than having the Arduino having to manage those resources.
    Yeah, I know it would be nice to sell your own versions of shields, but if there's no consistency with the form factor, why bother with the form factor? For things like SPI and uSD interface, worse case is that folks have to change the basepin in the SD object.
    If it is being designed as a general purpose board this is absolutely correct. You would want the board to be as consistent as possible, and trying to factor in as many of the other shield use cases as possible. If it is going to be used specifically for gaming, I would think you would want it optimized for that purpose.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-05-10 07:50
    W9GFO wrote: »
    You can however call it; DigiStorm (Arduino-Compatible)

    But it's not at all Arduino compatible except it uses the same form factor. That might work for the trademark aspect, but users would find lots to disagree with.

    -- Gordon
  • Ahle2Ahle2 Posts: 1,178
    edited 2012-05-10 07:52
    @blittled
    In which way is AYcog different to SIDcog when it comes to user usage?
    You can use them both in the same way as they were used in their original machines; By writing the memory mapped registers directly.
    Or you can "ease the pain" of bit banging by calling the user friendly methods.

    There were no standard format for music or sound FX back then... Every game and application had their own music/fx routines and data formats.
    Both SIDcog and AYcog comes without any type of music playroutine. They are nothing more than what they are trying to emulate.
    ".YM" and ".DMP" files are the same thing.... register dumps.

    /Johannes
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-05-10 08:02
    trodoss wrote: »
    I think the purpose here is to be like a Gameduino.

    If it is being designed as a general purpose board this is absolutely correct.

    Since Gameduino is a shield and this is a main board I'm not seeing you're point. Gameduino is an add-on to a standard Arduino, so it already embraces the concept of a stack. There are already several Propeller formats, like the Demo board, that do VGA and sound. This one might be a little cheaper, but if its design locks it into a narrow use I'm not sure the market base is large enough to make the effort worthwhile. People have been able to make a "Propeller Gameduino" for years, and for less than the Arduino+Gameduino pair.

    "General purpose" wouldn't be a fair descriptor, anyway. Seems to me it's multi-purpose. I think that's the key.

    -- Gordon
  • trodosstrodoss Posts: 577
    edited 2012-05-10 09:15
    Since Gameduino is a shield and this is a main board I'm not seeing you're point.
    Could be the intention, however it does not have voltage regulators on the design, so it would then require external power source. I assumed it was a shield, however it does not indicate this in any way, which makes me think that you are indeed correct that the intention is to be a stand-alone board. It sounds like there are other components "missing" on the current iteration that will be added, and those may very well be something that is on the list to be added. Usually there is "shield" somewhere in the name/description, and thusfar that is absent ;) If the intention is to be a main board, it might be better to pattern after the PropellerASC. The components will need to be much closer together to stay PTH and accomplish that goal though.
    "General purpose" wouldn't be a fair descriptor, anyway. Seems to me it's multi-purpose. I think that's the key.
    I don't disagree that a multi-purpose board would be useful, and that could indeed be the intent.
  • trodosstrodoss Posts: 577
    edited 2012-05-10 09:24
    But it's not at all Arduino compatible except it uses the same form factor. That might work for the trademark aspect, but users would find lots to disagree with.
    Right, they would. That happens with some of the other main boards/shields on the market. Use of the term "Arduino Compatible" seems to be used at times very loosely.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2012-05-10 09:27
    I thought the design as a shield was evident in that I'm grabbing power from the connection points, but I'll make some adjustments in the name to make sure the message is clear. I'm not really interested in competing with the PropellerASC that Martin designed, as I think it does a good job being a base for existing shields.

    The idea here is to stay multi-function as much as possible, providing plenty of options for those who are interested in taking it one direction or another.

    OBC
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-05-10 09:51
    Well, I thought the fact that it could be a co-processor (on a shield) OR a main board was a key feature. The Arduino only supplies 50mA for its 3.3V supply, which is barely enough for a Prop and one or two LEDs. So it seemed to me that external power was needed anyway. I assumed this because the DigiStorm doesn't have a 3.3V regulator, so it was not consuming its power from the Arduino's 5V regulator.

    So, one way or another, you're going to need external 3.3V power. An Arduino won't be able to provide it. (If your aim to make a co-processor shield for Propeller-based boards that share the Arduino footprint, that's another matter.)

    Jeff, It wouldn't be that much to provide pads for power, should that be your intention. A good source design for this is the Diavolino, which has pads for a regulator. Cuttable jumpers allow you to select which of three power sources you wish to use.

    http://evilmadscience.com/productsmenu/tinykitlist/180

    This board (and its clones) is very popular. Though primarily intended as a main board, it can also act as a shield, where the second Arduino chip becomes a co-processor.

    I don't see this as competing at all with Martin's ASC. That's a fully-scoped board that's made to be as Arduino-compatible as possible. I was hoping this one was a low-cost prototyper for all kinds of Prop-based projects where video and audio could be added if desired.

    -- Gordon
  • trodosstrodoss Posts: 577
    edited 2012-05-10 10:38
    It looks like it would be possible to use the board that Gordon mentioned "stacked" on a PropellerASC, making the Arduino a co processor, and then use one of the other boards that Martin has on his site for A/V.

    It kind of sounds like what Gordon is after was the original Gadget Ganster Boss Board, in Arduino footprint. Maybe that is worth considering?

    If you go too far in the direction of integrating the two, you end up with the Chameleon AVR. It seems like the only thing that board is missing in this case is Arduino footprint.

    I guess it depends if you view the Propeller use case as an intelligent peripheral (or bus controller) capable of managing A/V and I/O for the host, or if it is being used as a fully-fledged co-processor. I could see how both needs could pull your design in completely opposite directions.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2012-05-10 11:05
    There are few things the Arduino does better than a Prop when used as a co-processor, but not the reverse. The Prop makes an excellent co-processor for the more limited Arduino. Forgetting the pride factor that the Propeller is acting as a "slave" device to the Arduino, it's just more commonplace to use the Prop to provide functionality that the Arduino either cannot do, or does not do well. Phil's Backpack is a good example of such a co-processor. The VPN1513 GPS is also a co-processor that even has pads for unused pins, should you want to hang more stuff from it.

    Not desiring to dictate to Nick and Jeff, but here's what I'd look for in a board that I think would have wide appeal, and could be used in the types of projects I do for Make and other magazines:

    * Small and *CHEAP*. The Arduino footprint is small. It doesn't need to be Stamp small.
    * Thru-hole. Let people solder in what they want, leave out what they don't.
    * Socketed EEPROM. I have ideas for this. It's easier for retailers to "pre-kit" basic parts then toss in specific components for each kit. Socketed EEPROM allows for the kit to come preprogammed, but without having to stock all separate kits.
    * Arduino shield form factor, not for all the zillion shields, but for the most popular and commonly used -- prototype, SD, servo, motor.
    * The most common features applicable for Prop use. In addition to being a good general-purpose MCU, the Prop shines for video and audio, so having connectors for these is a natural.

    As I noted above, the current design will not work as a shield unless pads are added for a 3.3V regulator that draws power from a 5V source. As there appears to be plenty of room in the lower left corner, you might as well then also add pads for a 5V regulator, because a co-processor board is just as happy being a processor board. And who's to say someone can't use two of these stacked together? Two Props are twice as good as one. A user would only have to provide regulation on one of the boards.

    -- Gordon
  • Nick McClickNick McClick Posts: 1,003
    edited 2012-05-10 14:03
    @Gordon, I'm with you all the way. We know the Prop much better than we know the Arduino. This shield would work with an Uno without any problems, but maybe we can add in an optional vreg in case someone's using it with a Duemilanove.

    What else would you like to see on the board? What would help you build the kinds of projects you want to build?
  • Brian RileyBrian Riley Posts: 626
    edited 2012-05-10 15:05
    Jeff, I'm sure you're aware you can't use the name Arduino anywhere on the board, as that's trademarked. I'm guessing you're including it as tongue-in-cheek.


    You can, however use the term/name "Freeduino" which applies to all open source Arduino compatible hardware.
Sign In or Register to comment.