Author Topic: Microcontroller after Arduino  (Read 21032 times)

0 Members and 1 Guest are viewing this topic.

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #25 on: November 22, 2013, 12:50:03 am »
Quote
I decided to use manufacturer-supplied libraries when learning the ST part, but with hindsight, I'm not sure that was such a good idea.

A library allows you to get it going quickly. If you write your code right, you can always replace the library blocks with your own code piece by piece.

================================
https://dannyelectronics.wordpress.com/
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 5752
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Microcontroller after Arduino
« Reply #26 on: November 22, 2013, 12:51:25 am »
I highly recommend PIC once you're ready to move on. It's very diverse (from 6 pin devices to 100+ pin ones) but there are still plenty of devices that are easily breadboardable. I suggest the PIC24, dsPIC, and PIC32 since those are the ones that are substantial upgrades over the classic Arduinos.  ARM gives you many vendor choices but most of them are only available in surface mount packages.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #27 on: November 22, 2013, 12:53:09 am »
Low-end PICs aren't good from a modular programming point of view.

I like PIC24 as well.

Wouldn't touch PIC32 at all.
================================
https://dannyelectronics.wordpress.com/
 

Offline ddavidebor

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: it
    • Fermium LABS website
Microcontroller after Arduino
« Reply #28 on: November 22, 2013, 06:10:15 am »
I think he'a moving on because he want to learn more, not do more.
Davide Bortolami,
Fermium LABS srl
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Microcontroller after Arduino
« Reply #29 on: November 22, 2013, 09:58:58 am »
Quote
I think he'a moving on because he want to learn more, not do more.


Yep! Basically I know that Arduinos are good to learn with but I want to learn programming in C which it seems is vital in todays industry  :-+

My recommendation really is AVR because you can prototype the code in Arduino format and then easily translate to AVR C.
Then grab a TI MSP430 Launchpad and write some C code in Code Composer Studio. If you get stuck, the MSP430 launchpad works with Energia which is a Arduino environment for the MSP430. Then grab some PICs and a PIC programmer and have fun with that. I've got them all and also TI's ARM launchpad boards.

And one of these days I'll start using them all. :P
The larger the government, the smaller the citizen.
 

Offline rverm

  • Contributor
  • Posts: 8
  • Country: us
Re: Microcontroller after Arduino
« Reply #30 on: November 23, 2013, 12:58:54 am »
 I have only used pic chips























Thats something I'm interested in doing. Learning how to use a arm processor. the arduino due with the sam3 chip looked  good. but there libraries don't really let you learn anything about the chip. at least in basic with the pic chips you can address the registers directly.
 the info everyone has provided has been interesting. food for thought.









 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 5752
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Microcontroller after Arduino
« Reply #31 on: November 23, 2013, 05:13:36 am »
If you like the Arduino platform but don't like the IDE, you could use vi (or whatever text editor you like) and make your own Makefiles...
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 888
  • Country: pt
    • My AVR tutorials
Re: Microcontroller after Arduino
« Reply #32 on: November 23, 2013, 06:13:14 am »
Arduino is just a breakout board for the atmega chips, think of it just as of a breadboard, if on windows, download avr studio(now using Visual Studio, a nice IDE, if a little heavy when opening), download the datasheet and off you go...
No need to change micro-controller family or brand just because the Arduino IDE is a piece of crap and the libraries are no better, seriously, who the hell puts code on .h files and makes that a convention?  |O |O |O |O

If you want to dip your toes, I have started a line of tutorials aimed to make the transition from Arduino to real mans C, it started out in the older AvrStudio 3.something, but the concept is there:
http://hekilledmywire.wordpress.com/

Yeah, I haven't posted nothing for a while, but the code is all proven, give it a go ;)
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3098
  • Country: us
Re: Microcontroller after Arduino
« Reply #33 on: November 23, 2013, 07:01:13 am »
BTW, a good start is:
1) Read the Arduino core source code!
2) OK, now go read the mpide source code that implements the same functions on PIC32.   Or the Energia code for MSP430.  How is it different?  Why?
3) Now, improve something in one of those.  Write a digitalWriteFast function (yet another one, but that doesn't matter.)  Implement a pin as a c++ template/object instead of the current version.  Make it so that the serial port data structures for the 4 serial ports on a MEGA are dynamically allocated at begin() time and don't use up so much RAM; shucks, go ahead and make the buffer sizes user-configurable.  There's lots of "bad" code in the Arduino core and libraries that's not getting fixed because of "momentum."  But that shouldn't stop YOU from fixing it!
4) port the Arduino/mpide/Energia core to a "similar" environment, like an Atmel "XPlained" board, or an NXP LPCXPresso board.
5) port the core to a NOT similar environment, like one of those Renesas eval boards that they like to give away, or a Freescale Coldfire Tower Board.

People tend to treat systems like Arduino as either Evil because "they're too easy", or Wonderful because "they're so easy."  But it is a useful LEARNING EXPERIENCE to STUDY such systems!
 

Offline Sasja

  • Contributor
  • Posts: 49
  • Country: 00
Re: Microcontroller after Arduino
« Reply #34 on: November 23, 2013, 01:32:43 pm »
Seems you're ready for a next step beyond the gateway drug that is arduino :). good!
The direction i would recommend is a step down (as in deeper) towards baseline 8-bit microcontrollers.
take a look at these tutorials:
http://www.gooligum.com.au/tutorials.html
Print em all out, buy a PicKit3, buy all the pic's he uses and get to work for a few weeks.
Once you've done that you'll be able to do things with a tiny 0.5$ chip that you used to do on an arduino, and more.
and then go design and build some stuff!
« Last Edit: November 23, 2013, 02:39:21 pm by Sasja »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #35 on: November 23, 2013, 03:15:30 pm »
Quote
take a look at these tutorials:

It is the best, par none.

Quote
buy all the pic's he uses

He used some very old PICs. You can get more powerful PICs at much lower price points and with better availability today.
================================
https://dannyelectronics.wordpress.com/
 

alm

  • Guest
Re: Microcontroller after Arduino
« Reply #36 on: November 23, 2013, 03:39:10 pm »
I would say that for learning C on small micros AVR (8-bit), MSP430 and PIC18+ are all equally fine choices with good community and tool support. Unless you already have the hardware or friends with experience I don't see a compelling reason to choose either, so the Arduino that you already have would be a fine AVR devboard. If you want to move to a breadboard, the ATmega328p is available in DIP and the Arduino can be configured to program it. Nothing wrong with buying a Launchpad or Pickit 3 either, but why spend the money if you already have the hardware? Platform is pretty much irrelevant if you understand the fundamentals.
 

Offline Sasja

  • Contributor
  • Posts: 49
  • Country: 00
Re: Microcontroller after Arduino
« Reply #37 on: November 23, 2013, 06:45:13 pm »
Quote
take a look at these tutorials:

It is the best, par none.

Quote
buy all the pic's he uses

He used some very old PICs. You can get more powerful PICs at much lower price points and with better availability today.

i guess you're right about the old PICs but after messing around with a few of those old PICs in the tutorial you should be comfortable picking up any modern PIC. And coming from arduino it's really awesome to be able to browse a microchip catalog and select exactly the pic for the job. Before you know it you'll be the one looking at arduino based projects and going:  :palm: dude why use an arduino for such a trivial thing i can use a 1$ pic for.
(and then someone else will point out: duuude i can do that with a 20cent 555)
(and then  :wtf: who still uses 555? and so on... :))

by the way my strategy to learn electronics is basically this:
1) find out what you would like to build
2) then find out what you need to learn to do that
3) build it

i have to admit, i kind of wondered before if i would enjoy learning FPGA stuff but honestly i cant really come up with something i want to do yet that would actually need an FPGA. So none of that stuff for me at the moment. I still like reading about that stuff though, the whole FPGA concept is just er "to pornographic" as dave puts it :).
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #38 on: November 23, 2013, 10:09:46 pm »
Quote
select exactly the pic for the job.

That strategy (making a mcu that fits the job exactly, no more and no less) works in the old days where mcus were expensive, or in mass production. That strategy is increasingly irrelevant in a days of cheap mcus and for high software cost / low hardware cost jobs. I personally think that there is a lot of merits in utilizing mcus with more features you need so to reduce software costs (by reducing the number of mcus your software has to support).
================================
https://dannyelectronics.wordpress.com/
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 18271
  • Country: nl
    • NCT Developments
Re: Microcontroller after Arduino
« Reply #39 on: November 24, 2013, 01:40:34 am »
I agree. When looking for an MCU for low to medium volumes (<1000 pieces) the price is often driven more by the popularity of an MCU from a certain family-branch than its memory size. Distributors buy popular MCUs in such large quantities that they can keep the price low.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Sasja

  • Contributor
  • Posts: 49
  • Country: 00
Re: Microcontroller after Arduino
« Reply #40 on: November 24, 2013, 07:37:30 am »
I also agree, a mcu you already know with more features/memory than you need at the moment would be a wise choice in most cases. I guess "exactly the pic" was an unlucky choice of words. i just meant that if the op wanted to go, for instance, for low power, or just small footprint, or a quick proof of concept, or high volume/low cost, or anything, he will be able to choose an appropriate tool for the job. Hell, sometimes i still grab my old arduino to do smth just because i happen to know how to do it fast with it.
« Last Edit: November 24, 2013, 07:46:00 am by Sasja »
 

Offline macboy

  • Super Contributor
  • ***
  • Posts: 1990
  • Country: ca
Re: Microcontroller after Arduino
« Reply #41 on: November 25, 2013, 01:43:28 pm »
If you look at the biggest microcontroller companies, Atmel isn't even in the top 10.  Neither is Microchip.  But both of them dominate the hobby world.  The truly big boys are NXP, Renesas, ST, Panasonic, TI, Freescale, etc.  But many of their chips are used in specific applications.

What complete nonsense.
In 2011, Atmel was ranked 3 in the world (by $) and Microchip ranked 4. Only Freescale and Renesas were higher than these guys. Both Atmel and Microchip are growing while Renesas is losing share. Atmel and Microchip didn't earn a combined $2.6 Billion from hobbyists!! (Source)
I have at least 3 commercial products on my bench with a PIC inside that I know of.
With microcontrollers, everyone has an opinion. But if you are going to state facts, make sure they are facts.
 

Offline Sasja

  • Contributor
  • Posts: 49
  • Country: 00
Re: Microcontroller after Arduino
« Reply #42 on: November 25, 2013, 06:07:38 pm »
Can we come up with a conclusion though, I keep on tossing back and forth between different systems  ;)
are you asking for everyone in this thread to agree on something?  :-//
i'm afraid you'll have to do the conclusion part yourself.
Have you checked out dave's pic vs atmel rant video yet? i'm sure you'll find some wisdom in there that may help you, even if you decide not to do pic or atmel microcontrollers. And its good entertainment also.
 

Offline ddavidebor

  • Super Contributor
  • ***
  • Posts: 1139
  • Country: it
    • Fermium LABS website
Microcontroller after Arduino
« Reply #43 on: November 26, 2013, 06:26:34 am »
Well we all agree that if you want to learn more about good programming you need to leave arduino ide.
Davide Bortolami,
Fermium LABS srl
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #44 on: November 26, 2013, 12:05:46 pm »
Quote
What complete nonsense.

Maybe they defined "market" differently; maybe they used different criteria to rank; maybe they ranked different products, etc.

================================
https://dannyelectronics.wordpress.com/
 

Offline Kappes Buur

  • Regular Contributor
  • *
  • Posts: 136
  • Country: ca
Re: Microcontroller after Arduino
« Reply #45 on: December 04, 2013, 07:18:53 am »
The Arduino boards, such as UNO or Leonardo, are excellent for learning. But, the way they are implemented as BOBs, severely curtails the functionality of the microcontroller.

Used on their own, as already mentioned they can easily be programmed with an AVRISP mkII, ATmega328s are extremely powerful little buggers. Coupled with Atmel Studio 6.1 one can do a lot of things with them to keep one occupied for a long time.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 3098
  • Country: us
Re: Microcontroller after Arduino
« Reply #46 on: December 04, 2013, 09:49:31 am »
Quote
implemented as BOBs
I'm missing something.  What's a "BOB" ?
 

Offline Crazy Ape

  • Regular Contributor
  • *
  • Posts: 181
Re: Microcontroller after Arduino
« Reply #47 on: December 04, 2013, 01:03:41 pm »
Quote
implemented as BOBs
I'm missing something.  What's a "BOB" ?

Bits n Bobs almost fits. Pluggings bits into bobs.  ;D

However, I think in this case the BOB in question is a Break Out Board.
 
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8229
  • Country: 00
Re: Microcontroller after Arduino
« Reply #48 on: December 05, 2013, 12:19:41 pm »
Quote
Coupled with Atmel Studio 6.1

That's a bloated piece of nice software.

I use CB; or if I have to use a piece of bloatware, I would go with IAR.
================================
https://dannyelectronics.wordpress.com/
 

Offline miceuz

  • Frequent Contributor
  • **
  • Posts: 373
  • Country: lt
    • chirp - a soil moisture meter / plant watering alarm
Re: Microcontroller after Arduino
« Reply #49 on: December 05, 2013, 04:27:36 pm »
Berni, you have successfully convinced me to start learning C. Where do I start(complete beginner)? Is the Launchpad coded in C as well?

If you are used to arduino, you can start learning to do that right away. Get the datasheet for the onboard atmega, pull out any arduino example and just do it - first get rid of digitalWrite and digitalRead -- read and write registers directly, then get rid of analogRead, then of analogWrite (this will take a while - setting up timers for PWM is pretty hairy) then replace Serial.*.

Arduino environment is plain simple C++ and you can write plain simple C in it using all the avr-libc macros or functions. www.nongnu.org/avr-libc

Once you get a grip of what's inside of a microcontroller (registers, timers and other peripherals) it's really easy to move to other MCUs.

ARMs might look a bit too complicated at first though. You have more granular control over things, but you have to do more - say, if you want to use uart, you have to enable clock to uart module, set up it's speed, set up the module itself (it will probably have multitude of different modes it can work in), enable specific pins for it and maybe do more stuff like that. On AVR the same is much simpler - enable UART, write byte to a register and bam - it's already banging your byte out on a designated pin.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf