Looking for 8 bit small controllers

Status
Not open for further replies.

Alan8947

Full Member level 4
Joined
Sep 21, 2016
Messages
215
Helped
9
Reputation
18
Reaction score
11
Trophy points
1,298
Activity points
3,746
Hi

I've been retired for 17 years and I was more into analog RF design before. I did design using HC11 long time ago but just on the hardware side.

I want to design with the more modern and popular controllers today and I need suggestions. The things that I am looking for is very much like HC11 which includes:

1) 8bit.
2) with ADC and DAC.
3) easier to solder at home, no BGA or types that requires special soldering tools. SMD is ok as long as it's not too small.
4) Popular, that I can get help here with programming.

My goal is to design some controller for my other projects. Also, I just learned C++, I want to put it into practice by writing codes for the micro controller.

Thanks
 

Solution
Hello!

As usual, 10 engineers will give you at least 20 different solutions, so I will add
my contribution:
I use C++ heavily for all my last 20 years projects (not hobby, I do this for living).
I have been programming with MSP430 which I know best, and recently with STM32.

I think MSP430 has a big advantage in terms of simplicity with its linear address space
(Von Neumann architecture). As for C++, there is some overhead for small programs, but
there are very big advantages in terms of "source code factorization" if you do something
more complex. Usually it is said that all what you do in C++ can be done in plain C
and all what you do in C can also be done in assembly. But for my point of view, there
is nothing you can do in...
Hi,

I really wonder why you continously ask for simplicity, mention soldering issues, are worried about C++.
While you don't comment on Arduino ... which in my eyes solves all these problems.

It's simple to start with. My cousin is carpenter without any electronics or programming knowledge and is able to do Arduino projects.
It supports several microcontrollers from several brands ... from small AVRs... up to dual core ARM based 240MHz ESP32 with WiFi .., even for WEB applications.
A huge community with tons of videos for every problem. An easy start with existing hardware and existing software.
If you start with Arduino you are not bound to arduino, neither the boards, nor the IDE.

Klaus
 

Actually I am looking at ATMEGA328 from your advice in post #7 as one of the two possible choice. I have not even looked into how to program them yet.

I am literally concentrate on the package that is easy to handle at home(soldering), availability(from Digikey) at this point. All the stuffs you and others mentioned might be very elementary to you, but it's all new to me. I am open to use arduino, I am just hoping to nail down to one particular chip first and then dig deeper into how to program it.

I have not looked into Arduino, is it like a compiler that you write program in C++ and it will compile for you and you load into the MPU? Sorry I ask question like this that I suppose to know. Ha ha, I just learn what IDE means today, this is the level I am at!!!

My experience is really strange working in small company environment. I can read the datasheet and design hardware with MPU like this with all the hardware. Then I just hand over to an engineer and he "magically" put in the program and it ran!!! I never even bother to ask how he did it. I never ran into hardware circuit problem, he just programmed what I gave him and I never even looked back. I did a few projects like this.

That's why I have a huge hole in my knowledge. Give me one MPU chip, I'll design the circuit using the datasheet. Layout the pcb for you and you can take over and I'd never see the project again!!! I really regret this, but I was too busy with more difficult design in other area at the time, I never stop and even try to know what the firmware guy was doing and how he did it. Now I am paying the price because I have nobody to throw to anymore!!!!

So I am literally picking the chip at this point and go from there.

Can I use Arduino for ATMEGA328? Can I use C++? I don't mind using this one, it's available, it is 28pin DIP, it's cheap and it has ADC and DAC. If I commit to this, then I can go to the next step and look into Arduino. I am just hoping to find a lower pin count DIP device.

Thanks
 
Last edited:

Hi,

Don´t get me wrong. I don´t get paid from Arduino. And I´m not the one who is focussed on Arduino or does recommend Arduino for professional use. But I think in your case it´s the best to start with.

I´m commenting on Arduino:
that is easy to handle at home(soldering),
for first tests: nothing to solder. Already soldered on board. Connect it with an USB cable to your PC. Done.
Should be available.

I am just hoping to nail down to one particular chip first
Why? If you can handle one AVR you can handle all AVR. Programming will be the same. Assembler will be the same. They just come with different packages, different pin count, different periferals... this all is one familiy.

And further:
If you can program a microcontroller with C++ then it´s not a big deal to program a completely different microcontroller (family, brand) with C++. The compiler will do the main job to adjust to the microcontroller.
For sure there is difference. But with C++ (or any other higher language) changing the microcontroller it´s by far not that complicated as with assembler. That´s why we have languages like C++ .. ..

I have not looked into Arduino, is it like a compiler that you write program in C++
Yes. I strongly recommend to watch some "beginners tutorial video" on youtube.
Arduino is made for beginners, for non professionals. You immediately have the feedback of success.

And if you later want to step to soemthing more professional... you even may use parts of your code and the existing hardware.

this is the level I am at!!!
And this is the level Arduino is made for.

Now I am paying the price because I have nobody to throw to anymore!!!!
Relax. Don´t stress yourself. If you start with Arduino from the scratch .. buy some Arduino Uno board.
Then install the IDE, watch some tutorials how to do this all and I´m sure you do your own program within maybe two hours (maybe wihtin one hour). For sure on the same day. No need to read through the 300 pages datasheet. Start with existing code examples, modify it, play around. Have fun.
For simple project there is no need to read datasheets at all. Others did this for you, wrote libraries, wrote examples, did videos...
Try (just now) a youtube search for "first arduino uno project" or "arduino uno blinking led" .. or whatever you are interested in.

Later .. if you want to dive deeper in AVR periferals, connecting devices, optimize code for your needs ... you will need to read datasheets.

Can I use Arduino for ATMEGA328? Can I use C++?
This is why I wonder.... I´ve already told you (several times?) ... the answer is: yes.
"Arduino Uno" uses ATmeag328. (Indeed you don´t need to care for first projects)
And it uses "some kind of" C++. (But I´m not able to explain the differences to "true" C++.)

++++
You will lose nothing. Arduino IDE is free to use. you may use Arduino boards with any compiler, even assembler if you like.

Again: I´m not a friend of Arduino for professional use. But it opens a huge variety of applications . even for beginners. Bluetooth, WiFi, Web controlled applications, color graphics displays, controlling steppers or even a complete CNC milling machine... all can be done within hours.

Klaus
 
Hi Klaus

So I should study Arduino first before I even pick the IC? What is Arduino UNO board? Is it just a test board I connect to laptop using USB cable and start learning? Can you give me a link which one to buy? So it comes with instruction and software to load into my laptop to get start? This might give me some time to digest all the new stuffs while I am learning Arduino.

Again, this is all new to me. Excuse me for all the stupid question.

Thanks


EDIT: Is this what you are talking about, that I should buy this and play with it?
https://www.amazon.com/Arduino-A000...t=&hvlocphy=9031935&hvtargid=pla-457497319401

If so, I can just buy it.
 
Last edited:

The Arduino Uno is available on amazon, (or digikey). Arduino is an open source project that was began in a school in Italy. Since it is open source, the board can be cloned without patent infringement . There are genuine Arduino Unos and clones available on Amazon. The Arduino integrated developement environment is free to download from arduino.cc. The Arduino IDE allows people to write a program, compile it and upload the .hex
machine code onto the flash program memory in the chip. The arduino comes loaded with a bootloader, so the program can be loaded by just connecting it to a USB port on the PC, without using a programmer.
The Arduino IDE can be adapted to handle a number of different boards, including a number of official Arduino variations using various microcontrollers, and boards designed by others that are not Arduinos.

The AVR32DB28 chip can be programmed with the Arduino IDE, by loading a package called DXCore by Vince Konde. The chip can be programmed on a breadboard, using just a USB to TTL converter cable or board, without using a programmer, or bootloader. The DXcore includes the software that microchip has helped develope using the chips UPDI programming pin when DXcore is installed in the Arduino IDE. A wealth of information on using the Arduino IDE can be found online. It has a huge community of users, forums, videos, and books available for
learning.
 

    Alan8947

    Points: 2
    Helpful Answer Positive Rating
Hi,

I don´t want to make decisions for you. I don´t want you to force into something.
From all what you write I think Arduino is one (of many) ways to go for you.

I just want you to do some investigation whether Arduino suits you or not.

What is Arduino UNO board?
I see you already did an internet search on your own.
This is what I wanted to see.

Watch videos. Do interneet search on your own.

Klaus
 

    Alan8947

    Points: 2
    Helpful Answer Positive Rating
Hi,

I think both are worth the money.
(ten years ago you had to pay at least 5 times that much, buying each part seperately)
And the kits come with a CD, with libraries, documentation, datasheets and code examples.

A lot of stuff to become creative. Try this, try that, have fun. Easy learning.

Klaus
 
One consideration about Arduino there is, for many libraries of interest, no central responsibility
as its open source. For one off designs you can generally ignore that, but any product based
stuff you would be well advised to take responsibility for any library you use, "make it
your own" so's to speak. Not for the community per se, just for your own project manage-
ment. or of course you can write your own drivers. You will also find, for many libraries, "thin"
documentation, occasionally looking at source code to answer questions.

But that being said community usually great source of advice on any issues with a
specific library, as someone, somewhere has used it and solved any issues and/or
come to a better understanding of library calls and functionality.

As far as the 8 bit versus 32 bit thing, ARM cores in modern processes die sizes for 32
bit generally smaller than older legacy 8 bit processors. So you can find 32 bit processors,
like M0+, for < $ 1 in volume. Think of a 32 bit processor as the difference between a 4
function calculator and a scientific calc, basic operations the same, just more speed,
more solution capability (typically more peripherals). One limitation, as you previously
expressed, generally speaking 32 bit processors in higher pin count packages.

Stick with 32 bit, you wont regret it.


Lastly there is the 25 cents type of processor, I have heard even down to 11 cents, 4 bit.
But thats for really high volume work.


Regards, Dana.
 
Last edited:

One other consideration / aggravation with Arduino is the regular periodic
update of the IDE, does not imply the library tracks the update. I have
picked up projects off web only to find no small number of them will not
compile without finding library error and doing updates. Sometimes the
library is not maintained by author so you are stuck unless you are
experienced enough to fix those errors yourself or choose another base
project from another author to work off.

And when IDE is updated, any libraries you added have to be added back again.

Modern IDEs at most usually have a single menu command to update all
libraries.

Many of these user created libraries, once the author does them, moves on
and do not maintain any semblance of support or maintenance. As an aside
many of these libraries and any docs usually found on github and some vendors
of boards like shields.

Debugging a whole other matter :



Open source has its limitations.......


Regards, Dana.
 
Last edited:

Hi,

While I agree with most of the last two posts...
( as arguments that Arduino is more for hobbyist and not professionals)

I don´t think that "open source" is bad at all.

Let´s consider LINUX as an open souce OS and Windows as non open source OS.
Then you see pros an cons for each system.

Here some pros of the open source system:
Linux is non commercial. Linux is more secure (regarding virus and other attacks). If there is a safety issue, then there are many developers to find and fix the problem. This is fast.
While you need to pay for Windows, it is slow in fixing safety issues, and maybe with solving the one problem they create a new problem.

But still I pay and use windows.

I would say one of the biggest advantages of Arduino being open source is that it evolves extremely quickly. A huge community provides solutions. Maybe not the most sophisticated solutions, maybe not the most tested solutions, but many hobbyists can live with it.


Klaus
 

I too use open source, Arduino, mBlock, Snap4Arduino, Tuniot, Verilog, because the alternative, none
of these available, is less desirable.

My preference, not yet here, is to telepathically send my ideas to a system that does the rest, take the
idea and create the code, proto, docs, .......and move on to the next idea. But looks like I will have to
wait, just as I waited in 1975 for a GUI interface to tools, for 20 - 30 years. But I will not be around
for telepathic wave.

Open and proprietary source all have limitations. Its just a fact of life.


Regards, Dana.
 
Last edited:

Should I get the first one because it actually uses the ATMEGA chip you suggested, or it doesn't matter? I like the more expensive one, I want to see whether I can play with my 16 years old grand daughter. She's a straight A student and got student of the year before.
--- Updated ---

I just bought this one. I think this has the ATMEGA chip in 28pin DIP.
https://www.amazon.com/ELEGOO-Upgra...jbGlja1JlZGlyZWN0JmRvTm90TG9nQ2xpY2s9dHJ1ZQ==

It comes with tutorial and all. But if there is any good material on Arduino, please give me links so I can download and study.

Thanks
 
Last edited:

As has been said before, don't get hung up by the specific chip on whatever board you have.
The key thing is that it is 'Arduino' compatible which means that everything after your C/C++ code is taken care of for you.
(By that I mean, if you change to a different board and/or different chip then all you need to do is tell the Arduino IDE that you have a new board - there is a pull-down list that lets you simply select the one you have - and it will then select the right tools for the board for you. After that it is still the same 'compile, upload and run' cycle.)
Think of it a bit like a car - they all have a steering wheel, accelerator and brake (at least for now!!!) so once you know how to drive you can drive (almost) any car. Any specific make and model of car might have a different body, engine and options but driving is still the same.
Susan
 
I can't wait for the kit to arrive. I read a little on Arduino, sounds like it's very similar to C++ but it's simpler. To be honest, I really don't have the feel of this so far, hopefully when I go through the tutorial of the kit, I have better understanding.

I bought this big kit because I also hope I can play with my grand daughter. She's 16, straight A and student of the year. I was going to learn Python together with her, it would be nice if I can play with her on the Arduino kit. We'll see. Other than me, none of the family member are into science. All they can talk is English, reading etc., I want to expose her to science and engineering. She stayed with us for 3 weeks, I taught her how to use different power tools and under my supervision, she installed the wall mount bracket for a 65" flat screen TV. I also taught her how to change tire on the car.

I learned C++ because two years ago, my older grandson(CS major in college) said he needed some motivation. So I said how about grandpa nipping on his heel. So I learned C++ from a book cover to cover!!!! It's good for my old brain also.

Thanks
 

Hang on a sec - Python can run on some of the same devices as the Arduino framework but they are different beasts.
For a start you are probably looking at a version of MicroPython rather than the full-blown Python that you would have on your PC. You will need to find a version of MicroPython that runs on your MCU. The ATMega328 is an 8-bit MCU.
Given your stated level of experience it would say you need to stay well away from any version of MicroPython that requires you to compile your own copy. Rather, MicroPython is readily available on nearly any ESP8266 or ESP32, Rapberry Pi Pico and a number of other devices.
If you want to learn about micorcontrollers then start with the Arduino.
If you want to learn Python with your granddaughter then start on your PC.
Susan
 

Oh no, I am not trying to use Python, I read that Arduino uses a simplified version of like C++ and is very easy to learn, I am thinking maybe my grand daughter can learn it too. I really don't feel like learning Python.
 

Hello!

As usual, 10 engineers will give you at least 20 different solutions, so I will add
my contribution:
I use C++ heavily for all my last 20 years projects (not hobby, I do this for living).
I have been programming with MSP430 which I know best, and recently with STM32.

I think MSP430 has a big advantage in terms of simplicity with its linear address space
(Von Neumann architecture). As for C++, there is some overhead for small programs, but
there are very big advantages in terms of "source code factorization" if you do something
more complex. Usually it is said that all what you do in C++ can be done in plain C
and all what you do in C can also be done in assembly. But for my point of view, there
is nothing you can do in assembly and not in C, and there is nothing you can do in C
and not in C++.

Beside this, I agree with the idea of starting with a development board. That will be
the best way to start smoothly. You can find most of the chips in QFP package. The pitch
is 0.5 and easy to solder with a regular soldering iron. I'm also using QFP which can
also be done with an iron, but a bit more difficult when you're not used to it.

All the example provided by TI are short (less than one page of source), and one per
item. Example: to show how to use the ADC, you can of course publish an audio recorder
which records on an SD card, etc, etc... But what they do is for example: measure
ADC0, blink a LED if the value is over 2048, set it off otherwise. Simple, fits in 1
page, works out of the box. There are about 10 program samples for each peripheral.
10 examples for ADC, 10 examples for timer, 10 examples for serial (SPI, UART, I2C. etc)...

You can find MSP430 boards on Digikey, and you can download CCS (Code composer studio)
which supports C++.

Dora.
 

Solution
The Arduino kit arrived. I am also happy the board uses ATMEGA328. I know it's not necessary, but I still like it that it uses the one I am planning to buy.



I am reviewing C++. I am stunned I forgot so much. Might take me a while to review this before I start on this. But I have time.

Thanks for all the input.
 

Dont underestimate the utility and speed for simple designs using block programming
languages. Addictive as well, no need to have cheat sheet at the ready, all those strongly
typed language constructs not of concern.

An example :



Talking meter :


Simple V to Pulse Width, took a minute to do, 4 blocks drag and drop (tool takes blocks and their
configuration and generates Arduino code for you) :




Wireless : https://www.electro-tech-online.com/articles/verizon-hotspot-remote-control.949/

Lots of fun and low aggravation and quick to functioning proto.....

mBlock, Snap4Arduino, Code Red, Flowcode, Ardublock, Scratch, Tuniot, learn one you can pretty
much use all the others with minimal mountain climbing.


Regards, Dana.
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…