Connect with us

Boarding the microcontroller-train

Discussion in 'Electronic Basics' started by Rikard Bosnjakovic, Feb 16, 2007.

  1. During the past two years I've been thinking of - but never got the grip
    to - starting to learn how to use microcontrollers. For my next hobby
    project, it seems to be a necessity to learn so I thought now - once and
    for all - is The Time To Learn.

    The next project is going to be a something that looks and acts like a
    chess clock, with some few additions. While not completely impossible to
    do with a bunch of 555-timers and a lot of logic gates feeding some
    7-digit LEDs, the system would probably be a messy harness real quick and
    blocks the ability for improvements. So I'm thinking a uC will take care
    of all the timing / scoring, and use some external chips (like a 7-LED
    decoder and the like) as helper chips.

    Now, so far so good in the planning, here's the real reason that's stopped
    me for learning microcontrollers: I have absolutely no idea where to
    start. Some people say "Go Atmel!", others say "Go PIC!", others say "Go
    Foo!".

    I have googled around for tutorials, beginners' pages, introduction to /
    comparison between Atmel/PIC and simliar pages, I've seen plenty of
    "starter kits" every here and there, some way more expensive than others
    making me confused of which to buy, so I still don't know where to put my
    foot.

    I have 20+ (software) programming experience. Around 1990-95 I programmed
    system assembler for the MC68000, meaning I have atleast some of the
    required skills. I think.

    So, considering the next project of mine and my background, which kind of
    uC might be good enough for me? Or atleast for starting out in the area.
     
  2. Add a "years of" after "20+".
     
  3. Elektor has a 5 part course, "Elektor Microcontroller Basics Course -
    Complete.pdf", that floats around on the web.



    --
    ..
    ..
    ..
    ..
    ..
    ..
    ..
    ..
     
  4. Guest

    If you've already written assembler for 68000, you're already well on
    your way. For little projects like you're describing I like to use
    assembler wher you have total control and responsibility for what
    happens. I haven't used PICs but quite a bit of 8051 and 6805/65908. I
    find switching gears between writing for one vs the other is pretty
    trivial - even to the point of transplanting MCS-51 code directly into
    6805. Rename Intel MOV to Motorola LDA/STA as needed and fix the
    assembler mnemonics and named Motorola RAM location to the names of
    Intel registers. Worked fine.

    As for the 'helper' 7 segment decoders, I used look-up tables to do
    the decoding in software which also allowed text using '7-segment
    font' so the clock can be set for month/day in text along with
    reporting time 'fail' and restore times.

    http://www.twyman.org.uk/Fonts/

    You'll have fun with whatever processor you choose and wonder why you
    waited so long.

    GG
     
  5. Don McKenzie

    Don McKenzie Guest


    don't know if you have seen this or not:
    http://www.dontronics-shop.com/pages.php?pageid=23
    it may help

    Don...


    --
    Don McKenzie
    E-Mail Contact Page: http://www.dontronics.com/e-mail.html

    Crystal clear, super bright OLED LCD (128x128) for your microcontroller.
    Simple serial RX/TX interface. Many memory sizes.
    http://www.dontronics-shop.com/product.php?productid=16460

    No More Damn Spam: http://www.wizard-of-oz.com
     
  6. Ben Jackson

    Ben Jackson Guest

    If you're a software guy, then you will appreciate how much better the
    Atmel AVR instruction set is than the classic PIC. Others before you
    have appreciated it in the form of a working GCC target for AVR. So if
    you want to sit down and code in C with no cash outlay, go AVR. If
    Atmel is still selling the Butterfly board for $20 from Digikey, get one.
     
  7. Robin

    Robin Guest

    You could download MPLAB from MicroChip and write some RISC code for
    their "PIC" type (RISC) processors and run it (simulate it) on your
    PC.

    Then you could buy the actual hardware i.e. a PIC and some other
    components (for a few pounds) and solder them together and transfer
    you code into the PIC with the "PICSTART" programmer (maybe a £100 ?)
    and try it out.

    With your experience, you will *enjoy* writing assembler using a
    minimal, instruction set, free from redundancy and you will have total
    control.

    If you were to go for a CISC then you should use C and maybe a third
    party operating system but then you *will* get bogged down in a morass
    of systemic-setting-up with no extra gain for a small project.

    Robin
     
  8. You could download MPLAB from MicroChip and write some RISC code for
    their "PIC" type (RISC) processors and run it (simulate it) on your
    PC.

    Then you could buy the actual hardware i.e. a PIC and some other
    components (for a few pounds) and solder them together and transfer
    you code into the PIC with the "PICSTART" programmer (maybe a £100 ?)
    and try it out.

    With your experience, you will *enjoy* writing assembler using a
    minimal, instruction set, free from redundancy and you will have total
    control.

    If you were to go for a CISC then you should use C and maybe a third
    party operating system but then you *will* get bogged down in a morass
    of systemic-setting-up with no extra gain for a small project.

    Robin

    ========================================================================

    I would suggest the PICkit1 for $36 or less, which allows you to program
    smaller flash devices of 8 and 14 pins. I used mine to develop a project
    recently. I also have an ICD2 debugger tool, which cost about $150. It can
    program almost any PIC, and can run the target in realtime with a
    breakpoint. Both devices connect with USB. I even accidentally damaged my
    ICD2 with a 120 VAC spike, and I got a free replacement in 2 days from
    Microchip.

    There are many players in the market, but it is important to go with a
    company that can provide good support, and has a large base of users who
    can give advice. Microchip has a very good on-line service ticket which
    gives you quick response to problems, a good user forum, and a liberal
    samples system, all of which are free. Of course, they hope you will be
    ordering 1000 pieces soon!

    Paul
     
  9. john jardine

    john jardine Guest

    You've everything going for you so no clear choice for the micro.
    I'd suggest the PICs. Primarily because they are cheap, available
    everywhere, all the devices are similar inside and every man and his dog
    offers hardware and software for them.
    Downside is that the PIC hardware internals are pukey and the microchip
    manuals and support stuff have been written by lunatics from some
    programmer's care home. They're easy to use once you've got to the flashing
    LED bit, though for a complete beginner, the AVR would get you to that point
    quicker.
     
  10. Ben Jackson

    Ben Jackson Guest

    Actually I think the datasheets are one of their strong suits. If you
    want to drive some PIC's I2C hardware, you could learn how to do it from
    their datasheets having not previously known what I2C was at all.
    They're much better than the ones for the early AVR parts.
     
  11. john jardine

    john jardine Guest

    It's the size of the things that scares me. God knows what they do to a new
    starter.
    Just starting to use their 128K PIC18F? thing, 8Mbyte PDF, 500 pages, no way
    am I printing it out. Spent 10 minutes leafing through looking for
    monumental improvements in line with their marketing blurb. Nah, realised I
    was just looking at cut and pasted 16F628s or 16F877s etc.
    Seems we're now upto 80 instructions (very nice!). Think it's high time they
    lost the "R"isc marketing aspect :)
    john
     
  12. Rich Grise

    Rich Grise Guest

    I just find it a little hard to believe that there are people who actually
    seem to _like_ bank-switching.


    Thanks,
    Rich
     
  13. Thank you for the input.

    There is probably no risk for painting myself into a corner - I could
    always change the architecture if I see that there's something queaky. But
    as of the time of writing, I have zero experience with any kind of
    microcontroller, and I feel that I must atleast start *somewhere*.

    I've decided to start with PICs. Ebay had some cheap USB-programmer from
    China (probably pirated, but who cares) so I ordered it yesterday. In the
    meantime until I get it, I'll eat some more documentation.
     
  14. ehsjr

    ehsjr Guest

    Check out the Microchip site. You may be able to
    get free samples to experiment with.
    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=64

    Ed
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-