Author Topic: Help a beginner get started with mcu's  (Read 3429 times)

0 Members and 1 Guest are viewing this topic.

Offline avogadroTopic starter

  • Contributor
  • Posts: 34
  • Country: hr
Help a beginner get started with mcu's
« on: July 12, 2018, 01:40:13 pm »
Hello,

I want to learn how mcu's work and eventually be able to build a board and program the mcu on it. I have played around with arduino but I feel like I'm not really learning. Anyway I was looking around the web about embedded but I'm just getting more confused. They are millions of different chips to start playing with. There are people suggesting that I first get a book about computer architecture, operating systems, kernels etc. Others are suggesting various different discovery or eval boards... Some say just pick up a datasheet on the mcu and start figuring things out...

So what would be the best place to start with? I'm not a complete beginner tho, I know the basics of c and pretty much what you learn in first year EE.
 

Offline ljwinkler

  • Supporter
  • ****
  • Posts: 48
  • Country: ie
    • LJ Winkler's blog
Re: Help a beginner get started with mcu's
« Reply #1 on: July 12, 2018, 02:29:04 pm »
Hi avogadro,

The best way to learn stuff it to set a reasonable goal, even a blinky LED could be a project for start.
Define what would you like to achieve? There are tens of approaches to the same problem.
You could pick an Arduino to make a simple clock/thermometer on a 16x2 LCD or adapt ARM to capture images from a camera.
Arduino (or rather the entire AVR family) is quite rich in the matter of features, you have serial, I2C, SPI, ADC, EEPROM already built in.
Other micros could be PICs, STMs, MSPs.
One can be better than other in a specific application, do you need lower power consumption or high processing power? Do you need only 2 I/Os or tens of them?

Find a project on instructables, follow the steps, then break something and try to figure it out why it is not working.
Debugging is the best way to learn.
Try to modify the project by adding additional functionality, components.

You could start with an Arduino Blink project.
Then add a button to it and change the code to blink different rates depending on the button state (you'd need to combine 3 Arduino examples to get the result), then maybe add a second LED... let it blink every 10th time you press a button (you'll learn then about debouncing when you discover that pressing the button once makes 10s or 100s of contacts of the contacts (PUN intended :))

Tell us what you want - we will guide you to get this done. Pick something simple, achievable that wont discourage you, don't start with plans of creating a TV :)


Offline agehall

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: se
Re: Help a beginner get started with mcu's
« Reply #2 on: July 12, 2018, 02:33:50 pm »
Why do you feel you are not learning from playing with an Arduino?

If anything, Arduino has made learning basic embedded development trivial. You can easily buy a standardised board, use an IDE that is trivial and work your way up from there. Once you are comfortable with the Arduino platform, you can start tinkering with moving outside out Arduino but still use Arduino boards. From there, start designing your own boards as you need them...
 

Offline stian

  • Contributor
  • Posts: 14
  • Country: no
Re: Help a beginner get started with mcu's
« Reply #3 on: July 12, 2018, 03:37:12 pm »
Why do you feel you are not learning from playing with an Arduino?
I can guess why..  The arduino ide sucks. now thats just my opinion. some will say its great to get started. well idk.
What you can do is code in C rather than C++ and skip the arduino ide. or still code in C++ if you prefere.

Once you get rid of the Arduino wrapper you will start learning more about the microchip.
You will be using registers, flag and more, way way more than whats going on in arduino ide.
learn about different Interrupt routines. and so on.

But you would need to learn
1* how to use avr-gcc to compile your code to object file(s) with correct flags and such
2* how to use avr-gcc to link object files with system libs, <avr/io.h> etc.
3* how to create ihex from object.
4* how to use avrdude and uploade your hex.
5* how to use avrdude to set fuses if needed.

Arduino ide does this all for you when you press uploade.
A good place to start is https://www.nongnu.org/avr-libc/user-manual/index.html and google, and irc freenode #avr  :)
« Last Edit: July 12, 2018, 03:53:06 pm by stian »
 

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: se
Re: Help a beginner get started with mcu's
« Reply #4 on: July 12, 2018, 03:48:22 pm »
I agree 100% that the Arduino IDE sucks. But it is hard to find an easier way to get started with MCUs. The actual limits of Arduino in terms of learning how to develop for embedded systems is pretty high - even flipping 3d printer control software is written in Arduino - so I would argue it is a very convenient and easy way to get started.

Once you move to avr-gcc & co you have a whole host of problems you can run into that are not related to the embedded development itself. If you are looking to learn how to use microcontrollers rather than how to play sysadmin for your build environment, Arduino is the way to go until you really understand what you are doing.

Even switching to a fullfledged IDE such as Atmel Studio will be error prone - there are simply a lot more switches and buttons to press that you don't need in the beginning and unless you know what they do and understand why they are useful, they are mostly complicating your life.

Of course all of this depends on ones background and knowledge. If you have a strong software development background, a fullfledged IDE might not be a problem at all. But if you are new to both development and electrical engineering you'll probably be better off starting with the existing building blocks, at least until you know how to use them and understand why you need something different.

Personally, I often start with simple Arduino stuff for prototyping. If the project works out, I might design up a small custom board to host it instead of using standard arduinos.
 
The following users thanked this post: tooki

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #5 on: July 12, 2018, 03:49:53 pm »
Congratulations to Croatia on the World Cup game yesterday!

You're right, there is a lot of difference between building a project on an Arduino (usually just cut and paste) and really understanding the underlying hardware.  Furthermore, the internals are different for various families like PIC, AVR, ARM, RISC-V, etc.

I think if you sit down with the ATmega328P datasheet and read through the hardware description you will get the idea of how each instruction manipulates that hardware.  For example, the User Manual for the ATmega328p (used in Arduino) on page 25 shows a block diagram of the internals of the CPU itself.  Those black trapezoids are multiplexers, selecting one of two inputs to connect to the output.  You are looking at what is  known as the 'datapath'.

A description of the instruction set starts on page 432.  You can take an instruction, refer back to page 25 and imagine how it works.  How does each MUX need to be set to execute the instruction (usually in one cycle).

The datasheet is 442 pages long and, mostly, every one is important.  It'll take some nighttime reading to get thru it.

You don't need to know everything there is to know about the internals as long as you know where to go to get the information.

http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf

This manual will give you a short course in one form of computer architecture.  But the chip is both modern and used by the millions, it is important to know how it works.

Once you have a handle on the chip itself, you can look through the Arduino libraries to see how the programmers took advantage of the features.

It's a long path if you really want to know all the nuts and bolts. In both undergrad and graduate school, all I studied was computer design (and a bit of programming).  I like hardware, that's why I play with FPGAs.  This would be a logical next step.  The LC3 project is quite popular at the university level (CS2xx level).

http://www.cs.colostate.edu/~fsieker/TestSemester/assignments/LC3CSU/doc/index.html
https://www.amazon.com/Introduction-Computing-Systems-Gates-Beyond/dp/0072467509

Not only do you need to know how a CPU operates, you get a chance to actually implement one in an FPGA and program it in assembly language or C.  It's an interesting project and that's a great book!

There's a reason so many universities are using that project.



 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #6 on: July 12, 2018, 03:55:22 pm »
If you want a full-featured IDE, consider Microsoft Visual Studio Community Edition (free) and the VisualMicro add-in for Arduino:

https://www.visualmicro.com/

Works well.

I simply can't use the Arduino IDE.  The text is too small to read on a very high resolution display and I have to mess around and change the colors because I can't see red or orange.  The Arduino IDE is truly trash!
 
The following users thanked this post: tooki, agehall, Cody Turner OKC

Offline agehall

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: se
Re: Help a beginner get started with mcu's
« Reply #7 on: July 12, 2018, 04:13:40 pm »
I simply can't use the Arduino IDE.  The text is too small to read on a very high resolution display and I have to mess around and change the colors because I can't see red or orange.  The Arduino IDE is truly trash!

I'm not defending Arduino, but you can set the text size and even interface scale, so that shouldn't be a problem...
 

Offline picandmix

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: gb
Re: Help a beginner get started with mcu's
« Reply #8 on: July 12, 2018, 04:53:26 pm »
Hello,

I want to learn how mcu's work and eventually be able to build a board and program the mcu on it.

An alternative view and very popular a few years ago before Arduino really took off, was to program Microchips Pics in Assembly code, that really does get you involved down to the bit and byte level and some more in depth knowledge of the basic micro hardware.

Still some good tutorial around http://www.winpicprog.co.uk/pic_tutorial.htm
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #9 on: July 12, 2018, 05:03:54 pm »
You can program the AVR used on the Arduinos in assembly or regular C too, there is no need to use the Arduino IDE.

I think the thing that annoys me the most about it is that it doesn't remember the window size, at least the version I have doesn't. Each time I open a new file it opens in a tiny window rather than taking the size of the previous instance like most software.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #10 on: July 12, 2018, 05:35:32 pm »
I simply can't use the Arduino IDE.  The text is too small to read on a very high resolution display and I have to mess around and change the colors because I can't see red or orange.  The Arduino IDE is truly trash!

I'm not defending Arduino, but you can set the text size and even interface scale, so that shouldn't be a problem...

Yes, after spending time on Google, it is possible to fix the GUI.  Some can be fixed in File->Preferences but colors have to be fixed by editing a text file: \Arduino\lib\theme\  The thing is, nobody puts something like color configuration in an external file.  Especially when a large percentage of the adult male population has some form of red-green color deficiency.

There are other IDEs that work a lot better and don't cost anything.  The Arduino IDE is still the standard, almost all project videos will use that GUI.
 

Offline Old Printer

  • Frequent Contributor
  • **
  • Posts: 745
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #11 on: July 12, 2018, 05:45:29 pm »
About 15 years ago I worked on a hobby project with PICs and model airplane control. Some RF but mostly IR because the models were indoor and very small, and IR is sooo much easier then RF. I bought my TEK 475 and had a ball and built some working systems, but... I had a NASA level engineer holding my hand and doing all the serious work. All I did was copy what he told me to do, and try to understand some of what was going on. I put electronics aside from 2005 until 2016 for life, but when I came back I wondered what this Arduino thing was I kept reading about. It was probably a year before I really got what it was about because I was not much interested in micro controllers. From someone who is learning this alone and on the forums and internet I have to say the Arduino was a stroke of brilliance to introduce mcu's to those of us who electronically don't know their ass from their elbow. As much as it may frustrate the more knowledgeable, it really was a great idea. Anyone can move beyond it any time they are ready and want to, but it does serve a purpose.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #12 on: July 12, 2018, 05:59:37 pm »
There is a very old book, available from Alibris.com, called "Computer Architecture" by Caxton C Foster.  Late in the book he presents the design of a trivial 16 bit minicomputer called "Blue" that might have sold for a few thousand dollars back in the late '60s.  This is not an architectural achievement.  And Blue is the color of the box...

But it is a complete machine expressed in terms of gates and flops ready to run assembly code.  I have never implemented that CPU but I have spent 40+ years thinking about it.  The CPU is truly trivial.

In the following chapter he introduces Indigo and that CPU includes index registers.  A nice upgrade.

It might be worth trying to get a copy of the book although I have no idea how hard that might be to do from Croatia.

http://www.drdobbs.com/embedded-systems/the-spartan-blue-cpu-in-verilog/228700593

 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #13 on: July 12, 2018, 06:56:52 pm »
It took me a long time to warm up to the Arduino, but I will say that for all its warts, it has accomplished great things in terms of making microcontrollers accessible to beginners. Even for those of us who are more experienced, I like the inexpensive Arduino clones and widely available libraries because I can quickly hack something together and have it working. It allows me to spend my time on the interesting and/or unique aspects of my project rather than trying to decipher a Chinglish datasheet and bit-bang control some IC or sensor.
 
The following users thanked this post: tooki

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Help a beginner get started with mcu's
« Reply #14 on: July 12, 2018, 07:27:43 pm »
Personal experience, personal opinion:

I started years ago with the PIC16F in Assembler; I'm sorry to say so, but PIC Assembler sucks; so I tried in C via SDCC, which is pretty crippled due to the ongoing development and the dependency from Microchip headers; in commercial compilers im not interested.

I switched then to the ATMEL Mcus and was much happier since it has a free and opensource library, compiler and burner. I'm no fan of Arduino after all; the code sucks, is undermining the performance of the ATMega chips and the IDE is a pain. It's no big thing to start with plain avr-gcc compatible code and get to use the plain and unlimited power out of the Mcu.

As a step to 32bit-architecture, I tried ATMegaX, but it couldn't convince me, so I ended up with ARM architecture and its exponent STM32; it takes some time to get along with it, since with its headers it's less intuitve than avr-gcc, but it does what it should.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #15 on: July 12, 2018, 07:44:19 pm »
If the subject moves to ARM, buy a copy of "Mastering the STM32" and follow along from installing the toolchain.  An excellent book.

PIC assembly is awful, the chip architecture (of mid-range 16Fs) just sucks.  The C compilers may hide the fact but look at the emitted code.  About half the cycles are involved with banking and paging.

I started using AVRs with the ATmega128 and the GCC toolchain (and AVRDude).  I like that chip and I like that toolchain.  I was doing the work under Linux so I had all the normal Unix tools as well.  A very nice way to get started.

The problem with starting out with bare iron and no libraries is you have to learn every single peripheral and write all your own drivers.  That is a pretty easy task for someone with a bunch of experience.  Maybe not so much for a newcomer.  It might be worth taking a peek at the Arduino libraries to see how they did stuff.  Not so much to copy and paste but rather to see how they set up the registers.

Once you get to interrupts, you soon get to queues and other data structures.  That's another step up and not in a hardware direction.  Pretty soon we get focused on computer science and less on hardware.

MCUs is a really big topic going from blinking LEDs to a full interrupt driven RTOS with networking.  There's a lot to learn!
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Help a beginner get started with mcu's
« Reply #16 on: July 12, 2018, 08:28:11 pm »
The AVR toolchain is really great; well I cannot speak for WinGCC a.s.o. but on Linux it just perfectly integrates in the system environment.

If you rely on the bare toolchain, you still have some basic functions for e.g. eeprom, progmem, interrupt aso. I don't know; Arduino aims to get the people coding, but actually what comes out is no real code; it might well do what it should, but we are still talking about a Mcu with maybe a few kB program memory - I see no sense in filling it with a bloated code like the one coming from the Arduino toolchain.
 

Offline DrMag

  • Regular Contributor
  • *
  • Posts: 61
Re: Help a beginner get started with mcu's
« Reply #17 on: July 12, 2018, 08:33:08 pm »
I'll chime in with some thoughts in another direction than has been suggested so far...

If you're serious about learning how mcu's work, I would suggest getting yourself a TI Launchpad. The MSP430 has an extremely clean architecture, and (arguably, I'll admit) is easier to understand than other architectures. You can use TI's IDE (eclipse based) for free as long as the code size is under 16kb.. which covers a very large portion of the selection of MCUs available. There's a gcc compiler for the MSP430 too. And if you want to move into ARM, they've got the new MSP432, which puts the MSP peripherals onto a 32-bit ARM core.

[shameless plug]

A few years ago, when the Launchpad was brand new, I wrote a series of articles about basic MCU topics. It seemed to be very well appreciated by the community, so it might be worth a look if you go this route. You'll find it at http://mspsci.blogspot.com.

[/shameless plug]

I've always been meaning to get back to doing that kind of writing. One of these days...
 
The following users thanked this post: james_s

Online Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3322
  • Country: nl
Re: Help a beginner get started with mcu's
« Reply #18 on: July 12, 2018, 10:41:39 pm »
The Java contraption which some people claim to be an IDE in the "arduino" world is not more worth than @#$%^&*.

The AVR microcontrollers behind it are however as capable as any other microcontroller family. No matter which uC family you choose, they will all have UsARTS, SPI, I2C, Timers, Interrupts, watchdogs, etc.

One of the biggest advantages that the AVR's have over a lot of other uC families is full support from the high quality GCC compiler.The ARM processor core is also supported by GCC, but these are often more difficult to set up. "Just" GCC support is not enoug, you also need a linker script, startup code and the right way to glue this together with your own code.

As you say you have already done some stuff with arduino, I assume you have the hardware for it. "arduino nano" boards from Ebay / Ali / China / etc can be grabbed for the price of the postage stamp. Just put them in a Breadboard, apply power, and go from there.

My advice is to start with abandoning the arduino Java contraption (called ide), but still use the arduino framework for a while.
"Atmel Studio" is a capable IDE, based on M$ Visual studio and it can directly import arduino projects. You can also use Platformio to set up arduino projects.
Once you have an arduino project in Atmel Studio or in Atom (Default IDE for Platformio), you can see the whole code, and follow it through the "arduino" libraries and see what is actually happening behind the scenes. The arduino framework is divided over around 20 different source code files, and as many header files.

Assembly is a good tool for learning computer architecture, but not productive enough for almost any real work. C and C++ have become the default languages for small embedded microcontrollers. Assembly is still being used in some niche areas such as:
- Task switching in RTOS systems.
- Very time critical code (Bit banging low-speed USB on an AVR, search: "obdev").
- Intermediate step for the C compiler. (No compiler can be written without asm knowledge).
- Schools for Learning the basics of uC architecture.

Apart from these (and a few other) niches assembly has no real use anymore.
C and C++ are very much standarized langugages. I can take a library to control some external hardware in C / C++ from github written for any uC architecture and port it to AVR, even if the library was originally written for another uC architecture. You have to change how the uC's internal peripherals are handled, but apart from that the code is much the same. In assembly you can forget that. The whole thing has to be rewritten from scratch.

GCC can output listing files, which are human readable and they have both the original C / C++ source code and the by the compiler generated ASM instruction. This can be a valuable tool for understanding how asm is generated from C and the results of different ways of code writing and compiler optimastion settings. Reading asm is a lot easier than writing asm, especially if you already know what it does because the corresponding line of C code is above it.

https://www.avrfreaks.net/ is a very active and great forum for anything related to AVR's.

If you want to go this way, an interesting excersise is to examine why "digitalWrite()" is so horribly slow, and then replace it with some direct register manipulation where applicable.
"digitalWrite()" is acceptable for turning a relay on/of, but not for doing bitbanging of some serial protocol, or toggling the strobe signal of a TFT lcd.

Anyone starting with microcontrollers should buy a logic analyser together with their first uC board. Search Ali / Ebay / China / Etc, for "24m 8ch" and use that Salaea clone box with the excellent Sigrok / Pulseview combination.
https://sigrok.org/wiki/Supported_hardware

Other good resources are reading the dataseets of the uC's you are intested in (they are all on the 'net) and books about general programming in C or C++. I love these languages, but they can be abused in horrible ways. Writing code in a clear and comprehensible way is 80% of a good program. This can also easily be done on a PC. I often write and debug C functions on a PC before I recompile them for a uC. Stuff like CRC algorithms, button debounce code, Menu's string manipulation and lots of other stuff is easier on a PC than on a uC.

Have Fun.
 
The following users thanked this post: avogadro

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14076
  • Country: de
Re: Help a beginner get started with mcu's
« Reply #19 on: July 13, 2018, 09:07:46 am »
The AVR µC used in the small Arduinos is a nice µC to start. It is reasonably easy to understand and has good C (GCC) support.

I don't know the ARduino software environment, but it's mainly a set of C++ libraries to give a supposed easier interface to the hardware. One can still use the Atmel Studio IDE with the Arduino hardware. It's even possible to use direct HW access within the Arduino environment. There is no need to use the C++ constructs. One can still use essentially normal (a few bad practices are no more allowed) C code with a C++ compiler.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6172
  • Country: fi
    • My home page and email address
Re: Help a beginner get started with mcu's
« Reply #20 on: July 13, 2018, 01:19:35 pm »
... avrfreaks.net ... Saleae clone ... Fun
Absolutely agreed!

I would recommend the $5 Pro Micro (ATmega32u4) clones from eBay and elsewhere. They have the same bootloader and hardware as Arduino Leonardo, so if you do use the Arduino environment, you just select Arduino Leonardo from the board list.  You can reprogram it via USB using AVRdude (software), so all you need is the board and an USB cable to get going.  You can also just drop the Arduino environment, and do your development on bare metal, using just avr-gcc (as the compiler), avrdude to upload the firmware, and whatever editor you want to use for C or C++ code.  (You can also grab Arduino library sources, and edit them and use in your own programs, but if you distribute the modified sources, do remember to abide by the licenses.)

The Atmel ATmega32u4 microcontroller on Pro Micro clones has native USB 1.1 (2.0 compatible) interface, which allows you to experiment with creating your own USB HID widgets (keyboards, mice) without needing any kind of drivers on the computer it is connected to. It can easily reach a megabyte per second transfer rates using USB bulk endpoints (like serial port emulation), so all sorts of data transfer stuff is possible. Pro Minis (ATmega328p) use an UART-USB bridge, and cannot be used as HID devices.

For really small stuff, I've been experimenting with DigiSpark clones.  These are ATtiny85 microprocessors with a software-based USB implementation. Some are with an USB cable, others implement the male USB connector on the circuit board itself. There are only a few I/O pins, and very limited peripherals, but they're interesting if you want to learn how to utilize a small microcontroller fully.

As a first project, something like a Pro Micro with an SPI or I2C connected display module (TFT or OLED), a few buttons, and HID interface (joystick? macro buttons?) to a computer should be really fun!
 

Offline Mattjd

  • Regular Contributor
  • *
  • Posts: 230
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #21 on: July 15, 2018, 02:57:29 pm »
Why do you feel you are not learning from playing with an Arduino?

If anything, Arduino has made learning basic embedded development trivial. You can easily buy a standardised board, use an IDE that is trivial and work your way up from there. Once you are comfortable with the Arduino platform, you can start tinkering with moving outside out Arduino but still use Arduino boards. From there, start designing your own boards as you need them...


Its for these reasons specifically that I disagree with starting with an arduino. Arduino should never be used in a real product, its for hobbyist. More importantly the amount of abstraction in the arduino platform is bad for beginners, imo. If you want to learn embedded programming you should learn how to read datasheets and interact with the registers, for this, I suggest the MSP. Once you have done this with basic peripherals in raw code (ie no libraries) then try your hand at using the msp430 libraries to get a really good grasp of just how memory mapped peripherals work. At this point you should start using an arduino.
« Last Edit: July 15, 2018, 03:00:00 pm by Mattjd »
 

Offline Raj

  • Frequent Contributor
  • **
  • Posts: 689
  • Country: in
  • Self taught, experimenter, noob(ish)
Re: Help a beginner get started with mcu's
« Reply #22 on: July 15, 2018, 03:21:41 pm »
First choose a line of mcu,
then choose a language
then get a basics book that meets those requirments
They usually contain information of archetectures too.Microcontrollers don't run on operating system unless you go into advanced rtos or arm stuff.
Also,Do you know any programing language apart from 'c'? if yes,which ones?

I suggest looking at sample pdfs of pearson's books and see which one you're most comfortable with.

I also suggest you get into atmels and start by downloading the atmel studio

I'D NEVER SUGGEST PIC TO A BIGGNER,STARTING WITH ATMEL IS WAY CHEAPER,YOU JUST NEED 4 RESISTORS AND A PARARELL PORT PLUG INSTEAD OF A COMPLICATED PROGRAMMER.

And apparently,you don't know how circuits work and hence the statement that you want to create your own boards.

If your laws allow,get ferric chloride,toner transfer paper or oil paint, a drill , a soldering iron and simply start making circuits.go in this order-
flashlights
555 circuits
copy other's circuit
diy led light bulbs
transistor based stuff (simple oscollitors,then simple logics)
4000 type logic
7400 type logic
microcontrollers

If you're smart,I think you should get into AI instead. Unless you are really dedicated and ready to work real hard,you won't generate profit or go anywhere.
« Last Edit: July 15, 2018, 03:40:14 pm by Raj »
 

Offline Raj

  • Frequent Contributor
  • **
  • Posts: 689
  • Country: in
  • Self taught, experimenter, noob(ish)
Re: Help a beginner get started with mcu's
« Reply #23 on: July 15, 2018, 03:30:43 pm »
I simply can't use the Arduino IDE.  The text is too small to read on a very high resolution display and I have to mess around and change the colors because I can't see red or orange.  The Arduino IDE is truly trash!

Jeez.Had you been in a company doing work on there computers,you would have had to buy new pairs of glasses every year.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 9886
  • Country: us
Re: Help a beginner get started with mcu's
« Reply #24 on: July 15, 2018, 03:32:41 pm »
And I disagree with NOT starting with the Arduino.  Starting with a bare chip of dubious support can be a high mountain to climb.  Think like a beginner!  Toolchain to install ("what's a toolchain?"), datasheets to read ("what's a UART?", "do I need to know?"), code to write ("what's a pointer?" or worse, "what's an object?"), device programming ("JTAG?  ICSP?") and inevitable failure ("why doesn't it work?").

Sure, we all overcame this but we soon forget just how long that process took.  It's particularly onerous if you happen to make the mistake of starting with the PIC 16F with assembly language.  Paging?  Banking?  What a PITA!

The other mistake might be starting with the full featured ARM chips.  There are just too many possible pin configurations and it takes hours of reading to get the chip to start.  This can be particularly problematic for the older arm7tdmi where the startup code MUST be written in assembly language.  Abandon hope all that enter here!  The ARM Cortex chips are easier in that regard.  I like the mbed platform myself, especially the original LPC1768 variant.  Of course the online toolchain comes with a lot of libraries - I sure don't want to write my own TCP/IP stack!

When I started playing with the ATmega128, I was using Linux, 'make' and AVRdude.  AVRlib was available so things weren't hopeless but still, it took a ton of reading to get my project to work.  I had the advantage of knowing what to look for and where to look.  Lacking that, creating a Makefile can be a daunting task and, worse, it has essentially nothing to do with the project at hand.  Which AVRdude options to use?  Well, that's anything but straightforward!

Newcomers want results, not an MS in EE or CS!  The Arduino is easy to use, the toolchain is simple to install and every possible application has already been created and it's on Google.  It's a perfect learning environment just because every conceivable library is already provided.  Now, once having gotten results and with a new application beyond the Arduino's capability, it's time to branch out.  But there is now an experience base and if the newbie has spent any time with the datasheet alongside the code they will know what to look for.  How to set baud rate, where the UART comes out, UART level translation, how to configure pins for input/output and so on.  They might understand I2C and SPI, they have something to build on.  Anybody want to code their own I2C state machine?

Isn't that ATmega328P datasheet about 442 pages?  Just a little light reading!  At some point, every single page is important!  The ARM datasheet and user manual are separate documents and they are each voluminous.

Everybody has to start somewhere.  I started with the IBM 1130 and CDC 6400 back in '70 and it's been a fun ride.  The early days of microcomputers was an interesting time but I do not want to go back to using something like SID for debugging - step by step.  There were only a very few chip sets:  8080/8085, z80, 6502, 1802 and essentially no help.  Here's the chip (board?), knock yourself out!

I fully support the idea of starting with the Arduino and getting results fast.  The rest of the stuff will come along when it does.
 
The following users thanked this post: tooki, Cody Turner OKC


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf