Pages: [1] 2   Go Down
Author Topic: PIC or AVR? noobie question(s)  (Read 1933 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello.. Im new here (first post) so if this is supposed to go somewhere else.. (sorry).. Im not familiar with the forum yet..

I am wanting to get into the world of microcontrollers..

Im not sure if PIC or AVR is the place to start? (Im not asking which is better..just un-sure why would use one over the other)

I have read that Arduino is a nice starting place..

my concern is that anything small enough needed would defeat the purpose of more builds.. (like the nano being $60 bucks or whatever)

I was then told that I can just use the Arduino to 'test' my stuff out..and then burn the code I write to an Atmel chip..  true? (and if so..does it mater what one I use?)

I have little experience with PIC's.. as in just flashing them with pre-made HEX files form other people..

ultimately..in the end.. (future) I would like to produce something exactly like this:

replicantfx.com/FXOrion.html
replicantfx.com/files/FX_Orion_Jan09.pdf

which is a PIC24 chip..that has an API (interpreter language) over it..so the end user can just configure it however they want by a config file located on the SD card it boots from.

Is this even possible with the Arduino?  

what about working with SD (micro) cards?
and playing .wav files?

does it have ADC? (analog to digital conversion?) (liek for accelermeters)

and does it have PWM support? (I believe it does..but want to make sure).. (to flicker and fade in/out LEDS)

in the above linked project (replicantfx) you just hook some speakers up to the SND pins..and whatever you play though the PLAY() function outputs..it is that easy for the Arduino as well?

Id looking to program/test with the Arduino..and the write it to another chip to pop into a PCB layout with a DIP socket or something..

Thanks
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 504
Posts: 31325
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

PICs are a very wide range of processors and cover things much simpler to the ATmega family to processors much more complex.

I have used both and I think this board hits the sweet spot. It's main advantage is that it is about ten times simpler to get into than a PIC.

Yes you can program it up and move the chip to an other circuit board. However, you don't even have to be that complex just build it into your project and add a header and program it in situe.

Look at my projects http://www.thebox.myzen.co.uk/Hardware/Projects.html the Econo Monome does not use the board but everything else about the environment.
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey thanks for the reply..

using almost ANY of the Arduino boards in the project doesnt seem realistic for my needs..  

1.) for cost alone
2.) form factor

I'll need (in the end) to have a board that is about 1.0" by 2.5" MAX..

and this will need to be have room for solder pads for speakers, analog sensors (3) mounted..  or maybe an accelerometer..  on-board amp.. pads for accent LEDS to be soldered to.. as well as have a HIGH POWERED LED driver on it..

the NANO which may or may not be usable is WAAAY to much..

maybe you can answer some of my other questions?
ADC? (Analog to Digital Conversion) for accelerometers or something
Sound stuff?
SD card?

and a comparison to the replicantfx.com project?


the code portion seems to have a nice learning curve to it.. but it cant do what I need in the end..  it would be a waste of money to pursue it..  smiley

so programming a chip and slapping it into a pre built PCB with a socket in it..is the only solution I see if it can do all the things above.

Im basically looking ot create my OWN replicantfx.com chip to be honest.. since it has been abandoned more or less..

I know the overlying interpreter language/API is more advanced..but even if I could just embed the code directly to the chip..and use the SD card to swap out .wav files it plays.. and maybe with some other switches set certain parameters..i would be happy with that as well.

look forward to your response..

Thanks
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 47
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is no simple answer to your question -- it depends!

I agree with Grumpy_Mike on the PIC.

I have found nothing easier to work with at less than $30 for a complete system than the AVR.  Specifically the numerous hardware vendors and the prepackaged coding examples and libraries.
« Last Edit: August 05, 2009, 05:45:19 pm by mlindeblom » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 504
Posts: 31325
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
maybe you can answer some of my other questions?
ADC? (Analog to Digital Conversion) for accelerometers or something
Sound stuff?
SD card?

Not sure what you mean but as regards to the straight arduino chip then
A/D - Yes 8 channel built in.
accelerometers - better off using I2C interface built in.
Sound stuff - no not enough memory to do it direct (neither has the ReplicantFX from the look of it) but you can get interface shields.
SD card - you can get interface shields.

Looking at the list about the only thing that is missing from the arduino is the built in tone generator.

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 could be wrong but it doesn't look right to me. It pretends to be open source but then doesn't give you anything concrete to go on.

Take for example the homemade uSD adapter. Very high tech soldering a pin header onto flash card, what's that all about? Reading some of the posts sounds like they were not a very professional or knowledgeable bunch. You can't get access to the hardware section so how open it that? So I still haven't found out what "the chip" actually is but from the pin out it looks not much different from an Arduino.

The forum is sparse and the mission statement:-
Quote
The Open Saber Project (OSP) is a public collective of electronics resources, designs and ideas related to the creation of lighted sabers.
Isn't even grammatically correct. WTF is a "lighted saber" is it perhaps a "light saber" or a saber that at one time was llluminated and now isn't? Perhaps the word 'illuminated' is what was being groped for.

However, my main concern is that you, perhaps like them, are trying to fly before you can crawl and you have unrealistic expectations of what an embedded micro controller can do. It is also worrying that you think an arduino board or clone is way out of your price range. You can get these things for about $15 and you will end up spending lots more on addons like LEDs, interface chips and shields.

As you say you are new to the embedded world and you have a lot to learn. I am old and was into embedded controllers before they had a name for it and I am still learning.

If you want to learn for free then please read up all our tutorials http://arduino.cc/en/Tutorial/HomePage

and our user generated playground:-
http://www.arduino.cc/playground/
Read the exhibitions section and see what people have made, then try and find anything one tenth that good for any other platform.
« Last Edit: August 06, 2009, 02:31:29 am by Grumpy_Mike » Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I dont think its a scam.. (by any means).

I have used it before..and still have a few..  it just never really took off..and with the developer on military leave.. its been dead..but I still want to continue to 'play'.

It is a regular old PIC24F chip..but has an 'interpreter'/API over it..

the SD card is just for testing stuff int he breadboard..in a final project it wouldnt be like that of course..

you can use the API/functions it has available for you..and write your own 'program' to make the chip do whatever you want...re-usable so to speak. I dont need to flash a chip or do anything..I just change the text file/program

the chip grabs this 'config' (called MODULE.TXT) form the SD card and loads it.. so the chip knows what to do...

Im not entirely sure about what you mean by 'interface shields'..

but I knwo I hook up a speaker to the SND pin..and anytime I call the PLAY1() function it plays a .wav file (housed on the SD card like I mentioned previously)..


I also know I hook up my accelerometer to the ADC pins..and have it watch my accelerometer.. I make some small routine in the MODULE.TXT file to check for a threshold..and if met..play a sound.

non of this extra interface shield for sound or SD card

her is a pic of my layout

http://www.replicantfx.com/Forum/download/file.php?id=52

blue network cable thingy is my accelerometer...

the brown/brown white wires are my speaker..

I believe the OPEN SOURCE means the API/interpreter used..gives you documentation on the function available with some samples...and you do what you want with it..

As far as the Open Sabe Project..that was a section devoted to using this ReplicantFX chip in LightSaber/Props specifically..so ther was a section created to talk about needs, code and also hardware to integrate an LED driver board for it..

but using LIGHTSABER is trademarked by LucasFilms..and sometimes results in C&D letters..

its the CHIP and API that is the item...everythign else is just extra to help you test..what or how you using in your final implementation is not sites concern really..

As far as the Arduino..  yes if you just take the Arduino starter kit and use it to flash stuff/code/program to ANOTHER chip..that will be popped into a another PCB with a socket or something..maybe this IS the avenue to pursue..  but a full Arduino board in anything.. that need to be 1.0" x 2.5" MAX doesnt seem feasible to me..that Ive seen..  the nano maybe..  but still needs WAY other components to be added for the final goal..and the nanos were $40-$60 bucks last I checked..

I did think the Arduino was a nice alternative to the dead ReplicantFX project...'however' "I" cant be sure..because I dont have much experience..but from the things you have said that were to'prove' it was..just seemed to make me think it wasnt..

I have to use all these 'interface shields' for an accelerometer and SD card..where as in the ReplicantFX comparison I just wire it directly to the pins..and the CODE sets the pins to what I need..and the code I write checks for the accelerometer threshold..and then does 'whatever'...  I just place .wav files on the SD card along with the MODULE.txt file...

I simple turn on the SOUND pin
and use the PLAY1() function..and sound comes out..


I think you may be confused that Im trying to 'dog' the Arduino..or compete the two.

Im definitely not.

Im saying..Im looking for similar since the ReplicantFX chip is dead for the time being...

I was looking to start trying learning to program PIC from scratch myself.. (yes, long road..I know).. but someone told me the Arduino may be something to look into..  or even just AVR's over PICs in general.

so I came to ask.

In the end..the Arduino chip (or however that works)

needs to be pooped into a SOUND and LED DRIVER all-in-one board..

so that it can:
1.) once powered on.. play Sound A
2.) while powered on.. keep looping SOUND B as long as it has power/is on
3.) when powered off play SOUND C

(I was hoping to keep these on an SD card so it easy to update the sounds or even have multiple sounds and have code just grab the selected audio file depicted by a variable or a switch)

4.) use either an accelerometer or analog sensors to play a sound when certain threshold or sensor is activated (3 sensors in all, or if accelerometer based, X, Y & Z access..as well as code for an abrupt stop in movement..like a BANG on the board)

5.) Have PWM support to fade in a HIGH powered LED when it is turned on..   as fade out a HIGH powered LED when turned off.

optionally while the board is on..and playing SOUND B above..possibly flicker the LED using some PWM loop to slightly DIM it

the the MAIN gist of it..

It seems like doing this is 'hard' work?  Not that Im scared of hard work.. I love ot learn new stuff as a matter of fact..

but using the ReplicantFX chip made this somewhat easier..  form my breadboard I took the chip pooped into my PCB layout..that had voltage regulator, caps/resistors.. and bunch of solder pads for speakers (or accent LEDS)...etc..  and of course a nicely solder micro SD adapter tot he board..  where I transferred over my micro SD card as well.. and it was a done deal.


I hope this made sense..and cleared some things up for you..as well as cleared up what Im looking/aiming to do..

and hopefully you can still help enlighten me on if this is possible or even plausible..  keeping in mind my end goal. (and project footprint)



Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 504
Posts: 31325
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I believe the OPEN SOURCE means the API/interpreter used..gives you documentation on the function available with some samples...and you do what you want with it

That is not what open source means.  >smiley-sad

It means that the source code is available to all, be it hardware schematics, PCB gerber files, assembler source, compiled code in fact everything you need to produce the thing yourself. There are plenty of open source projects on the net, this being one of them. Look at them and contrast how open the replicator project is.

Quote
her is a pic of my layout
yes and you have a big sticker on the processor saying "Orion Chip Set" - very open isn't it. Googling the name produced something that clearly wasn't on your photo.

Quote
It is a regular old PIC24F chip
That covers a wide range of stuff a PIC24F..... ? (what)

Quote
but has an 'interpreter'/API over it.
That is a big overhead for an embedded system.

Quote
you can use the API/functions it has available for you..and write your own 'program' to make the chip do whatever you want...re-usable so to speak. I dont need to flash a chip or do anything..I just change the text file/program
That's exactly how the Arduino works only instead of downloading text the text file/program is a proper computer language that gets compiled first. You don't need to flash a chip or do anything else you just down load it.

Quote
but from the things you have said that were to'prove' it was..just seemed to make me think it wasnt..
Fine I have no problem with that, I just think you will change your mind when you know a bit more about things.

Quote
have to use all these 'interface shields'
No you don't 'have to' use a shield, it is just that it is easy and convenient for people to buy on. As this is an true open source project you can always make your own shields or wire up the components any way you want.

Quote
I think you may be confused that Im trying to 'dog' the Arduino..or compete the two.
Well that is the impression that comes over to me. You want to do everything and don't want to pay anything and want it on a plate. You talk of this 'open source' project that is not open at all and run by people who from the posts couldn't get the sound output not sounding muffled.

Quote
I was hoping to keep these on an SD card

See:- http://www.arduino.cc/playground/Learning/SDMMC

Quote
It seems like doing this is 'hard' work?
It is the same amount of work it would take on any platform that hasn't been specifically designed to do a very narrow task.

Quote
if this is possible or even plausible
It is both plausible and very possible to do what you want with this system. All the elements you require have been done before by people, and being a true open source project people are more than willing to show you what they have done and not hide their chips under stickers with spurious names on them.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 236
Posts: 24267
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm with Mike here - the ReplicantFx device is quite clever, but as pointed-out, there's no current support for it, and the documentation isn't very well written.
Example:
Quote
All numbers are handled as even values ranging from -32768 to 32768
What about odd values?   [smiley=shocked.gif]

Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mike, I can see your really just dead set on being a jerk about this (great attitude toward someone coming here looking to for help/direction)

As I explained the Open Source/Saber Project is about putting the chip use toward a SPECIFIC TASK/PROJECT where were share things on that front..  like the PCB schematic for the LED driver portion that is there..  or the PCB layout for the other components we'll need once a 'program' has been written to do all the things we wanted it to do..  I doubt he would give away his HEX/SOURCE code for how he did the Orion Chip.  Or have a parts list/Number for every component need to get the LED driver and other stuff

As for the sticker.. "I" put that on there to know what chip(s) are what..   (the stupidest things you focus on to dry about....really? I sticker on the chip to identify it in a bad og blanks or other flashed chips?)  (sigh)

Googling the name produced what 'secret' wasnt mentioned for you?

To be specific its a PIC24FJ64GA02 I believe.

Noone asked if it was 'big overhead' for an embedded system.. its a good idea IMHO..  to let the end users get the most out of their chips..and makes it very versatile.

Thats NOT how the Arduino works..as far as a I can tell.. maybe you can show me how you claim it works the same?  Dont you have to write some code..and flash it to the chip? (period)  Then it does what its supposed to?

I dont mind changing my mind 'once I know more'.. thats why I came here.. to find out more.. but your attitude is just KAKA..  And you cant seem to focus enough to answer the questions..just BASH other things.
(should have known when you answered in this thread...from other threads saying oh well your 'grumpy' as an excuse to be a jerk in other posts.)

Your link to the SD card stuff...doesnt show or teach me anything, because Im in experienced...but it looks to be ANOTHER daughter board of some type.. hardly as 'tidy/easy' as the ReplicantFX where you just directly add wires to the SD pins on the chip....  or am I missing something?

so to summarize.. maybe you need a hug..cause your attitude sucks.

Instead of teaching or trying to educate..all you did was BASH form the jump..  and point the finger.  (wow..cool)  :'(  

AWOL-

I too thought the ReplicantFX was/is very clever..and agree the documentation wasnt the best...  and Im saddened that there is no support/further development on it currently..

which is why I am here to look for an alternative..  but with people like "Grumpy_Mike".. Im doubting the Arduino is that answer unfortunately..

Its a shame.. I thought the code examples I saw were very straight forward..and easy to get a hold on too.
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 236
Posts: 24267
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@xl97

I really think you're mis-reading Mike - he's one of the most helpful and knowledgable members here, and name-calling is really not the way to endear yourself to other members here either.

Someone has invested a lot of time in the replicant device, but it just isn't mainstream enough to attract the kind of community the Arduino has.

Quote
or am I missing something?
Quite a lot, it would seem.



« Last Edit: August 06, 2009, 08:31:12 am by AWOL » Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't let Mike put you off Arduino. He means well and has known to be helpful if you don't mind dealing with someone that is so grumpy he uses it as a handle  smiley-wink

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. Does the orion board actually play 8 bit audio wav files or does it read 8 bit files but produce single bit output? I did not think the PIC24FJ64G had inbuilt ability for true analog.
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I knwo he is a knowledagable memebers.. I have read some of his other posts...  IMHO..doesnt excuse an attitude.. I have done NOTHING wrong, yet I all I got was attitude..  what for is what Im asking? Just a bunch of basjing another chip that isnt AVR/Arduino is what I gather.

I simple came to seek help/advice.. and used the ReplicantFX as a base of my needs and ease of learning curve...

and asked if the Arduino can fill that void.

nothing about stickers or Open Source (fakeness)..  which "HE" mis-interpreted...  the COMPLETE/OVERALL project was to be OPEN SOURCE..not the CHIP's SOURCE CODE..

I have been polite everytime..trying to get back on focus of the Arduino..but his focus was bashing the RFX project.

I know the RFX isnt 'mainstream'...  I dont understand what that means?  I was never trying to say it was BETTER.. Im looking for a replacement.

I stated my goals.. and the things Id like to do....and how the RFX does it..can the Arduino do the same? With as much ease?

Mike himself in other posts has been harsh in comments..and then just hey... thats why Im 'Grumpy'  so I dont think its a surprise as to how he acts..  I just feel it was warrented when I came with legit questions..

Did I offend him or get 'snarky' in ANY post besides my last? He made assumptions and ran with them (like the sticker thing for example..or the Open Saber Project)..  he didnt even bother to ask before bashing any/everything.

I mean is this really what the Arduino community is all about? I had no clue?


Before you start bashing me.. what is it Im missing? Arduino experience? Im here to get some.
Logged


Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 236
Posts: 24267
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, really.
You've read the device ID off the replicant chip, and you're as capable as I am of going to the Microchip website and reading the device datasheet.
It told you that the device has 64K FLASH, 8K RAM, a faster A/D than the AVR, yadda yadda.

So what's your beef?

You're faced with a choice - a superior spec device with an obscure proprietary API and no support (it says as much in big red letters), OR a marginally lower specced device with open source standard 'C'/C++ and a great deal of (free) support.


Quote
I have been polite everytime..
On my planet, calling someone a "jerk" does not count as "polite".
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1221
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

mem-

thanks for the reply..

unfortunately.. I dont know enough to answer correctly..
All I can tell you is that it has 2 'channels' that can play 8-it .wav files..
1 at a time or layered/mixed together (playing both at same time)

I dont know if it can play the 8-bit files..or if it reads them and plays as single output..

I just know I turn on the PIN SND1 (or SND2) and use either PLAY1 or PLAY2 function to play the wav file form the SD card..  (sorry).. wish I knew more to answer better.


AWOL-

whats my beef? with what?  "MIKE" asked for the CHIP type..so I told him.

There is no choice really..  Im looking for an alternative (like Ive stated previously)..  the ReplicantFX project is dead for now.. until the owner comes back from Military duty..  but that doesnt mean I want to stop 'learning/playing/developing' my goals..

I was told the Arduino may be an alternative to look into.. so I came here seeking advice/answers on how things interface.  Whats not to get about that?  Im not sure how much more clear I can state things..

The things I asked about..that I cant seem to get straight answered with out attitude is:

can I use an Arduino starter kit to test code.and then just burn/flash what Ive done to a chip..and use it as the 'brain' in my overall/big picture layout/project?

it is similar to the RFX chip where you have dedicated PINS for ADC, SOUND, PWM?  like I can just set those PINS (turn them on) and directly connect a device to those pins

LIKE can I just set PINS 0-2 as ADC pins..hook up an accelerometer to them and start tracking my X, Y & Z values?

Can I just turn a SOUND pin on..and hook up a speaker to it?...etc

or there is more hardware involved?

etc..

looking back what i got was a bunch of non-sense talking about what OPEN SOURCE MEANS...and PUTTING STICKERS on PIC CHIPS...

not alot of direct help/answers..

but as stated..thats just his nature...(as he himself admits in other posts)..

I also stated I was POLITE before my last post...  JERK didnt come out until the end.. until he got way off topic..

I dont know..maybe were you come from Mikes 'reaction & attitude' is considered 'cool' & 'polite'..  but not me.

As for the (free) support..  like the help I got from Mike?  :smiley

Im going to try and move forward..and see if I can get the help/advice that will clear things up..as maybe if I 'can' get the right answers..  the Arduino still may be a viable solution.


Thanks
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 504
Posts: 31325
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Question you posed in original post:-
Quote
I was then told that I can just use the Arduino to 'test' my stuff out..and then burn the code I write to an Atmel chip..  true? (and if so..does it mater what one I use?)

answer I gave in first post:-
Quote
Yes you can program it up and move the chip to an other circuit board. However, you don't even have to be that complex just build it into your project and add a header and program it in situe.

Question you posed in post 14:-
Quote
The things I asked about..that I cant seem to get straight answered with out attitude is:
can I use an Arduino starter kit to test code.and then just burn/flash what Ive done to a chip..and use it as the 'brain' in my overall/big picture layout/project?

Who has the attitude? I just give as good as I get.  smiley-razz
« Last Edit: August 06, 2009, 10:16:32 am by Grumpy_Mike » Logged

Pages: [1] 2   Go Up
Jump to: