Connect with us

Painless micro program

Discussion in 'Electronic Design' started by [email protected], May 17, 2007.

Scroll to continue with content
  1. Guest

    What is the most painless way to program a small micro for 2 PWM
    inputs and 2 PWM outputs? Logic would consist of timing and simple
    math manipulation of input to output.
    I can handle the hardware, but software is a foreign language. Would
    consider easy to impliment software or a low cost programming
    service. Comments and suggestions appreciated.
  2. Donald

    Donald Guest

    How bad does this program need to be done ?

    1) Take the cost of your time

    2) Guess how much time it would take _you_ to "program a small micro"
    and double it.

    3) That would be your base line to start paying someone how knows what
    their doing to get it done.

    If you have the time and would like to learn how to do this yourself,
    I would suggest googleing for *** programmers and free *** software.

    good luck


    PS: Don't let the CPU zelots tell you which is best, at your level any
    CPU will do to learn on.

    *** = AVR, PIC, 8051, 6808, ARM, etc, etc, etc ........

    PPS: I like AVR :)
  3. John Larkin

    John Larkin Guest

    Anybody got thoughts on AVR versus the TI MSP430? We're looking for a
    small, cheap, 14-pin-ish flash-based uP with adc's, essentially to
    manage a fancy solid-state relay. I think neither has hardware
    multiply in the low-end chips, but that's survivable. We're looking to
    digitize maybe 3 analog inputs and crunch an algorithm every 100 us or
    less, and do some serial control i/o, and the TI looks pretty good,
    fetching and executing an instruction word every clock.

  4. Archilochus

    Archilochus Guest

    I'd say the easiest (at least for me) has been by using a BASIC
    compiler. I use various Microchip PIC chips & PicBASICPro compiler -
    Several other BASICs are available, as well as some free & limited
    demo versions for the AVR's...
    The code generated by the BASIC compilers is not as compact as well
    written assembly code - but the BASIC compilers make learning and
    using micros far easier.

  5. MooseFET

    MooseFET Guest

    That just proves you are silly. 8051's rule! :)

    I think one of the best conplete development kits is the
  6. Michael

    Michael Guest

    AVRs have hardware multiply in the MEGA series, which are still quite
    cheap (Digi-Key shows the MEGA48 as $1.50 each in quantities of 100).

    Not sure how MSPs compare to AVRs.
  7. Donald

    Donald Guest

    See, now the OP has done it.

    The real zealots are coming out !!! ;-)

    I forgot about MSP430's, I have been playing with a demo kit from TI and
    it is another good chip for my design arsenal.

  8. John Larkin

    John Larkin Guest

    I can't at the moment recall a more repulsive architecture, excepting
    maybe the IBM 1401.

  9. John Larkin

    John Larkin Guest

    I was reading through the instruction set last night. It looks *very*
    PDP-11, nice and orthogonal, and things move in the proper direction


    unlike certain bass-ackwards machines I could name. And they're
    working one level of deferral from what I'm used to,

    JMP R5

    I mean, how can you jump to a register? That's going to cause me

    The BIS/BIC/BIT opcodes are pure 11, although they added the AND,
    which the PDP-11 didn't have. But they use some weird names, like
    getting "branch" and "jump" totally backwards.

    Too bad about the multiply. But we'll mostly be squaring (for RMS) and
    that can be finnessed.

  10. linnix

    linnix Guest

    AVR is much easier to program than MSP.
    Just avoid the tinyAVRs if you want multiplier.
    QFN 32 is as small as SOIC-14.
    Same for AVR.
  11. I think that probably TI would be the best, but I don't think there
    are any showstopper issues with either one.

    Best regards,
    Spehro Pefhany
  12. Donald

    Donald Guest


    I am sure you are trying to program this is C.

    TI has a trial version of their compiler on their web site.
    It will do upto 8K of code.

    The CCE 2.0 also has a simulator in the package.

    You might want to try their C compiler to see if it comes close to the
    100uSec time required.

    There is also a 4K IAR compiler availabel from the same location.

    Please share what you find out, I would like to know how the CCE and IAR
    compilers compare in code size and speed.

  13. How about a LPC2101FBD48-S? under $2 in 100's. 7mm x 7mm. You would
    need a second voltage regulator. You can program it in assy if you

    Best regards,
    Spehro Pefhany
  14. John Larkin

    John Larkin Guest

    I'm not. I like assembly, and the TI reminds me of the PDP-11. There
    *are* machines I wouldn't dream of programming in assembly, of course.

    The cool thing about the TI is that every opcode fetch takes 62 ns, so
    you could practically measure execution times by taking a ruler to the
    assembly listing.

  15. Donald

    Donald Guest

    You are a real man John !!! ;-)

    After looking over the assembly manual for the MSP430, I like it better
    than the AVR.

    But, except for a few exceptions, I myself start with C and only go to
    assembly if it is really, really, really necessary.

    good luck and have fun ( that's what its all about )

  16. MooseFET

    MooseFET Guest

    CDP1802 has them all beat hands down.
  17. John Larkin

    John Larkin Guest

    Oh yeah, I'd repressed all my memories of that one.

  18. ehsjr

    ehsjr Guest

    Yeah but, back then Real Men programmed in "toggle". :)
  19. MooseFET

    MooseFET Guest

    I think it got designed in because it had a SEX instruction.
  20. John Larkin

    John Larkin Guest

    Good grief, I must be getting old, I've forgotten the Rim loader.

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