Author Topic: Starting with digital stuff  (Read 4114 times)

vendettav

Starting with digital stuff
« on: October 09, 2012, 06:48:34 AM »
So I'm thinking of doing the first step into the digital electronics.

I'm thinking of getting an Arduino board for the first steps.

Now things I want you guys to help me with is, what's usually the necessary stuff when it comes to digital electronics? Like some sort of interface to program the micro-controllers, some other stuff Idk... the language usually used for programming... Also what the crystals that I see being used in projects....

I'm completely new to the digital world
check my music HERE

Shredtastic psycho metal!

swinginguitar

Re: Starting with digital stuff
« Reply #1 on: October 11, 2012, 09:34:37 AM »

Like some sort of interface to program the micro-controllers

I come from PIC land, so I can't comment on Arduino, but typically the chip mfr supplies an IDE for development. In the case of PIC, you get MPLAB and you purchase a "programmer", which is a device that interfaces between your PC and the chip itself - it writes out your program instructions to the chip (some of them also provide debug services etc)

the language usually used for programming
most chips provide a C library, although I would recommend you at least familiarize yourself with the assembly language of your chosen device

Also what the crystals that I see being used in projects....
the crystal forms an oscillator to provide timing to the CPU. most chips have an internal oscillator, but for maximum available speed, you typically put a crystal/etc across the clock pins of the chip


ElectricDruid

Re: Starting with digital stuff
« Reply #2 on: October 13, 2012, 03:52:01 PM »
The Arduino boards are dead good for starters. The Arduino board itself can be connected to a computer via a USB cable and programmed from the Arduino software. You don't need a separate programmer like you would for a bare chip (either PIC or AVR). The Arduino code is basically C, with plenty of useful library routines thrown in, so it's *very* easy to get stuff up and running fast and it'd be pretty easy to move to "real C" at a later date. A friend of mine with no electronics experience at all put together a wireless-controlled rifle target shooting system using two arduino boards and some shields in next to no time.

What the Arduino won't do is give you all the power of the chips. A lot of the library routines are slooooowwww. Many of them use polling, which means they hang around waiting for things to happen and hold everything up whilst they're doing so. But these are niggles, and initially they probably won't bother you. there's certainly a load of stuff you *can* do.

HTH,
Tom

artifus

Re: Starting with digital stuff
« Reply #3 on: October 13, 2012, 05:20:32 PM »
no love for the msp?

http://www.ti.com/lsds/ti/microcontroller/16-bit_msp430/overview.page?DCMP=MCU_other&HQS=msp430

  pros:

  cheap: less than $5 to get started with a development board and two chips - and lots of free sample chips available if you ask nicely and don't abuse the service.

  cons:

  mind manglingly confusing code and what seem like epic war and peace datasheets for beginners.

  not so much online support, although this is slowly changing.

you can kinda port arduino code over with a little homework and energia: http://energia.github.com/Energia/ depending on chip and function.

conclusion: cheap but hard work. worth the effort depending on the intended project and how much you value your time.

http://omfootctrl.sourceforge.net/

if you just want something that works in a hurry i would just hack a usb keyboard - google will help you out in this regard.

for an easy intro into c i found these video's quite entertaining: http://www.youtube.com/playlist?list=PLD61C018D7DC1F431

*edit* when i say cheap: avr = £4, pic = £2 and msp430 = £0.50 for individual ic's. averaged prices, but still... depends on your purpose - do i want to flash a few led's in sequence or do i want to sample, store and recall data? you wouldn't put a quad op amp in your project if you only needed a single buffer, would you?

digital control: analogue sound

would you rather mess with a bunch resistors on breadboad for half a day or would you rather do the same math via usb on a gui in half the time? i know what your boss would prefer you to do with your time - i actually enjoy both but this is just a hobby for me. horses for courses, choose your poison, etc. fun, fun, fun.
« Last Edit: October 13, 2012, 07:47:37 PM by artifus »

swinginguitar

Re: Starting with digital stuff
« Reply #4 on: October 15, 2012, 10:08:03 AM »
 
if you just want something that works in a hurry i would just hack a usb keyboard - google will help you out in this regard.


Curious about this comment - what are you suggesting?

composition4

Re: Starting with digital stuff
« Reply #5 on: October 15, 2012, 11:16:18 AM »
+1 Arduino... very very easy to learn, and quite capable for anything except DSP really.  MIDI, switching circuits, LFO/waveform generation, etc

Jon

swinginguitar

Re: Starting with digital stuff
« Reply #6 on: October 15, 2012, 02:32:07 PM »
To the OP:

I think the takeaway question is: how deep do you want to go and how much control do you want?

I think of Arduino as "microcontroller for the Apple crowd"...if you don't care what's really going on under the hood and can sacrifice control/efficiency/power, it's a great start.

Do you prefer something like

TogglePin(2)

or

movfw PORTA
xorlw 00000100


...

LOLOLOL
« Last Edit: October 15, 2012, 02:37:38 PM by swinginguitar »

vendettav

Re: Starting with digital stuff
« Reply #7 on: October 17, 2012, 05:12:58 AM »
I really dont know what you're saying haha ^


artifus. I think in my current position, I'd rather have a hard curve of learning with the board but pay less than pay a lot for the sake of being hassle-free.

do you think MSP is capable of midi applications? and which product should I really purchase?
check my music HERE

Shredtastic psycho metal!

composition4

Re: Starting with digital stuff
« Reply #8 on: October 17, 2012, 07:52:57 AM »
Arduino is open source, including the hardware, so that means you can pick up a clone UNO board for under $15.  All you need is a USB cable and you've got all you need.

i.e. http://www.ebay.com/itm/New-UNO-ATMEGA-328-ATmega-8U2-For-ARDUINOs-IDE-/130773402328?pt=LH_DefaultDomain_0&hash=item1e72b3c2d8

I know it sounds like I'm pushing Arduino a lot but it's very easy, can do the vast majority of what you need for any guitar application (except DSP), is great with MIDI, and there is a LOT of support on the internet for programming it. What have you got to lose for $15? Try it and you'll be surprised.

Jon

vendettav

Re: Starting with digital stuff
« Reply #9 on: October 17, 2012, 11:39:25 AM »
thanks Composition4, man. I'll definitely get that one. just not now since I just got into a really tough financial situation this week... :/ well here's a hoping I'll get back rolling this month and will get an arduino (definitely the copy you posted) at once
check my music HERE

Shredtastic psycho metal!

swinginguitar

Re: Starting with digital stuff
« Reply #10 on: October 17, 2012, 05:49:48 PM »
good luck with whatever you choose....

this may not mean much to you just yet, but remember that MIDI is nothing more than a (rather slow) serial data exchange format. So, it can be implemented fairly easily on any device with serial support (or devices without serial via "bit banging")...

it's been done over and over, so you shouldn't have trouble finding docs/examples.

MoltenVoltage

Re: Starting with digital stuff
« Reply #11 on: October 25, 2012, 02:53:22 AM »
To the OP:

I think the takeaway question is: how deep do you want to go and how much control do you want?

I think of Arduino as "microcontroller for the Apple crowd"...if you don't care what's really going on under the hood and can sacrifice control/efficiency/power, it's a great start.

Do you prefer something like

TogglePin(2)

or

movfw PORTA
xorlw 00000100


...

LOLOLOL


Long live Assembly Language!

If you want to take it seriously, learn from the ground up.  There are many reasons (speed and flexibility being the top 2) that you will be happy you learned Assembly.

If this is a one-shot deal, then get the Arduino and save yourself a lot of consternation.
MoltenVoltage.com for PedalSync audio control chips - make programmable and MIDI-controlled analog pedals!

alparent

Re: Starting with digital stuff
« Reply #12 on: October 25, 2012, 01:22:11 PM »
I really love Arduino because you get 2 for 1.

1st. If you only want to have fun and get started quickly. Then embrace the Arduino philosophy. Simple, easy, lots of support, never ending fun. Yes it's slower because of all the extra stuff they layer on to make it easier for you, but your not going to do DSP anyway.

2nd. If you really want to go into coding and really control the chip. The atmega is a very powerful chip. You can continue to use your board, just ignore the Adruino philosophy and program the chip as you would normally, use interrupts and all that neat stuff (I'm not there yet).

And when your done you can easily integrate the atmega into a project. Tayda as the chips for 3.50 and I got some SMD for 1.90. Then all you need is a 5v regulator, a couple of caps and resistors, I use a resonator for the clock (but you could use the internal clock) that's it!

I purchased the Arduino Uno, and I just love the convenience of it.