Old Foggie seeks guidance on current MPU's, Programming software...

Thread Starter

ScoJamBre

Joined Aug 28, 2017
6
Hi all,
As stated, I'm a 50+ year old "techie" whose passion has been electronics all my life, yet never had the resources to delve deeply into it other than in a casual interest. That said, in my days of learning electronics ( I have an A.A.S. in Electronics Engineering Technologies from 20 years ago) the 486 was top notch, and 1 Gb of memory was the bomb!. I have always loved the field and am now able to hopefully dig back into it. I recently purchased a new 70Mhz 4Ch DSO, DC power supply and Function generator. All NEW! No more ebay used crap (i.e. uncalibrated). yada, yada, yada...I'm excited!

My question is:

Back then, my limited background at attempting to get into this was to study the Motorola MC68HC11 and the Basic Stamp (both circa 2000) for robotics and peripheral controls. Never did much with either.

I'm interested in beefing up my knowledge into current standards (LCD displays vs 7 segment, programming PIC's vs designing something from discrete components - IC's, Servo/motor control, etc.). From what I'm seeing, the Arduino series of Open Source devices sounds like the current way to go without proprietary headaches. I had also delved into C language and some Basic - a looong time ago. Is C still the way to start? Or, should I go with C++ or C#? I am confused to say the least as to what would be a good starting place to pickup where I left off so many years ago.

I see the MS Visual Studio is the defacto "free" version of C. But, will it come with all that I need to control I/O devices (with IDE and compiler)? Or, am I limited to developing spreadsheet programs via Windows with no libraries to control peripherals?

Please forgive my hay-wired explanation for what I'm looking to do, but I feel overwhelmed at this point.

As I have read, there seem to be MANY programming platforms out there, and PIC's. Can anyone tell me where I should start?

This is my first post on the forum, so, please go easy on me! Lest I shall develop an evil plot to take over the world with my Basic Stamp! Bwaaa, haa, haa! :)

Thanks for any and all help...

Scott
 

MrChips

Joined Oct 2, 2009
34,632
Welcome to the club!

As with everything else, you will receive lots of advice, but remember, everyone has their biases and preferences, and I am no different.
At some point you have to make your own choice.

C is alive and well, and so is ASM.
Here are the most popular MCUs to choose from, in no order of priority:

Atmel AVR (now owned by Microchip)
Freescale 9S08 (now owned by NXP)
Microchip PIC
TI TMS430

Arduino

I placed Arduino last and separate because Arduino is not an MCU (microcontroller unit). Arduino is a system that uses Atmel ATmega328 chips.
There are other chips and systems to choose from for greater computational power. For just starting out, I would choose one of the above.

(There are companies that have low-cost evaluation kits to get you started. My preferred choices are TI TMS430 and ST STM32F.)
 

AnalogKid

Joined Aug 1, 2013
12,056
For the least messing around with building I/O stuff, the Arduino is the way to go. There are tons of little critters to attach. Cranking up C++ is not easy, but it is the closest thing to a standard language across multiple platforms.

ak
 

Thread Starter

ScoJamBre

Joined Aug 28, 2017
6
Mr. Chips.
I see that you say that ASM (assembly) is viable to along with C, but I had alway felt that to control multiple I/O that it would be overwhelming to me. I did do some of it, but it seemed that an IDE/compilier would be an easier way to get quicker results. Perhaps going that router later on when I want to streamline my code. RIght now, i just want to get things working. That said, would MS Visual Studio be an appropriate way to go at this point? Will it have the capabilities to control I/O ports on my PC with their included libraries?

Analog Kid: in regards to your statement about "little critters to catch," are you referring to the multitude of interfaces that one would need to integrate into the processor?

To reinterate, I"m looking to spend $0 on a program and compiler to get started, and cheap MC's to get me up to speed on current technologies (i"m not looking to run a Nuclear Reactor - just come simple robotics, data input, data logging, audio amps, etc.) without spending a fortune on it. When I feel more comfortable, sure I'll spend what I need to at the time.

BTW, I purchased the RIgol 70 Mhz scope, function gen and power supply new for what I would have spent on a used HP scope 10- 15 years ago with no comparisson in quality. That is why I am SOO excited to get into this again.

Again,

Thanks for any and all help!

Scott
 

be80be

Joined Jul 5, 2008
2,394
There all good but the PIC is still cheap way to go you can get chips cheap and clone of the pickit3
and download there free xc8 and mplab-x. And in a day or 2 you be up and running.
This is using a 16f15376 40 pin pic that has tons to offer.
Avr is good to but the chips cost more. But with xc8 and Mplab-x you can code in C or C++ now
and it just works.
The Arduino thing is easy as pie with the Ide but people get hung up on the uno and can't get out of the box .
Home made UNO about $7.00 to $10 usb to serial bumps it up to say $12.00
Yell you can get a cheap board with it all on it that's bugy
Home made pic less then $5.00 maybe under $3.00 pickit 3 $8.50 I got 2 for $12
But you save on chips with the pic.
atmega 328 $4.75 28 pin chip
Pic 16f15376 $1.68 40 pin chip
take you pic and be happy chipping
 

MrChips

Joined Oct 2, 2009
34,632
Mr. Chips.
I see that you say that ASM (assembly) is viable to along with C, but I had alway felt that to control multiple I/O that it would be overwhelming to me. I did do some of it, but it seemed that an IDE/compilier would be an easier way to get quicker results. Perhaps going that router later on when I want to streamline my code. RIght now, i just want to get things working. That said, would MS Visual Studio be an appropriate way to go at this point? Will it have the capabilities to control I/O ports on my PC with their included libraries?

To reinterate, I"m looking to spend $0 on a program and compiler to get started, and cheap MC's to get me up to speed on current technologies (i"m not looking to run a Nuclear Reactor - just come simple robotics, data input, data logging, audio amps, etc.) without spending a fortune on it. When I feel more comfortable, sure I'll spend what I need to at the time.
You have some misconceptions about what is required to program an MCU.
MS Visual Studio is for creating apps on a PC, not on an embedded MCU.

An IDE is the programming platform of choice for programming MCUs. All major MCU manufacturers provide a $0 option for programming their MCU in either ASM or C or both. They supply their own IDE or links to third party IDE/compilers.

Microchip PICs are priced very competitively - one of the reasons they have a strong hobbyists following.

Here are some examples and pricing of MCU programmers/evaluation packages:

Microchip PICkit3 $49.39
TI MSP-EXP430G2 Launchpad $10.29
STM32F0DISCOVERY $8.88
Microchip ATTINY104-XNANO $10.90
 

shteii01

Joined Feb 19, 2010
4,644
There all good but the PIC is still cheap way to go you can get chips cheap and clone of the pickit3
and download there free xc8 and mplab-x. And in a day or 2 you be up and running.
This is using a 16f15376 40 pin pic that has tons to offer.
Avr is good to but the chips cost more. But with xc8 and Mplab-x you can code in C or C++ now
and it just works.
The Arduino thing is easy as pie with the Ide but people get hung up on the uno and can't get out of the box .
Home made UNO about $7.00 to $10 usb to serial bumps it up to say $12.00
Yell you can get a cheap board with it all on it that's bugy
Home made pic less then $5.00 maybe under $3.00 pickit 3 $8.50 I got 2 for $12
But you save on chips with the pic.
atmega 328 $4.75 28 pin chip
Pic 16f15376 $1.68 40 pin chip
take you pic and be happy chipping
I am not sure where you are pulling your numbers from.

Complete Arduino Uno copy: http://www.ebay.com/itm/UNO-R3-Mini...rduino-/112466695434?var=&hash=item1a2f89950a
Install the CH340 driver, plug the board to pc and start typing the code in C.
Total outlay is less than 5 USD.
 

MrChips

Joined Oct 2, 2009
34,632
Hi all,
As stated, I'm a 50+ year old "techie" whose passion has been electronics all my life, yet never had the resources to delve deeply into it other than in a casual interest. That said, in my days of learning electronics ( I have an A.A.S. in Electronics Engineering Technologies from 20 years ago) the 486 was top notch, and 1 Gb of memory was the bomb!. I have always loved the field and am now able to hopefully dig back into it. I recently purchased a new 70Mhz 4Ch DSO, DC power supply and Function generator. All NEW! No more ebay used crap (i.e. uncalibrated). yada, yada, yada...I'm excited!

My question is:

Back then, my limited background at attempting to get into this was to study the Motorola MC68HC11 and the Basic Stamp (both circa 2000) for robotics and peripheral controls. Never did much with either.

I'm interested in beefing up my knowledge into current standards (LCD displays vs 7 segment, programming PIC's vs designing something from discrete components - IC's, Servo/motor control, etc.). From what I'm seeing, the Arduino series of Open Source devices sounds like the current way to go without proprietary headaches. I had also delved into C language and some Basic - a looong time ago. Is C still the way to start? Or, should I go with C++ or C#? I am confused to say the least as to what would be a good starting place to pickup where I left off so many years ago.

I see the MS Visual Studio is the defacto "free" version of C. But, will it come with all that I need to control I/O devices (with IDE and compiler)? Or, am I limited to developing spreadsheet programs via Windows with no libraries to control peripherals?

Please forgive my hay-wired explanation for what I'm looking to do, but I feel overwhelmed at this point.

As I have read, there seem to be MANY programming platforms out there, and PIC's. Can anyone tell me where I should start?

This is my first post on the forum, so, please go easy on me! Lest I shall develop an evil plot to take over the world with my Basic Stamp! Bwaaa, haa, haa! :)

Thanks for any and all help...

Scott
It is interesting to follow up on Scott's prior encounter with microcontrollers:

Motorola MC68HC11 and Parallax BASIC Stamp. In the intervening 20-30 years, not much has changed, except for more advanced devices and better programming tools.

MC68HC11 was a very fine device. In those days your only programming choice was ASM. With an 8MHz clock, you got things done at optimum speed while programming in ASM. PICs and AVR are running at 20MHz. dsPIC and ARM chips are clocked at over 200MHz.

Parallax BASIC Stamp was aimed at getting programs up and running with little programming experience from the user. It was SLOW and it still is slow. This platform has been superseded with Arduino. Again, the goal remains the same - how to build an embedded system with little or no MCU hardware/software knowledge - again, popular with hobbyists. Arduino is slow compared with other platform options available now.

As I said before, we all have our biases and preferences. Reading on your background, you will be most comfortable starting off with an Arduino system.
 

AnalogKid

Joined Aug 1, 2013
12,056
Analog Kid: in regards to your statement about "little critters to catch," are you referring to the multitude of interfaces that one would need to integrate into the processor?
To *attach*, not catch. Critters like an ultrasonic distance sensor, temperature and humidity sensors, audio sensor, relay output drivers, wireless comm modules, etc. Compared to 20 years ago, there is almost no signal for which you can't buy a very low cost interface or expansion "shield" are disgustingly low cost.

I'm a hardware guy with a ton of parts, so I prefer to grow my own from scratch. Also, I've never used an Arduino. But I've been watching its development over the years, and it is an excellent starting environment and community.

C and C++ always have struck me as too much work, work that the computer should do for you. I've done many projects in PIC BASIC, which is about as easy as a BASIC Stamp but way faster execution.

ak
 

Thread Starter

ScoJamBre

Joined Aug 28, 2017
6
To *attach*, not catch. Critters like an ultrasonic distance sensor, temperature and humidity sensors, audio sensor, relay output drivers, wireless comm modules, etc. Compared to 20 years ago, there is almost no signal for which you can't buy a very low cost interface or expansion "shield" are disgustingly low cost.

I'm a hardware guy with a ton of parts, so I prefer to grow my own from scratch. Also, I've never used an Arduino. But I've been watching its development over the years, and it is an excellent starting environment and community.

C and C++ always have struck me as too much work, work that the computer should do for you. I've done many projects in PIC BASIC, which is about as easy as a BASIC Stamp but way faster execution.

ak
To *attach*, not catch. Critters like an ultrasonic distance sensor, temperature and humidity sensors, audio sensor, relay output drivers, wireless comm modules, etc. Compared to 20 years ago, there is almost no signal for which you can't buy a very low cost interface or expansion "shield" are disgustingly low cost.

I'm a hardware guy with a ton of parts, so I prefer to grow my own from scratch. Also, I've never used an Arduino. But I've been watching its development over the years, and it is an excellent starting environment and community.

C and C++ always have struck me as too much work, work that the computer should do for you. I've done many projects in PIC BASIC, which is about as easy as a BASIC Stamp but way faster execution.

ak
Sorry, my bad about "catch."! It was getting late last night... I realized what you meant this morning. Thanks for the input~!
 

Thread Starter

ScoJamBre

Joined Aug 28, 2017
6
It is interesting to follow up on Scott's prior encounter with microcontrollers:

Motorola MC68HC11 and Parallax BASIC Stamp. In the intervening 20-30 years, not much has changed, except for more advanced devices and better programming tools.

MC68HC11 was a very fine device. In those days your only programming choice was ASM. With an 8MHz clock, you got things done at optimum speed while programming in ASM. PICs and AVR are running at 20MHz. dsPIC and ARM chips are clocked at over 200MHz.

Parallax BASIC Stamp was aimed at getting programs up and running with little programming experience from the user. It was SLOW and it still is slow. This platform has been superseded with Arduino. Again, the goal remains the same - how to build an embedded system with little or no MCU hardware/software knowledge - again, popular with hobbyists. Arduino is slow compared with other platform options available now.

As I said before, we all have our biases and preferences. Reading on your background, you will be most comfortable starting off with an Arduino system.
Interesting to know. At about the time I dropped off using the Stamp, Arduino was just coming around. I'm looking to start up with hobby projects, not become an engineer. Sounds like the Arduino will be where I pick up again. Thanks for the info!
 

MrSoftware

Joined Oct 29, 2013
2,273
My experience in embedded is limited, but the arduino platform makes it super easy, especially if you know any c or c++. There are tons of online resources and examples, imitation boards are only a few bucks and the compiler is free. There are also libraries for oodles of devices, such as led matrix displays, etc.. they come with a boot loader so you can program it over usb without a dedicated programmer device. There is atmel studio, also free, if you want to get closer to the hardware.
 

be80be

Joined Jul 5, 2008
2,394
shteii01 I don't think you read my whole post
I said home made just a chip a board and a programmer
Pic is by far the cheapest way to go.
40 pin pic 16f15376 is a $1.69 programer on ebay $5.00 I'm not adding in for misalliance parts.
28 pin atmega is $5.00 programmer $5.00 to $20.00
Now yes you can get cheap arduino Yell you can get a cheap board with it all on it but
If you spend some time over at arduino forum there's ton's of post about these not holding up.
A real arduino is $35.00
A real pic is bag of chips.
 

be80be

Joined Jul 5, 2008
2,394
I'm not buying they have come down you can get a real uno from arduino for 24.95 but you pay shipping thats ups 10
I think that 35 or close.
Not the point and not what I'm saying to start cheap arduino is not cheap easy yes but not cheap.
Pic is by far the cheapest way to go easy no not that easy to learn but it is cheap.
What Id use what ever works don't really matter.
Free there all have free software now.
 
I want to reply to this thread, but it's a really tough one to reply too.

There really aren't any low level "ports" on a Windows PC. USB and Ethernet. DOS had ports. Now everything is abstracted.

Linux machines would have low level access, but it still not a real-time operating system (RTOS).

A real-time OS has a guaranteed response to an event.

I too, need to play catch up. Most of the languages I know are obsolete and so are the processors I programmed on both in assembly and high level languages. I also programmed in FORTRAN on a RTOS.

There's always the IoT or the Internet of Things. I don;t know if any of your applications will consider that.

I do want to introduce Labview: http://store.digilentinc.com/labview-home-bundle/

This is a graphical programming language where it's easy to develop parallel tasks. You actually have to worry about race conditions.

It is the defacto standard for controlling Instrumentation. Serial and IEEE-488 would be built-in.

I'll also invite you to look at www.picaxe.com








http://store.digilentinc.com/labview-home-bundle/
 

philba

Joined Aug 17, 2017
959
There are arduinos that are very inexpensive. The Nano is my favorite. It's breadboard friendly (unlike the Uno) and costs $10. Even less on ebay - I got 5 clones for $15, free shipping. (and yes, they work great!) A bare PIC is indeed cheaper - a few bucks or even less. But in addition to target hardware cost is the tool chain. For a PIC, you need a programmer which adds to the cost and complexity whereas for Arduinos, you just need a USB cable (though it might be a USB mini so that might add cost). In the end, I don't feel that the cost is really that much different. Basically you can get in for the cost of a couple cups of fancy coffee.

For beginners, the Arduino is an excellent choice because of the toolchain/IDE, tutorials, sample code and user community. I started with PICs, have a number of programmers and lots of stock but I really prefer the USB bootloader that Arduino has. Fast and easy to program.

I'm not buying they have come down you can get a real uno from arduino for 24.95 but you pay shipping thats ups 10
I think that 35 or close.
Not the point and not what I'm saying to start cheap arduino is not cheap easy yes but not cheap.
Pic is by far the cheapest way to go easy no not that easy to learn but it is cheap.
What Id use what ever works don't really matter.
Free there all have free software now.
 

be80be

Joined Jul 5, 2008
2,394
Free from Microchip:
1. Microchip AN851: PIC16F/18F bootloader via serial
2. Microchip AN247: PIC18F CAN MCU bootloader via CAN bus
3. Microchip AN1094: PIC24/dsPIC30/dsPIC33 bootloader
4. Microchip TCP/IP Stack: Internet bootloader for PIC18J Ethernet MCU
5. Microchip PICkit 2: USB HID Bootloader
6. Microchip USB Firmware framerwork: USB bootloader using generic USB driver and HID
They all have bootloaders and now that Microchip owns AVR there is a lot of changes
This is from microchip it has own programmer $12 but I said it's going to get cheaper
 
Top