Basic microcontroller stuff

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
mtbf0
 
Posts: 1645
Joined: Sat Nov 10, 2007 12:59 am

Post by mtbf0 »

magician13134 wrote: if you're haveing a hard time jumping into that, start with HTML/Javascript
there were some guys at the maker faire in may showing a mega168 with a ecmascript interpreter. alas, i don't recall the name of the project.

jwcolby
 
Posts: 1
Joined: Tue Oct 21, 2008 10:43 pm

Re: Basic microcontroller stuff

Post by jwcolby »

STAY AWAY FROM BASIC AT ALL COSTS! BASIC was my first language and I regret every moment of it
I make a hundred+ K a year doing VBA and VB.Net. I don't regret a moment of it.

Basic was also my "first language" (if you can call it that), Zapple Basic, loaded from an audio cassette at 1200 baud into a Z-80 that I built myself (showing my age). It took 3 minutes to load a 16K interpreter and crashed if you looked at it wrong.

I have also used ASM86, PL1, Turbo Pascal, gbasic, qbasic, fortran, C, C++ and a half dozen others. Each language exists for a reason, and Basic exists for learning (teaching) programming (at least originally) so why not use it for that purpose? Now it has a life of its own of course and it is quite possible to earn a living at it.

As for the uController, C is an obvious choice, assuming you don't want to get into assembler. It is fast and low level, assembler on steroids.

eil
 
Posts: 440
Joined: Sun Aug 31, 2008 11:09 pm

Re: Basic microcontroller stuff

Post by eil »

I think the OP would do well to start out with a scripting/interpreted language. PHP gets my vote because it's insanely easy to learn and debug, plus it uses a C-style syntax which is always worth learning early on since so many other languages do the same thing. You just have to make sure you start off with a good reference because the vast majority of the PHP tutorials on the web (including the official PHP docs, to a degree) will teach you some very bad habits. Realize that PHP is widely abused by "web developers" and make an active effort to figure out early on the difference between good code and bad code.

After a scripting language is pretty well understood, move on to C. With C, you're programming a lot closer to the hardware and get to learn all about memory management, pointers, buffers, and bit manipulation. All of which are required knowledge for microcontroller programming. The K&R book is the canonical introduction but some (like me) find it a bit terse and reference other books (and web sites) as well throughout the learning process.

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: Basic microcontroller stuff

Post by westfw »

Ok; which microcontrollers support PHP ?

eil
 
Posts: 440
Joined: Sun Aug 31, 2008 11:09 pm

Re: Basic microcontroller stuff

Post by eil »

westfw wrote:Ok; which microcontrollers support PHP ?
None, I was just saying that it's a good language to learn when starting out with programming. The syntax is very close to C and other C-style languages and there is tons of docs and example code out there. The best reason is that debugging and experimentation are extremely simple:

1. Edit file
2. Refresh browser

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”