Shop OBEX P1 Docs P2 Docs Learn Events
Microcontroller Suggestions — Parallax Forums

Microcontroller Suggestions

MicrocontrolledMicrocontrolled Posts: 2,461
edited 2011-09-30 18:54 in General Discussion
Whoa, I know what you are thinking. "This is the first thread to violate the new forum rules!" Well, if the moderators feel like this is too far into the "restricted zone" you can remove it, as I would never want to cause any harm to Parallax or it's customers.
However, this is what and why I am asking: I received an offer from this place offering me 1 free item (up to $40) if I would then write up a review of it and post it to my blog with a link to their site. Fair enough, I'm always up for free stuff, but to my dismay, they carry no Parallax parts! So, I see this as my perfect opportunity to start working with another microcontroller.
I need something to replace the SX chip, preferably, something that is cheap and doesn't write in assembly (or has a free HLL compiler)
I would like the forum's opinion on the matter. What microcontroller would you prefer?

Thanks,
Microcontrolled

EDIT: I have used the Propeller chip for 4 years now. In fact, that is the only micro I have used. I would even consider myself an "advanced" Propeller user. I am NOT looking for a microcontroller because of the language, I am looking for one because the Propeller is too expensive for some things. THAT is why I want it as a replacement for the SX. Not for the language or the interrupts or really anything else. That is all.
«1

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-28 09:39
    My personal opinion ... you're coming at this from the wrong direction. You should start with "what do I want to build or accomplish", then pick a tool that appears to have the features you think you might need. There are so many microcontrollers out there and they all have features that make them a "must buy" for some set of applications. Even microcontrollers that to an experienced eye are terribly designed, are great in some very specific application. Either they're dirt cheap, incredibly tiny, have some feature that's just not in anything comparable, etc.
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-09-28 09:56
    Maybe pick something that interests you as a sub-processor/co-processor to a Parallax product. Small AVR's acting as A/D peripherals, a PIC with Ethernet acting as a Ethernet peripheral, something with native USB host support providing I2C or SPI based USB host support to a Propeller.....the opportunities are unlimited. I think there's a lot of value in leveraging the features of various mcu's as co-processors.

    Regardless, it's a good project, an excellent experience for you to write a review and great exposure for your blog. (not to mention free stuff).
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-09-28 10:04
    Basically, I just want a little MCU to do things that don't justify the cost of a Propeller. For example, controlling LED's, acting as a serial slave for an LCD, controlling a few servos, etc. In most cases, a slave unit to the Propeller, but other instances like, for example, building a simple timer or clock. Another good use would be for the mass amount of them. If they are low cost enough, I could build about 10 of whatever-it-is to have extras to give away/sell.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-09-28 10:19
    Agree with mindrobots that a PIC or AVR is good for sub-controller work. Parallax even uses a low-end AVR in their wheel positioning kit, for example. These require a compiler and programmer, of course, but the programmer doesn't cost much (and it's a one-time cost), and there are simple low-cost and no-cost compilers available.

    There's also the PICAXE, which offers a PBASIC-like command structure. However there are enough differences in how the PICAXE and BS chips work that you'll want to give yourself time for a learning curve.

    Don't forget it's pretty easy to drop in a 40-pin DIP Prop and EEPROM chip (outlay about $10), and drive it from the same regulated source as the rest of your circuit. I think this is preferable when you need something with a bit more power than an 8-bit chip like an AVR can deliver.

    -- Gordon
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-09-28 10:19
    I'll send you a PM relating to non-Parallax possible solution. It will give you experience with small mcu's that can be used as glue/peripherals to Propellers.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-09-28 11:09
    @Gorden: The Propeller is my first choice for every project, however, with the fall of the SX, it has been my ONLY choice. This is just fine, as the Propeller can do everything that I could ever ask it to, but the price hurts it. For me? No. But I have some "friends" who ask me to build things for them without necessarily intending to pay. This isn't a problem, but the need is usually pretty basic, and after putting a Propeller in it I realize "Hey, this LED blinker cost me $20 to make!". That is why I need a simple 8 bit MCU that can just do simple tasks when the Propeller is too powerful.

    @mindrobots: I got your PM. That looks like a good option, I think I may go for it, thanks!!
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-09-28 12:12
    There's also the PICAXE, which offers a PBASIC-like command structure. However there are enough differences in how the PICAXE and BS chips work that you'll want to give yourself time for a learning curve.
    -- Gordon

    I recently bought some PICAXE chips thinking that they would allow me to offload some processing for "dumb" sensors. There is a lot of differences between the different chips and there is a definite learning curve. The various Basic Stamps have a lot of consistency across the product line but matching the task to the microcontroller capabilities opens up many possibilites...
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-28 12:38
    I often ponder why I haven't purchased any BS1 microcontrollers as they are quite adequate for a lot of projects.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-09-28 14:05
    Hey, this LED blinker cost me $20 to make!". That is why I need a simple 8 bit MCU that can just do simple tasks when the Propeller is too powerful.

    You can easily spend $30 for a LED flasher using a $2 AVR. It all depends on whether you already have a programmer for the chip, and plan to stay with the platform for more than one project. Important is spreading out the one-time costs. If you already do Propeller programming, you probably already have the USB-to-serial adapter, so if you're just doing one or two sub-controller projects, DIP Props may be the way to go (but they're big, so that has to be considered, too).

    Long ago I got an STK500 programmer for AVR chips, which allows for more robust parallel programming. The STK programmers are more than what most people want to pay, and the little USB ISP programmers are good enough. Most cost under $20, and with gcc you've got a robust environment for all sorts of useful co-processing tasks. This is how I do LCD, keypad, IR remote control, and other tasks. I like to use either simple serial or I2C, for which there are numerous C libraries available.

    -- Gordon
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-09-28 15:50
    How about getting a Texas Instruments LaunchPad? It's an inexpensive board that doubles as a programmer for the targeted microcontrollers.

    However, the price is low enough that you might not want to use up your free gift to get one. In that case, I would suggest an Arduino Uno, an mbed, or an inexspensive digital multimeter if they qualify for the gift. The Arduino & mbed because they are both nice to work with, and the DMM because you should have one if you don't already.
  • Martin_HMartin_H Posts: 4,051
    edited 2011-09-28 16:32
    A wulfden Dorkboard or Solarbotics Ardweeny be purchased for $10 and are compatible with the Arduino tools. So you can half the time cost of the LED blinker.
  • $WMc%$WMc% Posts: 1,884
    edited 2011-09-28 17:41
    Whoa, I know what you are thinking. "This is the first thread to violate the new forum rules!" Well, if the moderators feel like this is too far into the "restricted zone" you can remove it, as I would never want to cause any harm to Parallax or it's customers.
    However, this is what and why I am asking: I received an offer from this place offering me 1 free item (up to $40) if I would then write up a review of it and post it to my blog with a link to their site. Fair enough, I'm always up for free stuff, but to my dismay, they carry no Parallax parts! So, I see this as my perfect opportunity to start working with another microcontroller.
    I need something to replace the SX chip, preferably, something that is cheap and doesn't write in assembly (or has a free HLL compiler)
    I would like the forum's opinion on the matter. What microcontroller would you prefer?

    Thanks,
    Microcontrolled
    '
    '
    Try the propeller with PropBasic
    http://forums.parallax.com/showthread.php?118611-Download-PropBASIC-here...-00.01.04
    '
    If you liked the SX and SXB, You'll love PropBasic
  • RavenkallenRavenkallen Posts: 1,057
    edited 2011-09-28 19:58
    I would also recommend the PICAXE. The language is very easy to learn(Basic) and the chips are pretty cheap/ small... They have a new series of M2 parts that have a LOT more features than the older models like 4 times the speed, more memory, configurable I/O pins, touch sensor input, built in temp sensor, hardware I2C, low supply voltage(1.8V i think)... I have been programming for 2-3 years now, and i still fall back and use the Picaxe on small projects. You just can't beat it for ease of use...
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-09-29 01:28
    PICAXE may be good, but I've never used it. The resource behind them, the PIC in its 6 pin form seems to be unbeatable, but no one is provding a free high level language for the 6 pin devices.

    If you are willing to accept a slower top clock rather, the SX can be swapped with I believe the 16F57 PIC for the 16 pin version and there is a 28pin analog to the SX as well. Sure, you loose some speed 20Mhz max rather than 50Mhz, but the newer PICs do not require an external crystal for stable RS232 ports.

    PIClist.com offers info of programing solutions and still maintains the parallex SXlist.com site.

    There are other products, but none that really support a FREE high-level language IDE for the smalling of micro-controllers. All have gone the bigger is better route. I do like ZBASIC amongst those.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-09-29 06:39
    I would also recommend the PICAXE. The language is very easy to learn(Basic) and the chips are pretty cheap/ small... They have a new series of M2 parts that have a LOT more features than the older models like 4 times the speed, more memory, configurable I/O pins, touch sensor input, built in temp sensor, hardware I2C, low supply voltage(1.8V i think)...

    The M2 parts can also "simulate ‘parallel processing’ by repeatedly switching between a number of tasks
    at very high speed." Certainly no comparison to the Propeller but a nice feature. They also have an on-chip PWM circuit that runs independently of the main core. You can also set the clock frequency on-the-fly.
  • bill190bill190 Posts: 769
    edited 2011-09-29 08:15
    In addition to your Parallax product background, what would look good on a resume and be a "feather in your cap" would be to program a Microchip microcontroller 8 bit chip. (Pic a chip, any chip!)

    -Program it in assembly.
    -Also program it in C.
    -Use interrupt(s).
    -Program same thing in C with an assembly interrupt handler section.
    -Learn to use on-chip debugging and MPLAB program simulation / debugging.
    -Then do the same thing with another Microchip Microcontroller.

    Do this and you will learn that for some simple things, a Pic Microcontroller might do the trick. And for others a Propeller is the best choice. Or a combination of both might be best.

    Hint: The less expensive chips with fewer features also have shorter data sheets. Some of these data sheets can be 400 pages or longer. That is a LOT of reading along with reading all the info on C / Assembly programming, MPLAB, PickKit3 programmer (or whatever), etc.

    Just installing MPLAB and the compilers can be quite a challenge!

    And this stuff is not easy. I read somewhere on the Microchip forum where a manufacturer could not find any college graduates in his area who could program these chips!
  • LeonLeon Posts: 7,620
    edited 2011-09-29 08:21
    I've never had any problems installing MPLAB and the various compilers, and the chips are quite easy to use.
  • bill190bill190 Posts: 769
    edited 2011-09-29 08:57
    The C18 compiler will not work if you install it in a deep directory. Like...

    C:\Documents and Settings\All Users\Microcontrollers\PIC\MCC18\MCC18 Complier

    It is happier very close to the root directory like this...

    C:\Pic\MCC18

    And you use different compilers depending on which chip you are programming. Some are free, some are not or have a limited time use. And some are not included with the MPLAB download and need to be installed separately.

    Then a lot of people have difficulty with the configuration bits settings, and specifically those in the MPLAB drop down -> As to when these settings apply and when they don't.

    The information is there about things like this, only it is buried in numerous 400 page documents and those documents are scattered around in the folders where the various programs reside, help files, or pdf files which need to be downloaded separately.

    So it can be like looking for a needle in a haystack! (Google is your friend...)

    Here is an example of all the documentation available for just one chip...
    http://www.microchip.com/wwwproducts/devices.aspx?ddocname=en010210
  • LeonLeon Posts: 7,620
    edited 2011-09-29 10:12
    It's best to put the configuration settings in one's code. They are all described in the header file for the device being used.
  • SRLMSRLM Posts: 5,045
    edited 2011-09-29 10:53
    A AVR programmer http://www.newark.com/atmel/atavrisp2/avrisp-mkii-programmer/dp/80K1131 and a link avr tiny would be a nice place to start...
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-09-29 18:45
    I ended up going with the Microchip PIC starter kit. They don't carry AVR's, otherwise I would have gone with one of those.
  • kiiidkiiid Posts: 16
    edited 2011-09-30 02:36
    PICAXE may be good, but I've never used it. The resource behind them, the PIC in its 6 pin form seems to be unbeatable, but no one is provding a free high level language for the 6 pin devices.

    Thats not exactly true. I havent read all the posts, sorry if i am doubling info here. Small pics are perfect for many projects. There is even a basic compiler for them made by oshonsoft.com.i have done many projets with 6pin pics and they always work well.
  • LeonLeon Posts: 7,620
    edited 2011-09-30 03:00
    I don't think that the PICaxe uses the PIC10.

    Hi-Tech C supports it:

    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en542849

    A free version is available.
  • kiiidkiiid Posts: 16
    edited 2011-09-30 03:41
    PICAXE is 100% not PIC10. Personally I've never used PICAXE. But PIC10 is still a very useful piece for many applications.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-09-30 04:57
    The more recent PICAXEs use these PICs (as best I can determine)

    08M2 PIC12LF1840
    14M2 PIC16LF1825
    18M2 PIC16LF1826/27
    20M2 PIC16LF1829
    20X2 PIC18F14K22
    28X2 PIC18F25K22
    40X2 PIC18F45K22
  • bill190bill190 Posts: 769
    edited 2011-09-30 08:08
    I ended up going with the Microchip PIC starter kit. They don't carry AVR's, otherwise I would have gone with one of those.

    Here are some helpful links for you...

    Microchip forum...
    http://www.microchip.com/forums/default.aspx

    Then use google.com advanced search to search that specific website. Enter...
    www.microchip.com
    or
    www.microchip.com/forums

    (Try both and note the different info you get.)

    Then you can search google.com for the word Pic and something from a program like...

    Pic "LIST P=16F628"
    ...will find assembly programs for the 16F628 microcontroller

    or...

    Pic "#include <p18F4550.h>"

    ...will find C programs for the 18F4550 microcontroller. (Be aware there are *different* C compilers, so be sure the C source you are viewing is for the compiler you are using.)

    Main Microchip website...
    (Good place to find documentation. Search for specific microcontroller to find docs...)
    http://www.microchip.com

    Microchip chip sales...
    http://www.microchipdirect.com

    And at the above you can compare the features of different microcontrollers like here...
    http://www.microchipdirect.com/Chart.aspx?branchId=1002&mid=10&treeid=1

    Then...
    Microchip uses the term "File Registers"! That means "ram memory"!
    And "Program Memory" is a separate non-volatile memory!

    Pics use what is called "Harvard Architecture" for memory...
    http://en.wikipedia.org/wiki/Harvard_architecture

    Then note that "res" when used in assembly reserves memory space, but "equ" or "cblock" does not. Many people do not understand this! Thus you will find a lot of incorrect "equ" and "cbock" use on the internet. Learn the difference here...

    See: "Chapter 4. Directives"...
    MPASM Manual...
    http://ww1.microchip.com/downloads/en/devicedoc/33014j.pdf

    And discussion here...
    http://www.microchip.com/forums/tm.aspx?high=&m=375731&mpage=1#375731
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-09-30 10:18
    @bill190: Thanks for all the useful links!!! That will help me out a lot when I start working with this!
    They say they will ship it next week, I guess they don't rush free orders. :)
  • bill190bill190 Posts: 769
    edited 2011-09-30 11:54
    You are quite welcome!

    Do you know *which* Pic Starter Kit you got? Link?

    And if that comes with a way to program the chip?

    That is yet another "hurdle" to get through. Many different ways to program Pic chips. The assembler or C compiler creates a "hex file", then that is loaded into the chip via several different ways...

    -WinPic software [free] and a serial connection via an "ICSP" connection (Done outside of MPLAB).
    -PicKit 2 programmer.
    -PicKit 3 programmer.
    -Pic Starter Kit USB connection.
    -Others which are terribly expensive!
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-09-30 15:17
    http://www.newark.com/microchip/dv164101/microcontroller-development-tool/dp/29H5738?Ntt=DV164101+Microcontroller+Development+tool

    Interesting, I'm not used to a setup like that. Much like when I went from BS2 to Propeller, and I wasn't used to a volatile program, I imagine this will be about the same. The set I am getting seems to include all needed software on disks, but I guess I shouldn't assume. There is an included USB cable, so that is probably the method of programming.
  • bill190bill190 Posts: 769
    edited 2011-09-30 18:54
    Ok, that looks like it uses the USB cable and includes a programmer on the board. So ignore what I said about programmers above.

    FYI - Here is the Microchip page for the above. I just went to Microchip.com, then searched for that Microchip part number, then found this page. At the bottom is all the documentation, so you can start reading now. Note that the documentation window has a separate up/down slider, so some of the documentation is hidden...

    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010053&part=DV164101

    You can also download the MPLAB IDE here...
    http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en019469

    I would recommend you get the older MPLAB IDE v8.76 and not the new "X" version. Your instructions will probably all refer to the older version, plus internet help pages and videos will show how to use the older version.

    BTW, if you are in school, I hope you make school the priority for your time. All this documentation can take months to read.

    Also Microchip documentation sometimes leaves me scratching my head???? Other people have the same problems (google is your friend). Like Pic PWM. Few understand that! Here someone created a PWM calculator which says at the top...

    "This calculator will save you from insomnia and headaches!"
    http://www.micro-examples.com/public/microex-navig/doc/097-pwm-calculator.html

    Have fun!
Sign In or Register to comment.