electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software
Getting into Microcontrollers
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [11 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
sine_wave



Joined: Sep 25, 2006
Posts: 20
Location: NY

PostPosted: Thu Oct 19, 2006 3:08 pm    Post subject: Getting into Microcontrollers Reply with quote  Mark this post and the followings unread

I've been toying with the idea of dabbling with Microcontrollers. Are there any good development boards to start with or are they a waste of time? Any good books I should read first?
Back to top
View user's profile Send private message
mi_dach



Joined: Dec 17, 2005
Posts: 133
Location: Sweden

PostPosted: Fri Oct 20, 2006 2:11 am    Post subject: Re: Getting into Microcontrollers Reply with quote  Mark this post and the followings unread

sine_wave wrote:
I've been toying with the idea of dabbling with Microcontrollers. Are there any good development boards to start with or are they a waste of time? Any good books I should read first?


I can only recommend PIC chips from personal experience, but I grew out of the development board (velleman k8048) very quickly. Since you can install the chip into a circuit and most often program it without removing it, I dont particularly see the use of a development board.

As I have a background in programming, I had little trouble learningtheassembly language, but you might want to look in picBASIC if your programming skills aren't strong. I still think an understanding of assembly is the best though (all the datasheets assume you are using it).

PIC chips come with excellent and free development tools called MPLAB. You can even simulate having a chip, programming and working with it. Lots of very good examples and documentation make the PIC chips very attractive too. Check out this online book http://www.mikroe.com/en/books/picbook/0_Uvod.htm to get an idea of what it's like (assembly language anyways)
Back to top
View user's profile Send private message Visit poster's website
bugbrand



Joined: Nov 27, 2005
Posts: 846
Location: Bristol, UK
Audio files: 1
G2 patch files: 1

PostPosted: Fri Oct 20, 2006 2:12 am    Post subject: Reply with quote  Mark this post and the followings unread

PIC chips are probably the most widely used - www.microchip.com

There's an extremely large array of different types - from small 8 pin micros up to 40 pin beasts laden with features (that'll probably confuse). I can't remember the name of the development kit I've got, but it'd probably be a good starter - its for 14pin devices (so not too complex but enough power), genuine Microchip product (so you get good integration with the MPLAB programming software), has USB for easy connection and was very well priced..

Ah, this is it::: the PICKit1

Note - micros can drive you nuts.!. But there's great power if you work at it.

_________________
http://www.bugbrand.co.uk
http://www.bugbrand.blogspot.com
Back to top
View user's profile Send private message Visit poster's website
bugbrand



Joined: Nov 27, 2005
Posts: 846
Location: Bristol, UK
Audio files: 1
G2 patch files: 1

PostPosted: Fri Oct 20, 2006 2:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Good words Dach (and hello to you too!)
_________________
http://www.bugbrand.co.uk
http://www.bugbrand.blogspot.com
Back to top
View user's profile Send private message Visit poster's website
mi_dach



Joined: Dec 17, 2005
Posts: 133
Location: Sweden

PostPosted: Fri Oct 20, 2006 2:14 am    Post subject: Reply with quote  Mark this post and the followings unread

bugbrand wrote:
Good words Dach (and hello to you too!)


Hey ho Smile

In addition, I'd add that buying a good programmer is highly, highly recommended. Even though you can build one for next to nothing, having a solid, reliable tool is very important, especially for beginners who are going to be suffering quite a lot of problems anyway.

www.microchip.com, makers of PIC chips have quite a lot of good info on different start packets and development kits if you dig around. I use the ICD2, debugging is something very desirable on complex projects, but you can get away without it at the start.
Back to top
View user's profile Send private message Visit poster's website
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24079
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Fri Oct 20, 2006 8:56 am    Post subject: Reply with quote  Mark this post and the followings unread

mi_dach wrote:
I use the ICD2, debugging is something very desirable on complex projects, but you can get away without it at the start.


The ICD2 can also be used for programming the chip once the program is finished - so it would save some money as well, in a way.

I found it a bit disappointing though that for simple PIC's it will only give you one breakpont (for larger PICs three are supported) - I prefer to always have one breakpoint on a fatal errror handler and then some more for the actual debugging (especially for interrupt problems). But still I do think it to be worth it's money.

(I'm spoled a bit by having an ICE 4000. of course)

For some debugging the emulator software is very handy as simulation files can be used which will give better debug reproducability sometimes than real-world signals would. Also an a decent PC it can execute faster than on the real chip Very Happy

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
sine_wave



Joined: Sep 25, 2006
Posts: 20
Location: NY

PostPosted: Fri Oct 20, 2006 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for all the recommendations so far. I've never even put my hands on a PIC so I'm not quite sure about this quote:
mi_dach wrote:
In addition, I'd add that buying a good programmer is highly, highly recommended. Even though you can build one for next to nothing, having a solid, reliable tool is very important, especially for beginners who are going to be suffering quite a lot of problems anyway.

Mi_dach, I thought that the "programmer" was just software that would probably come with the development board. Please correct me if I'm wrong as I said I'm totally green to this. I know that AVR offers free programs but maybe for PIC there is none?
I like the look of the dev board that BugBrand posted. I might check that out.
Back to top
View user's profile Send private message
mi_dach



Joined: Dec 17, 2005
Posts: 133
Location: Sweden

PostPosted: Fri Oct 20, 2006 10:45 am    Post subject: Reply with quote  Mark this post and the followings unread

sine_wave wrote:
Thanks for all the recommendations so far. I've never even put my hands on a PIC so I'm not quite sure about this quote:
mi_dach wrote:
In addition, I'd add that buying a good programmer is highly, highly recommended. Even though you can build one for next to nothing, having a solid, reliable tool is very important, especially for beginners who are going to be suffering quite a lot of problems anyway.

Mi_dach, I thought that the "programmer" was just software that would probably come with the development board. Please correct me if I'm wrong as I said I'm totally green to this. I know that AVR offers free programs but maybe for PIC there is none?
I like the look of the dev board that BugBrand posted. I might check that out.


The development board itself is doing the programming in that case. Programming the PIC often involves both software and hardware, the software takes some binary file and transfers it (serial port or USB) to the programmer hardware. The hardware itself does funny things with timing and voltages and puts the data onto the chip. After that, the chip can be inserted into the desired circuit.

A minimal programmer consists of just a couple of components, but is often limited to one specific chip. A development board is often a programmer and a few buttons and leds, so you can test the input and output from the chip (like the velleman k8048). Features will vary depending on the board I guess.

Depending on the hardware and software support, you'll be able to program a range of chips, possibly including a programming method called ICSP (In Circuit Serial Programming). This means that you can have the chip actually in your target application for programming, and not have to move it from programmer to application and back again (pain in the ass and risky to the legs).

The cream of the crop allow debugging in circuit, which means you can go through the code line by line, watching how things change inside the chip. You can do this with the simulator in MPLAB also, not exactly as fun as the hardware and the I/O is tricky, but it'll do to start with.

The MPLAB is a very complete coding tool, allowing editing, compiling, debugging and simulating all the chips. It's free too which is amazing. I dont know about the AVR; I only took a short look at those.

Have you done some programming/coding before now?
Back to top
View user's profile Send private message Visit poster's website
mi_dach



Joined: Dec 17, 2005
Posts: 133
Location: Sweden

PostPosted: Fri Oct 20, 2006 11:02 am    Post subject: Reply with quote  Mark this post and the followings unread

That PICkit-1 does not seem to support many chips. I guess much depends on what you wanna do, but you'll probably be interested in the PIC16F series of chips, the 18F family is much more complicated. A programmer that only does 14leg chips might be limiting by the time you have done a couple of projects.

ICSP is desirable in your programmer, but you could live without it. The number of legs on the chip is quite important, more legs means connecting more things at once. With 14 leg chips you often end up connecting lots of multiplexers and serial-to-parallel converters. This works but if the programmer supports it, its often easiest to just change to a bigger chip, the price difference isnt often a factor.

I strongly recommend just reading everything on that microchip site Smile Really, about 90% of development is just reading stuff.
Back to top
View user's profile Send private message Visit poster's website
jksuperstar



Joined: Aug 20, 2004
Posts: 2503
Location: Denver
Audio files: 1
G2 patch files: 18

PostPosted: Fri Oct 20, 2006 12:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've personally used the AVR to great extent in projects at home (ie-with a budget and "professional" tools). They are fast, and great. They support high-level languages such as C (and were in fact designed to do so). If you have a parallel port, you can build yourself a dirt cheap ISP (in-circuit programmer) cable that transfers your code into the device. I use GCC (open source tools) exclusively, and they work great. The AVR's have a bit more speed and efficiency over the PIC devices.

Just to give you a basic run down of tool flow:
You write your code (in C for example).
In the case of gcc, your code is compiled into object code, which is then linked (with any libraries, static data, etc). Sometimes these are refered to as seperete steps, sometimes it's called "compile".
This linked code is then translated into the final code type, be it ".hex", ".elf", or other. From compile to to final output is generally called"building" your code.
You then run a programming software (in my case, I use "avrdude") which takes the final output, finds your device on the parallel port, and uploads the program into the AVR's flash. Once that's done, the program starts running.

the newer AVR's also support a JTAG interface, which is standard (MANY devices use this), and allows for debugging your code as well.

You can find lots of info at http://avrfreaks.net
From there, you can download "WinAVR", which has everything you need (in terms of software on your pc) to use the Atmel AVR.

A link to one of my own devices based on the AVR (scroll down):
http://electro-music.com/forum/topic-7323.html
Back to top
View user's profile Send private message Visit poster's website
Mikmo



Joined: Dec 01, 2005
Posts: 150
Location: Copenhagen - Denmark

PostPosted: Fri Oct 20, 2006 2:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

you should check this

http://www.elby-designs.com/avrsynth/avrsyn-about.htm

_________________
Stay Cool
Mikael
http://www.mikmo.dk
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 1 of 1 [11 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use