Go Down

Topic: PIC or AVR? noobie question(s) (Read 7432 times) previous topic - next topic


lol...ok  touche`   :P

I was being a little 'thick' at times..but hardly attitude (ever)..  I have been very keen to thank you for your replies, until the end.

I did read that I can burn to the chip and place it into my over all/big scheme project..  I guess I was just trying to summarize what I came here seeking help/answers on.

but Im still unsure about all the sound, SD card, accelerometer stuff.

does this require extra hardware, daughter boards..etc

or is it similar to the ReplicantFX set-up where I just solder/connect (whatever) to the correct PIN?

and then just (in the code) write  routine that constantly checks for these X, Y & Z values and if above a certain threshold..(for an accelerometer)

in the end the project would an on-board audio-amp..that leads to some solder pads..  can I just hook the amp up to the pin in the Arduino pin and be done with it? or more work involved? extra hardware?

there was mention of Interface Shields...  but I dont think (or I missed it) anyone explained to me what they were? Just that they make things easier?


Aug 06, 2009, 06:04 pm Last Edit: Aug 06, 2009, 06:04 pm by mem Reason: 1
>there was mention of Interface Shields...  but I dont think (or I missed it) anyone explained to me what they were? Just that they make things easier?

Shields are boards that can be plugged on top of the Arduino PCB extending its capabilities.  See:  http://www.arduino.cc/en/Main/ArduinoShields

> but Im still unsure about all the sound, SD card, accelerometer stuff.
> does this require extra hardware, daughter boards..etc

I  answered this in my post #10:
"Leaving aside the interpreter, I think the only functional thing that may be difficult for an arduino without external hardware is the wav file support."


Mike was right about what Open Source is.

Having a lot of ideas, but understanding each of them only enough to have a short (and if you wish - heated) conversation over a glass of beer gets you in the parliament.


there are schematics in the open source section there..
he just chose to focus on the open source-ness of the RFX chip source code only.  everything else has been open source..and talked about freely..  why it was Open SABER project, focusing on the WHOLE board, components of the project..not the chip itself.. which has its own sections to talk about.. :)

ok shields are like daughter boards..  got ya. (wouldnt work for this project then really)

ok..so the .wav support might be ore diffcult or need other support..

this is a KEY part of this project that the Arduino board would be controlling.. audio & LED control)..


Aug 06, 2009, 07:19 pm Last Edit: Aug 06, 2009, 07:20 pm by mem Reason: 1
> a KEY part of this project that the Arduino board would be controlling.. audio

It is possible to simulate PCM audio on arduino user a 16 bit timer and perhaps the orion board does something similar. This page shows one way to do this: http://www.arduino.cc/playground/Code/PCMAudio

What is the minimum acceptable audio functionality you need?

if you really need stereo,  that code needs two 16 bit timers so would require something like the ATmega1280  chip. This chip has similar onboard memory and peripherals to the PIC24Fj64G. (perhaps not useful for your app, the 1280 has many more I/O pins than the PIC) . This page has some more information on the official board, nothing stopping you building a smaller board customized for your app that runs the same software.


Aug 06, 2009, 07:23 pm Last Edit: Aug 06, 2009, 07:32 pm by xl97 Reason: 1
I think it 'has' stereo potential/option..but its not/wasnt needed..

however the 2 channel mono 8-bit was something id like to replicate.

for example.. always playing a sound while the board/project is on..and whenever a sensor is triggered..playing another 8-bit mono sound over it..

I will check out the link..and see if I can make some sense of it..



Im not 100% but it looks like they are taking the sound file (.wav or whatever) and running it through some sort of conversion that outputs the sound into text.. like an array of numbers to be used in playback?


Stereo and two channel mono would require similar resources. If you want two audio channels that can play wav data without external hardware, I would think you would need something with at least two 16 bit timers plus at least one 8 bit timer. That is if you use the approach in that playground article.


It looks to me like the ReplicantFX is some standard embedded processor chip that some one has dressed up to look like it is more than it is. I have not come across it before but it has all the hall marks of a bit of a scam, or just kids playing about.
I don't think it's a scam.  Writing special purpose SW (or designing hardware) for a particular target market (in this case, prop builders) is a valid business model.  And it looks like the ReplicantFX has some neat features for those purposes.  All irrelevant, since it's no longer available (one advantage of being truly open source is that the community can pick up support for a project if the original owner is no longer able or interested.  One of the disadvantages of open source is that the frequently doesn't happen, and you wind up with interesting projects that sound good but are essentially abandoned and "unfit for inexperienced users.")

In any case:
1)  Arduino is aimed at a somewhat lower level of functionality than the  ReplicantFX chip.  It won't do what you want without a pretty significant effort, and I'd say that the chips used in arduino are "not quite power enough" to make it easy.  (See the Adafruit "wave shield" for something that is "almost" there.)
2) The PIC24 (or perhaps a dsPIC, which is pin compatible) is somewhat more powerful than the ATmega CPU from arudino, but is even further away from making the high-level functionality you want easy-to-use.
3) The interpreter for the FX Orion chip does not appear to be available in source form to allow you to copy that functionality onto bare PIC chips.  That's too bad, but even if this source was available it probably wouldn't do "end users" much good without  a significant support community.
4) Fitting any device with the functionality on a board the size you are talking about is pretty significant effort; enough so that the $30-60 price range for arduino boards will start to seem pretty small.  In some sense, the arduino is a "prototyping" platform: you figure out how to write your code and set up your hardware using a standard board and SW environment (arduino) and HW modules (shields), and then when you have things working to your satisfaction, you combine the hardware you actually need (schematics/etc being open source), strip off the portions you DON'T need, and lay it out on a board in the desired form factor, and give it a new name (SaberDuino!  Or perhaps PropDuino.)  Still a lot of hard work, but easier than starting all the way from scratch.


Its not a scam..  (thanks)..

And yes it is 'dead' until the developer comes back from deplyoment he told me.. (I talk to him on email and the phone sometimes)..

I do however have the HEX file he gave me to flash my own chips..  but Im not good at the hardware side of things to complete the Open Saber Project...

and without some bugs worked.. Im not sure I can use it as is...

I have a pretty good handle on the code/API (interpreter) that he created..  but if ther is/was a bug.. I cant fix it without source code (even if I knew how..lol)..  I only have the HEX file.

its too bad it was a VERY versatile project.. not just for saber usage..

the API was very user friendly for the most part..


I am in a similar position to the OP - really new to electronics, want to build a lightsaber w/ light, flash on clash, constant & mometary sound. As I want to work up to more complex motorized props, I thought the arduino would be a good way to learn, using it as a design platform. Does this sound like a good approach? I am thinking of using cheap recording & playback DIPs instead of sound from an SD. Any thoughts, suggested tutorials would be appreciated. My only real experience is maintaining, moding Fender, Marshall tube amps, and 4 circuit-bending projects.


Oct 13, 2010, 09:40 pm Last Edit: Oct 13, 2010, 09:43 pm by pwillard Reason: 1
I think it's really easy to misinterpret how fundmentally simple the Arduino is at first glance.

If you keep telling yourself that it's really just a standard AVR Microcontroller (and at that point nearly identical to a PIC solution) and what's been done is these nice guys got together and made a "wrapper" around all the hard stuff... so people can create right away with the Arduino versus spending hours figuring out what you additionally need to buy (IE; HI-TECH PIC-C, CCS-C for PICS, Hardware programmers PICKIT2, etc) unless of course you are happy programming in PIC assembler.  

I think one of the main goals of Arduino was... Buy it, start coding right away and trying stuff with no major expenses beyond the board itself.

..but still needs WAY other components to be added for the final goal

At a basic level, this is not totally true.  You literally need no more support hardware than your average PIC solution.  That is, if you don't mind giving up some convenience build that was into the Arduino.   Some of these conveniences are wasted  if you are making a final design.

You don't HAVE to have the USB interface... but it's nice.   You could just as well have an FTDI/RS232 break out board handy that you attach as needed when you want to program.  

You don't HAVE to have the large "board footprint" unless you plan to buy and attach "shields".  You don't need onboard LEDS's unless you feel you need them.  Personally, I prefer the Breadboard compatible "boarduino" for development.

So the most basic items in a final design would be Reset Circuit, and 16MHZ Crystal with 2 20pF caps.  That's not any different than a PIC... and with some playing around and some external hardware, you could still do the  Bootloader based serial programming as needed.

If you eventually tire of the Arduino solution, with no additional expense, you can migrate to the AVRGCC (real C/C++)  solution... or as I like to call it... the AVRgeeks graduation present for persevering with the easy C-like syntax of Arduino.


I still have not picked up an "actual" Arduino at this point.. I use an Adafruit BoArduino- a minimal design that is set for plugging directly into a standard breadboard... the USB connectivity stays in the cable, further reducing cost.  I think they go for around $15..  even cheaper is the Anarduino, which even skips the voltage regulator.. runs about $10.. and there's even some goof that just piggybacked the resonator and such directly on the back of the 328.. can't get more basic..

For me, the site and general feel of the project is what makes it superior to PIC.  Hardware on both sides will be roughly equal, give or take- so it comes down to usability and support... and on that, Arduino is the winner, IMO.  Even other "generic" AVR-related sites don't have the community that seems to have grown here.. some places can be a little unfriendly to new people and/or "silly" questions..

Go Up