Author Topic: A first microcontroller, and an introduction!  (Read 7522 times)

0 Members and 1 Guest are viewing this topic.

Offline Sparky49Topic starter

  • Regular Contributor
  • *
  • Posts: 92
A first microcontroller, and an introduction!
« on: June 12, 2012, 03:05:42 pm »
Hi everyone,

My name's Sparky, and I'd like to say hi to everyone with my first post.

Hi!

I've just turned 17, and have been busy with electronics for about three years now. It has become a real passion of mine, and I enjoy learning about as much of it as I can. So far, I've read through The Art of Electronics as well as several other books on electricity and magnetism and it's been great fun.

I believe I'm at the stage where I'm quite good with discrete analogue electronics, but I'm intrigued by microcontrollers and computers.

I've already spent quite a bit on several dev boards from Velleman, Freescale, etc, but none of them have worked (wrong OS, broken board, etc) and being fairly young, I'm gutted that I've wasted so much money. :(

So, could you guys help me out and suggest a dev board which will work with a windows 7, 64 bit computer?

I'm really interested in assembly, and I know that there are folks who don't like it, but I'm interested at how these ICs work at a fundamental level, so I'd much prefer assembly over C, or higher level languages. I appreciate there'll be a steep learning curve, but I'm okay with that - so long as the silly board will work with my computer! :)

Many thanks guys - as for cost, I'm not too bothered. I just don't want to waste any more money. :(

Thanks again,

Sparky
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: A first microcontroller, and an introduction!
« Reply #1 on: June 12, 2012, 03:35:03 pm »
Hi Sparky,

As you've already spent a fair bit of money, maybe you should try to get one of the boards you already have working. If you post on here the problems you are getting, someone might be able to help out - and it won't cost you anything!

Failing that, there are several evaluation boards you can get for around the $10 mark so you don't have to spend a fortune.

Which country do you live in? That can make a difference in how easy it is to get cheap boards.


 

Offline Sparky49Topic starter

  • Regular Contributor
  • *
  • Posts: 92
Re: A first microcontroller, and an introduction!
« Reply #2 on: June 12, 2012, 04:04:30 pm »
Thanks for the reply deephaven!

Well, I've spent some time trying to find out what was wrong with my Velleman board, but I can't find anything on the correct board - other than the power LED doesn't light. I've scratched through the solder mask in places to test the copper around the power supply, but I can't find any problems!

Velleman themselves have been useless, and so I don't really want anything more to do with them at the moment.

The next board I'm using is a Freescale DEMO9S08QG8, but the correct version of codewarrior (6.3) doesn't work on 64 bit operating systems. When I tried using it on my older laptop, it wouldn't connect properly - it turns out it doesn't have any port drivers, which is really strange. I've tried installing some, but nothing works. It doesn't work with USB either.

I'm in the UK, if that helps. More specifically in Cambridgeshire.

I've been more impressed by Freescale's support, so I would still be open to suggestions.

Many thanks,

Sparky
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: A first microcontroller, and an introduction!
« Reply #3 on: June 12, 2012, 05:29:12 pm »
Hi, if you would like some really cheap and high performance boards you can pick one from ST (USD)
STM32F0DISCOVERY  - ( Cortex M0 ) 7.99 Cheapest of them all, comes with a "proto board"
STM32VLDISCOVERY - STM32F100 ( Cortex M3 ) 9.90
STM32L-DISCOVERY with LCD and a Capacitive sensor - STM32L100 ( Low power Cortex M3 ) 10.5
STM32F4DISCOVERY -  ( Cortex M4 )  14.99 < This one is the best of all boards, 210DMIPS 168MHz with a DSP built in (1MB Flash and 196KB RAM)
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: A first microcontroller, and an introduction!
« Reply #4 on: June 12, 2012, 05:46:07 pm »
Dave beat me to it, I was going to suggest those myself! They really represent very good value for money. Farnell.com has them in stock, just got to their website and do a search on any of Dave's suggestions.

There is a choice of software that you can use to program them. I've only tried the Atollic, but it works well and is free. You do need to find you way around the IDE to make all the demo programs compile. Also they do tend to be C centric more than assembler.

If you wanted to start with something less powerful and work with assembler, then maybe a PIC16 or PIC18 might be better for you.
 

Offline Sparky49Topic starter

  • Regular Contributor
  • *
  • Posts: 92
Re: A first microcontroller, and an introduction!
« Reply #5 on: June 12, 2012, 05:51:27 pm »
Great stuff! Thanks guys!

May I also ask for some books which would get me going?
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: A first microcontroller, and an introduction!
« Reply #6 on: June 12, 2012, 05:56:05 pm »
Great stuff! Thanks guys!

May I also ask for some books which would get me going?

http://programming-motherfucker.com/become.html
I use The C Book from this website


Dave beat me to it, I was going to suggest those myself! They really represent very good value for money. Farnell.com has them in stock, just got to their website and do a search on any of Dave's suggestions.

There is a choice of software that you can use to program them. I've only tried the Atollic, but it works well and is free. You do need to find you way around the IDE to make all the demo programs compile. Also they do tend to be C centric more than assembler.

If you wanted to start with something less powerful and work with assembler, then maybe a PIC16 or PIC18 might be better for you.

I hope you're not sore about it  :P
Anyways, http://www.kerrywong.com/2011/10/22/stm32f4-discovery-board/ He describes how he got around to converting the code into HEX using Ronetix's toolchain
Oh and the built in compiled demo code in the folder one downloads is ready to upload to the board using ST-LINK
« Last Edit: June 12, 2012, 05:58:28 pm by DaveXRQ »
 

Offline Sparky49Topic starter

  • Regular Contributor
  • *
  • Posts: 92
Re: A first microcontroller, and an introduction!
« Reply #7 on: June 12, 2012, 06:15:58 pm »
Well, I've decided to go with the STM32F4DISCOVERY board - it's only a tenner!

I'm not too sure about that programming website - the title doesn't bother me, but I'm not sure if the assembly language tutorial is geared towards uC's. Or is computer and uC programming basically the same?
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: A first microcontroller, and an introduction!
« Reply #8 on: June 12, 2012, 07:40:34 pm »
Well, I've decided to go with the STM32F4DISCOVERY board - it's only a tenner!

I'm not too sure about that programming website - the title doesn't bother me, but I'm not sure if the assembly language tutorial is geared towards uC's. Or is computer and uC programming basically the same?

Nah, never. uC is a uC.
Just ignore assembly for the time being, with these newer high performance chips it's all C geared so assembly wouldn't make it perform top notch
 

Offline Sparky49Topic starter

  • Regular Contributor
  • *
  • Posts: 92
Re: A first microcontroller, and an introduction!
« Reply #9 on: June 12, 2012, 08:26:16 pm »
Okay, thanks. :)

But I'm quite set on assembly. As I said, I'm very interested at how these things work at a fundamental level. Sorry. :)

Unless you guys think that there is really no use at all?
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: A first microcontroller, and an introduction!
« Reply #10 on: June 12, 2012, 09:24:54 pm »
Okay, thanks. :)

But I'm quite set on assembly. As I said, I'm very interested at how these things work at a fundamental level. Sorry. :)

Unless you guys think that there is really no use at all?

If you want to start with assembler, like I said I would recommend trying a PIC16 or PIC18. They have a simple and straightforward instruction set and there is a tonne of stuff about them on the Microchip website plus elsewhere on the web.

I find the best way to learn is to think of a project - something 'real' to do - and then get something together to make that project a reality.  I find it a much more fulfilling experience than just doing some prescribed exercises.
 

Offline Sparky49Topic starter

  • Regular Contributor
  • *
  • Posts: 92
Re: A first microcontroller, and an introduction!
« Reply #11 on: June 12, 2012, 09:48:29 pm »
Okay, thanks, that's what I'll do. :)

I'll try to let you know how I get on!

Many thanks again!

Sparky
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 12278
  • Country: us
Re: A first microcontroller, and an introduction!
« Reply #12 on: June 12, 2012, 10:07:05 pm »
If you're really set on learning assembly language, you could also consider MASM32 for Windows. It will be harder to get useful programs working due to the need to interact with the Windows API, but it will add another dimension to your learning. There's nothing more fun than making really powerful hardware execute simple programs!
« Last Edit: June 13, 2012, 02:07:37 pm by IanB »
 

Offline JuKu

  • Frequent Contributor
  • **
  • Posts: 566
  • Country: fi
    • LitePlacer - The Low Cost DIY Pick and Place Machine
Re: A first microcontroller, and an introduction!
« Reply #13 on: June 13, 2012, 05:58:35 am »
You are doing the right thing in learning assembler. That teaches you what is really going on. For future, you also want to learn C, as this is how real projects are done. Some houses use C++, but C is still the major language on embedded world.
http://www.liteplacer.com - The Low Cost DIY Pick and Place Machine
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: A first microcontroller, and an introduction!
« Reply #14 on: June 13, 2012, 08:05:46 am »
Okay, thanks, that's what I'll do. :)

I'll try to let you know how I get on!

Many thanks again!

Sparky

You can try out PIC assembler without spending a penny. Get MPLAB and then you can select a PIC you would like to work with (start simple with a PIC16) and you can load a template and run it in the simulator. I.E. you don't need any hardware at all, you just run it on the PC, single step and put a watch on any register and see how it works.
 

Offline xquercus

  • Contributor
  • Posts: 47
  • Country: us
Re: A first microcontroller, and an introduction!
« Reply #15 on: June 15, 2012, 03:41:57 pm »
But I'm quite set on assembly. As I said, I'm very interested at how these things work at a fundamental level. Sorry. :)

I have very limited exposure with micros -- only the 8 and 16 bit PICs.  It's great that you are interested in assembly.  Even when you are programming in C, generally you are manipulating the same registers you would be with assembler except you are using C constructs.   Using assembly actually makes it easier to learn how the architecture functions.  I cut my teeth on a PICKit II and a Microchip Low Pin Count demo board.  It comes with a very easy to understand set of tutorials.  At some point you'll find yourself wanting to do some simple division or implementing an ASCII lookup table.  At that point you may find a move to C is in order.  Until then, especially because this is based on INTEREST and not some design requirement, go full speed ahead with assembly.  It really is a beautiful thing to know, with certainty, what your micro is doing every single CPU cycle.
 

Offline Tony R

  • Regular Contributor
  • *
  • Posts: 117
  • Country: 00
Re: A first microcontroller, and an introduction!
« Reply #16 on: June 17, 2012, 02:00:26 am »
Hi, if you would like some really cheap and high performance boards you can pick one from ST (USD)
STM32F0DISCOVERY  - ( Cortex M0 ) 7.99 Cheapest of them all, comes with a "proto board"
STM32VLDISCOVERY - STM32F100 ( Cortex M3 ) 9.90
STM32L-DISCOVERY with LCD and a Capacitive sensor - STM32L100 ( Low power Cortex M3 ) 10.5
STM32F4DISCOVERY -  ( Cortex M4 )  14.99 < This one is the best of all boards, 210DMIPS 168MHz with a DSP built in (1MB Flash and 196KB RAM)

Don't forget about the MSP430 launchpad!
Tony R.
Computer Engineering Student
Focus: Embedded Assembly Programming, Realtime Systems,  IEEE Student Member
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: A first microcontroller, and an introduction!
« Reply #17 on: June 17, 2012, 07:51:18 am »
Hi, if you would like some really cheap and high performance boards you can pick one from ST (USD)
STM32F0DISCOVERY  - ( Cortex M0 ) 7.99 Cheapest of them all, comes with a "proto board"
STM32VLDISCOVERY - STM32F100 ( Cortex M3 ) 9.90
STM32L-DISCOVERY with LCD and a Capacitive sensor - STM32L100 ( Low power Cortex M3 ) 10.5
STM32F4DISCOVERY -  ( Cortex M4 )  14.99 < This one is the best of all boards, 210DMIPS 168MHz with a DSP built in (1MB Flash and 196KB RAM)

Don't forget about the MSP430 launchpad!
Yeah! the cheapest of 'dem all and pretty powerful
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: my
  • reassessing directives...
Re: A first microcontroller, and an introduction!
« Reply #18 on: June 17, 2012, 08:56:56 am »
learning assembly is very good imho. but staying in that domain for so long is not, since we have a better tool right now... compiler! but having said that, i believe that doesnt mean assembly is extinct, there are places for it, esp when you have small sized simple program and speed and timing control is utmost important.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf