A first microcontroller, and an introduction! - Page 1
Forum section: electronics / general

author: Sparky49
author_rank: Regular Contributor
timestamp: June 12, 2012, 03:05:42 pm
content: 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

author: deephaven
author_rank: Frequent Contributor
timestamp: June 12, 2012, 03:35:03 pm
content: 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.

author: Sparky49
author_rank: Regular Contributor
timestamp: June 12, 2012, 04:04:30 pm
content: 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

author: T4P
author_rank: Super Contributor
timestamp: June 12, 2012, 05:29:12 pm
content: 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.90STM32L-DISCOVERY with LCD and a Capacitive sensor - STM32L100 ( Low power Cortex M3 ) 10.5STM32F4DISCOVERY - ( Cortex M4 ) 14.99 < This one is the best of all boards, 210DMIPS 168MHz with a DSP built in (1MB Flash and 196KB RAM)

author: deephaven
author_rank: Frequent Contributor
timestamp: June 12, 2012, 05:46:07 pm
content: 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.

author: Sparky49
author_rank: Regular Contributor
timestamp: June 12, 2012, 05:51:27 pm
content: Great stuff! Thanks guys!May I also ask for some books which would get me going?

author: T4P
author_rank: Super Contributor
timestamp: June 12, 2012, 05:56:05 pm
content: Quote from: Sparky49 on June 12, 2012, 05:51:27 pmhttp://programming-motherfucker.com/become.htmlI use The C Book from this websiteQuote from: deephaven on June 12, 2012, 05:46:07 pmI hope you're not sore about itAnyways,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 toolchainOh and the built in compiled demo code in the folder one downloads is ready to upload to the board using ST-LINK

author: Sparky49
author_rank: Regular Contributor
timestamp: June 12, 2012, 06:15:58 pm
content: 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?

author: T4P
author_rank: Super Contributor
timestamp: June 12, 2012, 07:40:34 pm
content: Quote from: Sparky49 on June 12, 2012, 06:15:58 pmNah, 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

author: Sparky49
author_rank: Regular Contributor
timestamp: June 12, 2012, 08:26:16 pm
content: 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?

author: deephaven
author_rank: Frequent Contributor
timestamp: June 12, 2012, 09:24:54 pm
content: Quote from: Sparky49 on June 12, 2012, 08:26:16 pmIf 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.

author: Sparky49
author_rank: Regular Contributor
timestamp: June 12, 2012, 09:48:29 pm
content: Okay, thanks, that's what I'll do.I'll try to let you know how I get on!Many thanks again!Sparky

author: IanB
author_rank: Super Contributor
timestamp: June 12, 2012, 10:07:05 pm
content: 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!

author: JuKu
author_rank: Frequent Contributor
timestamp: June 13, 2012, 05:58:35 am
content: 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.

author: deephaven
author_rank: Frequent Contributor
timestamp: June 13, 2012, 08:05:46 am
content: Quote from: Sparky49 on June 12, 2012, 09:48:29 pmYou 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.

author: xquercus
author_rank: Contributor
timestamp: June 15, 2012, 03:41:57 pm
content: Quote from: Sparky49 on June 12, 2012, 08:26:16 pmI 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.

author: Tony R
author_rank: Regular Contributor
timestamp: June 17, 2012, 02:00:26 am
content: Quote from: DaveXRQ on June 12, 2012, 05:29:12 pmDon't forget about the MSP430 launchpad!

author: T4P
author_rank: Super Contributor
timestamp: June 17, 2012, 07:51:18 am
content: Quote from: Tony R on June 17, 2012, 02:00:26 amYeah! the cheapest of 'dem all and pretty powerful

author: Mechatrommer
author_rank: Super Contributor
timestamp: June 17, 2012, 08:56:56 am
content: 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.