Author Topic: Microcontroller alternative to Arduino  (Read 13693 times)

0 Members and 1 Guest are viewing this topic.

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5239
  • Country: us
Re: Microcontroller alternative to Arduino
« Reply #50 on: June 15, 2016, 04:23:00 am »
The OP may have nailed the Arduino problem when he described the responses he got on Arduino bulletin boards.  The problem is not the microcontroller, or the language.  The problem is that the ease of use of Arduino has allowed a lot of people who don't really know what they are doing to accomplish things, thus validating themselves as "experts".  Just about any other platform (with the possible exception of Stamp) would be better in this sense.

That said, I like Arduino.  Easy to get fast prototypes slapped together to evaluate user response, learn what you didn't know about the environment and requirements and so on.  And it is so cheap that it doesn't even make sense to clean it up unless you are building quite a few.  Just recognize that there is a lot of clunker advice and bad examples out there in the Arduino universe.
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2328
  • Country: 00
Re: Microcontroller alternative to Arduino
« Reply #51 on: June 15, 2016, 04:56:34 am »
It's interesting.

I'm from the famous 80C31 time, and I prefer to use Atmel IDE than arduino, because the arduino Layer make things easier on one side, but make blinded developers on the other one, I still prefer to stay in ASM, C or even pascal with Microe compiler, arduino  only to CRTL C CTRL  V internet projects. Actually all my eyes in on Psoc or FPGA everything else decrease value for me
 

Offline autobot

  • Regular Contributor
  • *
  • Posts: 66
Re: Microcontroller alternative to Arduino
« Reply #52 on: June 15, 2016, 09:02:14 am »
The OP may have nailed the Arduino problem when he described the responses he got on Arduino bulletin boards.  The problem is not the microcontroller, or the language.  The problem is that the ease of use of Arduino has allowed a lot of people who don't really know what they are doing to accomplish things, thus validating themselves as "experts".  Just about any other platform (with the possible exception of Stamp) would be better in this sense.

That said, I like Arduino.  Easy to get fast prototypes slapped together to evaluate user response, learn what you didn't know about the environment and requirements and so on.  And it is so cheap that it doesn't even make sense to clean it up unless you are building quite a few.  Just recognize that there is a lot of clunker advice and bad examples out there in the Arduino universe.

That's true.

I actually think the mbed walks the fine line pretty well here: On the other hand, it's more complex than the Arduino so that deters the Arduino crowd, but once you pass the learning barrier(which isn't that big ), you get to prototype probably as fast as the arduino(and maybe even faster for some things, like power management) , and yet get to have a platform that could take you to production in many cases.
« Last Edit: June 15, 2016, 09:05:21 am by autobot »
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1613
  • Country: gb
Re: Microcontroller alternative to Arduino
« Reply #53 on: June 15, 2016, 11:21:56 am »
As with many disciplines there are almost always gaps in knowledge, and as CatalinaWOW pointed out, writing a few lines of code that use prebuilt libraries does gives some the sense they are 'good at coding for microcontrollers'  - with all manner of cool things happening, but with very little 'logic' being written.  I see it quite often with those with IT backgrounds starting to do embedded stuff - easily tripped up by things they take for granted on larger CPU's with seemingly endless resources.   Those are then countered by what some have called the 'bare metal zealots' who go as far as to say you should code in assembly... 

To the op.  If you're a software guy I'm sure you're used to writing down exactly what you want to do in flow chart format, and used to using equations.  What I think has tripped you up here is that you're dealing with an 8-bit device which has limitations, and therefore can require a different approach to how you do things, to achieve the desired effect. 

I was surprised when you said you had realised that right shifting a value (unsigned long) by 16 divides it by 65536 (similarlly left shifting multiples it). The same reason that left shifting a decmial number by 1 multiplies it by 10.  Because its an 8-bit device, it stores a 32-bit number in 4 locations, so it doesn't even need to shift any bits for that - it just takes the top two bytes and discards the bottom two. And this is where I believe quite a few people get stuck... bytes, chars, ints, words, longs etc.. are of course finite, whilst I'm sure many software people are aware of this, for micro's, often one needs more than just 'awareness' of logical functions and how the mathematical operations are actually performed on hardware.   You may not need it to be fast, and higher level languages give you the option of using floats, dealing with very precise numbers, but what if you're trying to make something use less power? or perform that calculation a thousand times a second?  It seems a common approach these days is to 'use a bigger chip'.

That is often why multiplications and divisions for things like averaging, are done to the power of two - to make it much easier for a chip without dedicated division hardware to divide a number.  It simply becomes a case of barrel shifting.

As for your project, it would help if you explained in your first post, what it is you're trying to achieve, and what you have tried so far.  We've all been 'peeved' when the software we've written doesn't do as we expected, but in every single case - it was my mistake and lack of understanding. (with the possible exception of a tiny bug in MikroC PRO that caused an if statement to always execute..).
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Microcontroller alternative to Arduino
« Reply #54 on: June 15, 2016, 10:10:21 pm »
Quote
If only the Arduino used a true high level language such as BASIC, then newbies wouldn't have to worry about the size of an integer or how to show a percentage, because all calculations would be floating point already.
That is
  • quite uncertain.  Not all BASIC implementations implement floating point, and some require explicit declarations of floats vs integers/
  • Running floating point "all the time" on an 8bit CPU is not a great recipe for "product success."  You can tell from all the BASIC52 based boards that are still widely used (not!)  There are significant size and speed issues.
  • Ditto for a bunch of the other "higher level" languages.
OTOH, if the original code had been written on an ARM variant of "something", the OP might never have noticed assorted integer length issues, since they would have been 32bits instead of 16...   The whole "expressions involving constants may be computed using 16bit integers" is one of the biggest traps that catches "somewhat experienced" programmers on Arduino, and it's not Arduino's "fault"   (it doesn't happen in the vast majority of C-like environments, because ... 32bit ints.)

 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12863
Re: Microcontroller alternative to Arduino
« Reply #55 on: June 15, 2016, 11:19:30 pm »
The whole "expressions involving constants may be computed using 16bit integers" is one of the biggest traps that catches "somewhat experienced" programmers on Arduino, and it's not Arduino's "fault"   (it doesn't happen in the vast majority of C-like environments, because ... 32bit ints.)
^*THIS*^
To not be caught out by the standard compliant minimum integer length trap, you need to either be *much* smarter than the average bear, or to have a background in programming 8 or 16 bit embedded systems in C, or to have been a C programmer long enough to have welcomed in the ANSI C89 standard!   One more generation, and there will be very few people left from the K&R C era still coding . . . . . .
 

Offline System Error Message

  • Frequent Contributor
  • **
  • Posts: 473
  • Country: gb
Re: Microcontroller alternative to Arduino
« Reply #56 on: June 16, 2016, 12:55:08 am »

Just some things you can do with microcontrollers.
 

Offline martyTopic starter

  • Contributor
  • Posts: 42
  • Country: us
Re: Microcontroller alternative to Arduino
« Reply #57 on: June 20, 2016, 10:08:43 pm »
Just remember this is an entry point platform..

We must first roll,crawl,walk, and run in due time.

Seeing a post on an Arduino question shouldn't get a PhD response.
 

Offline nikodean1

  • Newbie
  • Posts: 8
  • Country: jm
    • Kompulsa
Re: Microcontroller alternative to Arduino
« Reply #58 on: June 27, 2016, 01:56:42 pm »
Texas Instruments has some models that offer lots of processing power and flash memory for the price, but Arduino appears to have a much larger community to support it (and you're going to appreciate the abundance of tutorials and code samples available for them. Although, to be fair to TI, the Hercules models can be used with HALCoGen, which provides great libraries and a GUI which can save you some work (for example, you can generate a PWM signal with just a few clicks), and typing basically one line of code.
Sincerely,

Nicholas Brown. My engineering resources: https://www.kompulsa.com/engineering-resources/
 

Offline ez24

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: Microcontroller alternative to Arduino
« Reply #59 on: June 28, 2016, 04:49:47 am »
Just remember this is an entry point platform..

We must first roll,crawl,walk, and run in due time.

Seeing a post on an Arduino question shouldn't get a PhD response.

Don't worry - this is normal on this forum.   :-+   I think there are a lot of PhDs here.
YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Microcontroller alternative to Arduino
« Reply #60 on: June 29, 2016, 01:57:49 am »
i say get a Nucleo board.
the 64pin ones are cheaper than arduino with onboard usb programmer and debug unit.

the best 144pin F767zi board is 200MHz and has hardware double-precision floating point math hardware and 2meg of flash.
and still only costs about $20
 

Offline ez24

  • Super Contributor
  • ***
  • Posts: 3082
  • Country: us
  • L.D.A.
Re: Microcontroller alternative to Arduino
« Reply #61 on: June 29, 2016, 02:20:58 am »
i say get a Nucleo board.
the 64pin ones are cheaper than arduino with onboard usb programmer and debug unit.

the best 144pin F767zi board is 200MHz and has hardware double-precision floating point math hardware and 2meg of flash.
and still only costs about $20

There is a 500+ page book written by a forum member who uses the Nucleo-64 as the tool used in the book.

https://leanpub.com/mastering-stm32

There are some sample pages available

YouTube and Website Electronic Resources ------>  https://www.eevblog.com/forum/other-blog-specific/a/msg1341166/#msg1341166
 
The following users thanked this post: stj

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Microcontroller alternative to Arduino
« Reply #62 on: June 29, 2016, 08:09:53 am »
Quote
https://leanpub.com/mastering-stm32
Are there similar books for any other vendors' ARM chips?
https://www.amazon.com/Embedded-Systems-Introduction-Cortex-Microcontrollers/dp/1477508996/ Might work for the TI Tiva chips?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf