Connect with us

Where to start

Discussion in 'Microcontrollers, Programming and IoT' started by Electric-T, Jul 27, 2017.

Scroll to continue with content
  1. Electric-T

    Electric-T

    212
    9
    Jun 4, 2017
    I want to start getting into microcontrollers. Where is a good place to start? Arduino? And what are some useful languages to know? Ive already started on assembly.
     
  2. kellys_eye

    kellys_eye

    4,282
    1,152
    Jun 25, 2010
    ooooo.....are you trying to start a fight? LOL

    There are 'fans' of all forms of micro controllers and each has its pro's and con's.

    It will boil down to what you want to do with them - and, to some extent, how you feel about the support that each type attracts. The Arduino support base is massive, as are the applications for it.

    Assembly is the 'base' language (other than binary, you can't go any lower) but a lot of modern processors use C (in its many forms) for coding through their respective interpreters and it's very 'portable' between architectures too so consider C (a high level language) as a requirement.
     
    Harald Kapp likes this.
  3. Minder

    Minder

    3,148
    679
    Apr 24, 2015
    I have never used Arduino but have used Picmicro extensively, if you are not comfortable with assembly you could graduate to C, Both have their plus and minuses.
    I tend to have stuck with assembly as that was my original teaching with micro's. PDP8's and 8085 etc.
    M.
     
  4. Electric-T

    Electric-T

    212
    9
    Jun 4, 2017
    ;) I find alot of good information comes out of debate. Yes i know assembly is a very low level language but i feel it could be very useful somehow. I think i might study both c and assembly side by side.
     
  5. Electric-T

    Electric-T

    212
    9
    Jun 4, 2017
    Well i guess i need to do more research but please, all opinions are welcome. One of the reasons i joined the forum is to gain some perspective and learn all i can
     
  6. kellys_eye

    kellys_eye

    4,282
    1,152
    Jun 25, 2010
    Purists will use assembly and there is no more intimate way to program any form of processor than via assembly. It makes for the most compact coding (hence speedy processing) than any other high level language and, being an old fart myself, I was brought up on assembly through the 6502/8088, PICs (the 68705 in particular) so appreciate Minder's thoughts on the matter.

    But if you want to talk to other users you have to use their language and for most this will mean C or its derivatives.
     
  7. Electric-T

    Electric-T

    212
    9
    Jun 4, 2017
    I guess i should experiment a little. Assembly is one i want to know for sure. I guess i was wondering if arduino was a good starter mc. Lets say i wanted to include one in an motion alarm and i wanted to store the times the alarm is triggered and make them accessible via usb.
     
  8. kellys_eye

    kellys_eye

    4,282
    1,152
    Jun 25, 2010
    To do the functions you want - especially accessing USB - you'll struggle doing it with assembly language. This is where high level languages come into their own and, for the Arduino (and others) there will inevitably be library routines that handle the complex parts of the programming to avoid having to re-invent the wheel. Such libraries will also be available in assembly but specific requirements you may have will involve some complex reprogramming that high level languages tend to manage far easier.

    Similarly, accessing the Arduino at assembly level won't be easy, PICs are very much more suited to this sort of programming. I could suggest you download the datasheet for the main processors of the various platforms that are commonly used and see for yourself the number of 'commands' they each use. The PIC is very, very capable and has a low instruction set (RISC) making assembly programing a breeze - sort of....

    Here's the datasheet for the very common PIC16F84 - a very capable device with many useful examples already across the web.

    http://pdf1.alldatasheet.com/datasheet-pdf/view/74975/MICROCHIP/PIC16F84.html

    If you want the best from any platform then going it at the register level via assembly will make you a very proficient user.
     
  9. Electric-T

    Electric-T

    212
    9
    Jun 4, 2017
    Thank you this is exactly what i was looking for
     
  10. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    Yet another option:
    https://sourceforge.net/projects/gcbasic/
    If using the Synwrite GUI it compiles GCB to pure .HEX and .ASM with a click of a button. Both of which can be made visible in the Synwrite IDE, side by side with the GCB code.

    There are lots of vids on Youtube plus a very active forum. GCB does not employ an interpreter as other basic's do, so it doesn't sacrifice speed. You can also find Youtube vids demonstrating GCB speed.

    Chris
     
    Electric-T likes this.
  11. kellys_eye

    kellys_eye

    4,282
    1,152
    Jun 25, 2010
    Electric-T likes this.
  12. Doug3004

    Doug3004

    119
    23
    Sep 5, 2014
    If you stick with the Arduino IDE and the China clone boards, then Arduinos are very cheap and easy to use.

    Atmel (the Arduino processor manufacturer) does have a more complex IDE that is a free download:
    http://www.atmel.com/microsite/atmel-studio/default.aspx
    I've never used it.

    C is the usual Arduino language.
    IIRC there is a way to use asm but it isn't officially supported. Consult Google.
     
  13. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    652
    May 8, 2012
    Electric-T likes this.
  14. Harald Kapp

    Harald Kapp Moderator Moderator

    11,811
    2,751
    Nov 17, 2011
    This IDE plus the WINAVR plugin (for GCC) workes great. The libraries avilable are imho considerably less extensive than those available for the Arduino. But the code you can create with the ATMEL studio in C is typically much faster than the code generated by the Arduino IDE. It seems to be mainly a matter of the underlying libraries and the way an Arduino sketch tries to simplify programming for the inexperienced (see e.g. this discussion).

    Using C/C++ for the main business logic of a program while resorting to assembler (inline code or a library) for critical operations (speed, memory usage) is a compromise often used.
     
  15. vead

    vead

    473
    14
    Nov 27, 2011
    1. you need development board,
    2. compiler to write c or assembly program
    3. Programmer software to programmed your code
    4. when you will programmed MCU , you need cable to connect PC to micocontroller

    personally I use 8501 development board, containing Philips p89v51rd2 MCU. keil complier to write c program and I use flesh magic to programmed p89v51rd2 MCU

    test your board with LED blinking project. there are several programs available on internet. than turn on LED using switch. for example if switch is open , turn OFF LED and If switch is closed turn ON LED.
    so just do it this things you will get starting points. if do you have any doubt, feel free to ask here.
    best of Luck
     
    Electric-T likes this.
  16. Irv

    Irv

    112
    30
    Jun 7, 2017
    One of the good, and bad, things about microcontrollers (as opposed to full computers) is the huge number of peripherals ( input/output sensors and displays) available for little cost.

    The bad part is that information on these (mostly Chinese) parts can be difficult to find, so writing low level code to control them is close to impossible sometimes. Therefore, you have to depend on C code drivers that the manufacturer provides or you can find on the net.

    If you're just getting started, forget assembly language, and work with what is available, which is mostly C++.
     
  17. Harald Kapp

    Harald Kapp Moderator Moderator

    11,811
    2,751
    Nov 17, 2011
    Huh?
    AVRs, PICs are common and documentation is readily available as well as an active online community for these parts.
     
  18. Irv

    Irv

    112
    30
    Jun 7, 2017
    I was specifically referring to the peripherals (sensors and displays). Even seemingly identical devices such as simple temp sensors and LCD displays from different companies have different driver requirements. Information is often not available.

    For someone just starting out, writing device drivers in assembly language without specs is going to be a bit overwhelming.
     
  19. Harald Kapp

    Harald Kapp Moderator Moderator

    11,811
    2,751
    Nov 17, 2011
    Writing code without specs is difficult in any language.
     
  20. kellys_eye

    kellys_eye

    4,282
    1,152
    Jun 25, 2010
    It's usually easy to find the main controlling device part number on any of those modules and downloading the data sheet for them tells you everything you need to know.

    The Chinese don't actually invent the chips - they might fabricate them but the general spec for them is usually available anywhere you care to look. The manufacturers insist on it!
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-