Author Topic: Microcontrollers  (Read 287 times)

felipe

  • Member
  • ***
  • Posts: 374
  • assemble the unassembled.
Microcontrollers
« on: October 26, 2017, 04:11:54 PM »
I was reading about what microcontrollers are (didn't know too much about them) and looks that can be fun (specially if you do the programming stuff in assembly and not in a high level language). But the main problem is to design the thing, buy all, etc, etc. It would be better to work in the programming part in a project with more people i guess. Have any of you worked with these toys? For your own or in a colective project?  :bgrin:
Felipe.

Siekmanski

  • Member
  • *****
  • Posts: 1145
Re: Microcontrollers
« Reply #1 on: October 26, 2017, 10:07:49 PM »
Yes, microcontrollers are a lot of fun to play with. I've done projects using the ATmega's and ATtiny's.
The datasheets are very clear and complete and you can program the microcontrollers in assembly.
You can buy very cheap sensor module kits to make a start using the microcontrollers.
The Arduino's are very populair at the moment and come with a compiler (C/C++) and a lot of libraries and code examples.
I prefer to buy the microcontrollers separately ( they are very cheap +/- $2 ) and program them with the assembler from ATMEL's AVR Studio.

felipe

  • Member
  • ***
  • Posts: 374
  • assemble the unassembled.
Re: Microcontrollers
« Reply #2 on: October 27, 2017, 03:24:27 AM »
That's very cool siekmanski. Did you made an artifact that were controlled by the micro if not, can i ask you where did you used the microcontroller?  :icon14:
Felipe.

felipe

  • Member
  • ***
  • Posts: 374
  • assemble the unassembled.
Re: Microcontrollers
« Reply #3 on: October 27, 2017, 04:51:12 AM »
I was seeing some PIC microcontrollers. You are right they are very cheap. I think i will start learning the assembly for them and i will use some virtual environment first, to program them. Maybe i can found some job later on that.  :bgrin:
Felipe.

Siekmanski

  • Member
  • *****
  • Posts: 1145
Re: Microcontrollers
« Reply #4 on: October 27, 2017, 05:54:41 AM »
I have used them in a car computer, CNC machine, dog race timing system ( fully running on an ATmega 328 ), Radio communications etc.
And together with my little nephew we did some funny projects.

I must warn you, once you get started it can become an addiction.  :bgrin:

felipe

  • Member
  • ***
  • Posts: 374
  • assemble the unassembled.
Re: Microcontrollers
« Reply #5 on: October 27, 2017, 12:56:42 PM »
That sounds awesome, congratulations!  :greenclp:

Even the part of the addiction sounds awesome.  :biggrin:
Felipe.

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: Microcontrollers
« Reply #6 on: October 30, 2017, 02:26:38 AM »
over the years, i've worked with a few - 8048, 8051, older PIC's

recently, i spent a little money on some arduino "stuff" - i am just getting started, really
i got a few different arduino models, some displays, sensors, and dev kits
i am good to go as soon as i make a little space to work with it - lol
for now, i can get some reading out of the way  :biggrin:

what i find a little overwhelming is that there are so many different boards out there to play with

at first, i dug into the atmega2560 (used on Arduino Mega2560) and the SAM 3X8E (used on Arduino Due)
then, i thought - wait a minute...
if i figure out which chips are used on the different boards,
i can organize my studying to avoid duplicate time and effort
(many of the atmel chips have similar instructions sets, for example)

it was a good experience to just go back and figure out which boards have what features
some of them, i am not really interested in at this time (maybe later)
to give you an example, one of the arduino models is intended to be a game controller of sorts
there are other models that are meant to be sewn into clothing for "gadgets" - whatever - lol

this is a list that i found very helpful - maybe it will help you, too...

http://platformio.org/boards

select page on bottom-left
select number per page on bottom-right
if you select 1000 per page, all boards are on one page

felipe

  • Member
  • ***
  • Posts: 374
  • assemble the unassembled.
Re: Microcontrollers
« Reply #7 on: October 30, 2017, 04:35:48 AM »
Thanks dedndave. Yesterday i was reading about the 8051 of intel. Looks pretty good, also there are some good assemblers and simulators for free for it. I also read that for arduino is near impossible to write in assembly for it.

You are right about the "engineering part" of knowing what do you want and then choosing one microcontroller. For now i'm familiarising with the microcontrollers world. When i get ready i will start a real project with one. I'm sure it will be very fun!  :biggrin:
Felipe.

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: Microcontrollers
« Reply #8 on: October 30, 2017, 04:50:21 AM »
not true at all

in fact, newer versions of the arduino IDE support assembly language
the older versions may be modified (changing a few text files) to accommodate assembler

another way is to use an ICE programmer (not very expensive) with atmel's AVR assembler
Marinus was saying that he likes the AVR assembler syntax, etc

both are free to download (only the ICE costs money)

i plan on trying both methods, just to see which is easiest for me

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: Microcontrollers
« Reply #9 on: October 30, 2017, 04:54:32 AM »
.... the 8051 is a fine chip, for it's day
these newer chips do kind of make it obsolete (well, old hat, at least)

for one thing, the 8051's that i'm familiar with were 40 pin dip packages, running 12 MHz max
the 8051 also lacks multiply and divide instructions - you have to write your own

if you want to play, i don't think there's an easier way than an Arduino Uno to get started
they run something like $25   :P

... they use an Atmega328P microcontroller running at 16 MHz
all the docs are available on the microchip website

http://www.microchip.com/wwwproducts/en/ATmega328P

https://www.arduino.cc/

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: Microcontrollers
« Reply #10 on: October 30, 2017, 05:06:41 AM »

Siekmanski

  • Member
  • *****
  • Posts: 1145
Re: Microcontrollers
« Reply #11 on: October 30, 2017, 11:36:44 AM »
The cheapest and most direct option is buying these items on aliexpress.com

Search for: isp+programmer ( 1 dollar, incl. delivery costs )
Search for: ATMEGA328P-PU ( 1.50 dollar incl. delivery costs, DIP28 type which can be used with a breadboard )
Search for: breadboard (1 dollar incl. delivery costs) and jumper wires (65 pieces 1 dollar incl. delivery costs)
Search for: breadbord usb power regulator ( 1 dollar incl. delivery costs )

Buy some capasitor and resistor assorted kits and some leds and your ready to start writing your first blinking led project.

You can use the ATMEL avr assembler for writing your asm code and download AVRdude for writing the hex file to your microcontroller via the isp programmer.

Connection Pinout ATmega48P/88P/168P/328P ( and ATmega8 )




felipe

  • Member
  • ***
  • Posts: 374
  • assemble the unassembled.
Re: Microcontrollers
« Reply #12 on: October 30, 2017, 11:50:01 AM »
Thanks a lot dedndave. I eventually will find wich microcontrollers to program. I know that arduino is used here in my country. There's also the ARM flavour. I readed that they (the microprocessor's cortex-a series, i think) are in almost every celullar phone in the world (90%).
I think that a lot of microcontrollers of today are based in the 8051.

What i want to do is to know more about this fantastic world, including the assembly language of one of them. Do some programming (i already have done very little of this using mplab-ide for a PIC microcontroller). Then, when i get more serious on a project, i will find the appropiate board and do the whole stuff.  :idea:
Felipe.

felipe

  • Member
  • ***
  • Posts: 374
  • assemble the unassembled.
Re: Microcontrollers
« Reply #13 on: October 30, 2017, 11:51:37 AM »
Thanks siekmanski  :icon14:
Felipe.