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

    donald

    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.

    John
     
  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 -
    http://www.melabs.com
    Several other BASICs are available, as well as some free & limited
    demo versions for the AVR's...
    http://www.mcselec.com/
    http://www.fastavr.com/
    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.

    Arch
     
  5. MooseFET

    MooseFET Guest

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


    I think one of the best conplete development kits is the www.cygnal.com
    product.
     
  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.

    donald
     
  8. John Larkin

    John Larkin Guest

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

    John
     
  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

    MOV.B SRC, DST

    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
    trouble.

    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.

    John
     
  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

    [/QUOTE]

    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.

    http://focus.ti.com/mcu/docs/mcupro...tabId=1203&familyId=342&toolTypeId=1#software

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

    donald
     
  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
    want.

    http://www.standardics.nxp.com/products/lpc2000/pdf/lpc2101.lpc2102.lpc2103.pdf



    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.

    John
     
  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 )

    donald
     
  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.

    John
     
  18. ehsjr

    ehsjr Guest

    Yeah but, back then Real Men programmed in "toggle". :)
    Ed
     
  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.

    John
     
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

-