Low cost general microcontroller
Timothy D. Swieter
Posts: 1,613
I'm going through the process of designing a low cost product. The device will have a microcontroller. I have been researching and researching microcontrollers for use in the project and throughout the process I keep wishing, "Boy I wish there was something like the SX, but has a bootloader for code updates." I also wish there was just a plain vanilla mcu like an SX or a Prop where I didn't have to worry about which pin does what - I could just write a virtual peripheral or an object and attach the pins as they fit in the board layout.
For now I am probably going to go with the an ATmega or TINY since I have the tools to work with those devices.
But boy do I wish there was an SXII or a Prop-mini.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com
For now I am probably going to go with the an ATmega or TINY since I have the tools to work with those devices.
But boy do I wish there was an SXII or a Prop-mini.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com
Comments
What kind of quantities? I've come to the conclusion, that for low quantities, even thought it's grossly overkill, it may still make sense to go with a Prop, as you are (or at least I would be) dealing in my "comfort zone", and the other costs (longer development, learning curve, etc.) would balance out.
If quantities are above "low", and/or you're already comfortable with the other chips, that's a different story.
Also, what's the projected lifetime of the product? There are a LOT of SX chips still available...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log
I have a similar problem at work, but it's about size. We need a small microcontroller. Something that will fit between the pins of a 14-pin DIP package. The SX20 worked perfectly. But now I have to look outside of my beloved Parallax for something.
I wish there was a propeller chip that only had maybe 2 cogs and 8 or 16 I/O pins for about $2. That would be great for me.
For a current project I went with the PIC16F688 only because I had used PICs before, but now I wish I had chosen an Atmel part.
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Use BASIC on the Propeller with the speed of assembly language.
PropBASIC thread http://forums.parallax.com/showthread.php?p=867134
March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
There are two rules in life:
· 1) Never divulge all information
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
Post Edited (Bean) : 5/20/2010 12:32:12 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
I use mostly tiny45 (8pin) and tiny44A (14pin) when I
can't justify $8 for a prop. I'm so used to having more
than one processor now that I sometimes end up using
more than one tiny in a project.
I once added a tiny to a prop project and since there was
no board room left I just epoxied it on top of the prop dead bug style and
wired it up to the pwr pins and dropped down 3 I/O wires to other parts
of the board. A guy said "what the hell is that!?"
I said "That's the 9nth processor"
You can do a lot with a tiny and many projects don't even
need an xtal so cost is really low. You can adjust the internal
oscillator in many atmel parts. If you want to run at 20mhz (almost 20mips)
a .23 xtal does the trick (4, 10 and 20mhx xtals always seem to be cheapest)
or use a .19 resonator.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MCU Projects·- my new site where I will be posting all projects, code, etc.
Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!
SD Card Adapter·- Add extra memory to your next Propeller project with ease!
I downloaded the User Guide for that chip.
This looks very nice, I like the high speed internal digital clock!
.50 each is great! I may have to get some samples. These might
be better than a tiny for a lot of things.
If I buy a programmer maybe they will send me a few samples
Mouser has the 14pin dip for .69 in 100 lot.
This might be a better chip for me than the 14pin tiny44A.
One of these might be perfect for mounting on the back
of parallel lcd displays and making them easier to use. It
should handle 4bit mode easily with its 10 I/O pins. This would
allow you to make a serial 2 line backlit lcd for about 3.25 total including
shipping for the cpu and the lcd....nice.
Thanks for mentioning this...the more I read the user guide the
better this sounds. The asm looks straightforward and simple.
And lots of bang for the buck....
Somehow I can't seem to find the $26 programmer on the TI site.
Could you possibly point me to it.
I just need something capable of programming the 14pin dip part.
I found 2 cute USB kits but they don't look like programmers for
an external part....could one of these be what you meant?
They are 10 and 20 dollars.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
This particular project I am working on is a product that I want to sell in the US$30 range and therefore I am trying to keep the BOM as low as possible and can't justify the Prop + supporting parts which could cost around US$11.00.
I've considered the MSP430 before. I've used them twice in proof-of-concept stuff using the little target boards. I haven't actually done a product or a PCB with them yet. One of the other desirable features of what I am working on is that the product must be able to be use firmware upgradable (with a easy to use, external tool such as Prop Plug or FTDI breakout board or cable). I think this might rule MSP430s out because I haven't seen a lot on bootloaders, but then again I don't play in that arena as much and may be missing it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com
Someone in the sandbox came up with a half price discount code which resulted in it being something like $25 discount has ended.
There were three different versions for the wireless frequency.
Post Edited (Tubular) : 5/21/2010 12:00:52 AM GMT
http://forums.parallax.com/showthread.php?p=860751
Post Edited (Tubular) : 5/20/2010 11:59:36 PM GMT
just curious.
If the firmware code is rather small you might use
something unusual to update the flash memory.
The ftdi or something like a prop plug would add
dollars to the unit cost. If your code could fit into
a .69 1k flash TI430 device you could save some money
by writing your own tiny bootloader that used something
like an audio signal from a sound card or perhaps use
an LED to pick up data from something you can flash
with simple PC software....maybe a kbrd LED or a
section of the screen even??? You might be able to
update a short section of code with a downloadable
video or audio file? The TI430 seems to be able to
write its flash at runtime.
You can get an easy to use sound decoder chip on ebay
for less than .40 including shipping if I remember correctly.
With that chip and whatever cheap mic you could find it
would be easy to bootload using an audio file. Anyone
would be able to simply sit the device near the pc speaker
and update the flash. might be annoying to listen to though
@Tubular
That TI watch is pretty cool!
I'm not much for big geek watches but that is amazing for $25
They just have to be losing money on that.
It's also interesting to contemplate a 4-cog Prop, double-speed on Spin, which would be adequate for a lot of stuff I've used regular Props for. That gives you 1 spin + 3 pasm which lets you do video, PS2 keyboard, serial, and Spin all at once. Give it 16 real I/O too to reduce the package size.
Of course I realize Parallax has stuff to do (including the biggerfaster stuff we've been clamoring for) but I think these would be seriously viable products for a lot of real world applications, and possibly a lot easier to work up than the biggerfaster stuff, being as it's usually easier to whack stuff off than to add new stuff to a design...
I'd vote for four cogs. Two cogs would work for some of my applications. If single quantity cost was US$3.00, I 'd buy it. (don't forget you would still have to add the EEPROM).
@Holly
I like your creativity. In general, the device I am creating is a controller board for a new line of products at Brilldea. I'm throwing around ideas at the moment. I need to put some thoughts together, and then go do some other work (like Parallax Web Server software) and then come back to this idea. I'd like the product low cost and easy to update. I considered one of the Atmel USB microcontrollers, which be very easy to update. See the Teensy as an example of a project using the USB micros. The product will basically receive serial and then output formated data to an LED driver. The product will be expandable for having routines to playback and such. The goal is really to have an inexpensive controller, yet build in the ability to be flexible and customized.
With whichever micro I chose, I will need to do software development and tackle a learning curve. Thus, this project isn't fast track because I need to get the Parallax Web Server work going again and the W5100 drivers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com
I had forgotten that you can do USB in software on
many AVR devices, that's the way to go then
The code to do USB is a freebie.
V-USB, the gnu public license.
www.obdev.at/products/vusb/hidkeys.html
http://www.sparkfun.com/commerce/product_info.php?products_id=9432
You will also need the usb cable to program it. This is like $26.00 and besides a couple of resistors and a stereo headphone jack, it is the only hardware you need.
http://www.sparkfun.com/commerce/product_info.php?products_id=8312
AND the best part....You can program it in basic, so that means no learning curve. All you gotta do is download the free editor program and you can start programing in less than a minute...
·
http://www.mouser.com/ProductDetail/Texas-Instruments/EZ430-F2013/?qs=3wuez3jz59JrMkK3bemqmA%3d%3d
I want to order that $20 USB dongle and perhaps the 3 extra target boards
for 10.00
I'm still not certain though if I can pull the little target board off the dongle
and connect the 4 wires to a 1k part on an external board I build myself
and program the chip?
It's actually a 2 wire jtag interface called spy-by-wire. +, gnd and 2
data lines. A TI ad I found said the ez430 dongle was supposed
to debug all members of the MSP430F20xx family, but that is the sole
statement I could find about that compatibility anywhere.
It's the really cheap 1k part (MSP430F2001) that I am most interested in you see.
1k is not a lot of flash but if I use asm instead of C then that's plenty of space for
the kind of things I have in mind. The asm has just 27 simple core instructions so
it should be only a few days work to pick it up if you know asm for other parts.
One other thing I'm unsure of is the digital internal clock. I'm wondering if it can
be precisely tuned with one of those common low freq watch xtals and then remember
the proper correction value once the xtal is no longer attached. I found hints of that
but nothing concrete. I also hope that the internal timer can run the chip at 16mhz, the
max frequency (16mips) I really hate external xtals for low-cost projects.
At .69ea in 100 lots the MSP430F2001 would be great for tiny projects and also to add
onto boards as an extra processor, or 2 or 3... I'd love to try one out on a 2.50 Hong Kong
2line LCD it could result in easy to drive, ultra cheap, back-lit LCD displays for the prop
and other uControllers.
The MSP430 Yahoo group is worth joining:
tech.groups.yahoo.com/group/msp430/
and TI has their own forum.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
I am reading through the datasheet and it says there are
two 16mhz dco clock adjustment bytes that you can change to
better calibrate the clock...as long as you are using at least 3.0v
you can get 16mhz...lower with less V.
I suppose I can create a small test program to toggle a pin
and read its frequency with a 16mhx xtal attached using a
frequency counter at work. Then I could adjust the dco
values to best match that...I need a cheap freq counter
at home anyway so maybe this is a reason to get one.
That yahoo group might be nice. This is the only Ucontroller
board I have ever used, if I start using another I won't have
much time left for anything else online
Post Edited (HollyMinkowski) : 5/21/2010 9:33:08 AM GMT
Here is what it looks like:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
Post Edited (Leon) : 5/21/2010 10:04:16 AM GMT
What is the value of that resistor just under the programming connector?
It seems that a proto board for this controller is really a simple affair
www.leonheller.com/images/F2001_3.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM
According to TI's website, the target board can be detached.· I also remember seeing it for sale seperately.
According to this link:
http://focus.ti.com/mcu/docs/mcuprodmsptoolsw.tsp?sectionId=95&tabId=1203&familyId=342&toolTypeId=1#EXPboards
"eZ430-F2013 Complete development system with detachable target board and USB emulator. Ideal for new users.· $20"
You can also get a board:
http://focus.ti.com/docs/toolsw/folders/print/ez430-t2012.html
"The eZ430-T2012 includes three MSP430F2012-based target boards for the eZ430-F2013 Development Tool. The eZ430 Development Tool provides a real-time debugging and programming interface for the MSP430F2012 on the target board, and comes with the easy-to-use IAR Embedded Workbench Integrated Development Environment (IDE). The T2012 can be used to develop your personal project or to evaluate the MSP430 MCU. The T2012 gives you all the same capabilities and peripherals of the MSP430F2013 on the eZ430, but includes a high-speed, 8-channel 10-bit ADC."
So take some time, read all of the links and I found them after being patient.
New MSP430 users that would like to get started with an easy to use, low cost tool should start here. www.ti.com/ez430
Maybe someday you or someone else·can help me get started with it.
Thanks for the schematic!
@Chuckz
Thanks for looking around that site and getting useful links.
I think I will order that USB dongle and the 3 extra boards.
And ask for some sample 1k chips at the same time.
If I have it sent to where I work maybe they will send samples.
If I figure it all out perhaps I could make a newbie page about it
on google's free web pages.
and also what the boards look like that attach to it. I was
thinking I could take one board and clamp it in the vice thing
I use to hold circuit boards to work on them and hit it with
some hot air on the back and pull the little 4pin connector
off. Then I could spread the rear pins of it out a little and solder
on a short piece of ribbon cable with a connector on the end
to mate to a socket on my own boards for programming them.
It should work, at least in theory.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Leon Heller
Amateur radio callsign: G1HSM