Connect with us

Which uController to learn?

Discussion in 'Electronic Components' started by John E., Mar 15, 2007.

Scroll to continue with content
  1. mpm

    mpm Guest

    The differences are minor.
    And if you code properly, its very easy to adjust any relocated SRF's
    that affect program execution.
    Ditto for the Interrupt vectors, which for the "Standard" interrupts
    like T0, T1, etc... are usually at the expected addresses anyway.

    Now, clock cycle / instruction cycle time is another story.
    I think the original 8051 would execute 1 instruction every 12 clocks.
    (?)
    Newer ones can do it in 2. (in other words, a 6x improvement).

    If yours happens to default to the faster "speed", then it may not be
    a drop-in replacement.
    -even if its 100% code compatible.

    -mpm
     
  2. Ken Smith

    Ken Smith Guest

    The ones from Cygnal do it in one. Basically they are 50MPIS 8051s with
    analog stuff on board.
     
  3. krw

    krw Guest

    Yes, I always wrote a module for each UC that had the names of all
    SRFs for that model. This module was then included in the MAKE based
    on version. Never, EVER, use absolute addresses for SRFs.
    Sure, I hard-coded these at each location, whether they were used or
    not. The main source module would have a stub to each ISR.
    Yes, as I recently found out (duh!) the original 8051 has a bit-
    serial ALU. BTW, MUL and DIV are 24 clocks per instruction.
     
  4. How would do you do an 8 x 8 multiply with 24 clocks and a serial ALU?
    Seems to me you'd need at least 64 clocks.

    Anyway, MUL and DIV take 4 machine cycles (24 states, 48 oscillator
    clocks in the original 8x51). Still not 64 unless you're using both
    clock edges.

    There is at least one 8-bit micro that is serial internally- the ST-6
    (it's a feature they say, lower noise)-- but I am not convinced that
    the 8051 is. Any cites?


    Best regards,
    Spehro Pefhany
     
  5. krw

    krw Guest

    I don't have the microarchitecture of the original 8051, but you
    don't need a clock for each bit. The diagonals should be enough.
    I thought it was six clocks per machine cycle and two (most) or four
    (MUL/DIV) cycles per instruction. It's been a long time since I used
    one though so may be misremembering the convoluted details.
    It was brought up in AFC in the past week or so. I'll see if I can
    find the reference.
     
  6. Mike

    Mike Guest

    68000 series has pretty symmetric instruction set (orthoganol).

    ie Moving from register to memory and vice versa is symmetric there are
    minimal exceptions. There are microntroller variants of processors that
    use 68000 instruction set.

    Having a lot of registers is a bonus, 16 to 32 is ideal for the vast bulk
    on microcontroller apps, can get away with 4 or even 2 if you are keen.

    Basically, for a beginner, you'd want an instruction set that works 'both
    ways' with registers, memory and IO ports, you dont want one with lots of
    lumpy exceptions or stack size restrictions or memory address or io
    restrictions - because if you are doing assembler you dont want to worry
    about that many until you are proficient, which usually happens fairly soon
    once you get stuck into it...




    --
    Regards
    Mike
    * VK/VL Commodore FuseRails that wont warp or melt with fuse failure indication
    and now with auto 10-15 min timer for engine illumination option.
    * VN, VP, VR Models with relay holder in progress.
    * Twin Tyres to suit most sedans, trikes and motorcycle sidecars
    http://niche.iinet.net.au
     
  7. Lionel

    Lionel Guest

    Good man, you'll go far. ;^)
    ROTFL! Nicely put, martin. (AKA: RTFM, dimwit!)
    Or just make one, it's not hard.
    Definitely.

    It's also nice to have more than one multimeter, so you can monitor
    multiple things at the same time. I have one fancy one, & a couple of
    cheap ones, all with EZ hook clips of various sizes.

    A solderless breadboard is handy, just watch out for the effects of
    the extra capacitance between rows on high frequency signals, & for
    meltdowns from hot components like voltage regulators or drive
    transistors. (I wire up such subsections on stripboard & solder on
    pin-headers so I can plug them into the breadboard.)
     
  8. John Barrett

    John Barrett Guest

    GEEEZ -- I gave up writing ASM for the 1st cut about 20 years ago -- the
    compilers available even then were efficient enough that you only needed to
    get down and dirty for the most critical timing dependent code.. there just
    isnt a point in starting off with ASM considering that C maps almost 1-to-1
    to most assembly languages for most of its internal features. And the WinAVR
    C compiler makes it real easy to embed ASM right in the C code so I can do
    it in C first, then convert just the parts that need it in place with a
    perfectly working and tested "flow chart" right in front of me.

    In addition.. for 99% of apps, you'll never bother with ASM because the
    compiled code will work right off and nothing will need to be hand
    optimized... you've gotta be right on the ragged edge of what the chip is
    capable of before ASM is going to help you, and 99% of apps wont even come
    close to that limit.
     
  9. John E.

    John E. Guest

    ie Moving from register to memory and vice versa is symmetric there are
    Names! Names! Names! (please). I agree with what you say, but I need the
    benefit of y'all's experience. Which controller "variants of processors that
    use 68000 instruction set" and which don't do "lumpy exceptions or stack size
    restrictions..." etc.

    Just need to know what name to call these lovelies by.
     
  10. krw

    krw Guest

    True, some OSs suck more than others. OTOH, some suck so much they
    simply blow.
    I haven't looked closely in the past couple of years. 8051s had it
    all over others several years back. I had plenty of 8051s (and the
    environment) for my last project so I just used them. only needed
    ten. ;-)
    The 8051 is extreme Harvard. It makes sense once you break the von
    Neuman mindset. A von Neuman controller is a waste.
    How so? ...at least until 64K no bank switching is needed. After
    64K, well the 8051 was never intended to be a PeeCee. ;-)
    AFAIC, the 8051 is a good choice as a bit-banger, which was what it
    was designed to do. As I've said, I've never used a PIC (or
    seriously looked at it, even) so I can't compare the two. My
    assumption is that the PIC architects aren't brain-dead (like
    Dimbulb).
    I'm not so sure they ALL do. ;-)
    There really isn't any ambiguity with an 8051 either. Gazinta bit
    and a gazouta bit and a couple of rules. Some tieups may be needed
    for shared pins. Share pins and you'll have that.
    I'm certainly not afraid of them, just never had an opportunity.
    Maybe I'll buy a kit and play.
    ARMs don't thrill me much. Too much power. I'd likely have to
    learn C. ;-)
     
  11. linnix

    linnix Guest

    I've played with a few different micros, but there are still plenty left
    Too much for what? The one I am using draws 70mA typical.
    Of course, you can run an AVR for less than 1mA.
    In my case, I use an AVR to power control an ARM.
    The ARM can do the job quicker so both can go back to sleep ASAP.
    Why? They work in assemblers too, even if I don't.
     
  12. Some people would say that if you're *not* at the edge of what the
    microcontroller can do, you're using one that's too expensive. ;)
     
  13. linnix

    linnix Guest

    Same for PCs. How many people really need the 3GHz Dual core PC to
    read this newsgroup?
     
  14. krw

    krw Guest

    Power as in MIPS, not as in mA. If I want MIPS I'd go with a PPC of
    some sort.
    With the MIPS available one wouldn't likely be doing bit-banging,
    which is where assembler excels.
     
  15. linnix

    linnix Guest

    Why would too much MIPS bother you?
    You don't have to use pay per MIPS.
    I haven't seen any PPC in low pin count with internal memories yet.
    The Arm I am using is 64K flash, 8K sram on chip in 48 pins QFP.
     
  16. Guest

     
  17. krw

    krw Guest

    Certainly you pay for MIPS. They don't give processors away free.
    More variables not stated in the parameters.
     
  18. krw

    krw Guest

    I don't need a pickup truck to go to the pub either but it comes in
    handy at the dump. This dual 1.86GHz laptop is kinda nice too (once
    I put enough memory on it).
     
  19. linnix

    linnix Guest

     
  20. linnix

    linnix Guest

     
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

-