Microcontroller Suggestions
Microcontrolled
Posts: 2,461
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.
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.
Comments
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).
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
@mindrobots: I got your PM. That looks like a good option, I think I may go for it, thanks!!
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...
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
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.
'
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
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.
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.
-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!
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
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.
Hi-Tech C supports it:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en542849
A free version is available.
08M2 PIC12LF1840
14M2 PIC16LF1825
18M2 PIC16LF1826/27
20M2 PIC16LF1829
20X2 PIC18F14K22
28X2 PIC18F25K22
40X2 PIC18F45K22
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
They say they will ship it next week, I guess they don't rush free orders.
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!
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.
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!