Need help with microprocessor control, selection

rayearth

Newly Enlightened
Joined
Feb 11, 2002
Messages
88
Location
DFW area, TX
I'm working on a rather ambitious luxeon lighting project. I seem to be keep adding more and more features the more I think about it. It may be time that I look into microprocessor control. It seems that many people here have been using the attiny series of microprocessors, especially in the nflex and Lionheart.
I would like to know whether 1) any better (cheaper or easier to use) options exist and 2) tutorials for programming such a chip. Google is not so helpful here.
I took C in college but it has been a number of years ... pointers *shudder*
 

billw

Enlightened
Joined
Nov 2, 2002
Messages
295
Location
SF Bay Area
Re: Need help with microprocessor control, selecti

The AVR tiny series is a pretty good compromise in price, performance, and availability. The ATtiny11 can be obtained for $0.25 to $0.50 each, which is phenomenal (but it's a relatively icky chip.) Some ATtiny's are programmable in a free C compiler (gcc) (however, gcc only works on AVRs that have separate ram, which does NOT include many of the ATtiny parts.)

The main competitor is the the PIC 12F series (also 8 pins) and new 10F series (6 pin SOT23-style package!) Prices and capabilities are "similar"; the rivalry is at times intense.

Other small micros include the Fairchild ACE and some cygnal (now
silabs) 8051 variants.

Good AVR site: http://www.avrfreaks.net
Good PIC site (with some AVR!) http://www.piclist.com

BillW
 

koala

Flashlight Enthusiast
Joined
Mar 5, 2003
Messages
2,295
Location
Melbourne, Australia
Re: Need help with microprocessor control, selecti

I go with Atmel AtTiny series, small and low-voltage. Always progam them in asm. I know C but asm is fun /ubbthreads/images/graemlins/grin.gif. avrfreak.net is a good place to hangout.
 

NaCl

Newly Enlightened
Joined
Oct 18, 2004
Messages
22
Location
Nonthaburi, Thailand
Re: Need help with microprocessor control, selecti

Wow.. my next project too

I planned to use PIC10F put it in Mag2D to control current and some funny feature.
 

NewBie

*Retired*
Joined
Feb 18, 2004
Messages
4,944
Location
Oregon- United States of America
Re: Need help with microprocessor control, selecti

Look at Atmel's app. notes for battery chargers and power supplies. I posted links in the microprocessor thread to that and much more.
 

bikeNomad

Newly Enlightened
Joined
Sep 8, 2001
Messages
166
Location
Stanwood WA
Re: Need help with microprocessor control, selecti

[ QUOTE ]
billw said:
The AVR tiny series is a pretty good compromise in price, performance, and availability. The ATtiny11 can be obtained for $0.25 to $0.50 each, which is phenomenal (but it's a relatively icky chip.)

[/ QUOTE ]
I agree about the ickiness of the ATTiny11. But consider instead the ATTiny15L, which is pretty good for power supplies and LED lighting, for two big reasons:
<ul type="square">
[*]The 10-bit A/D converter, including a 20x differential input that's great for current sensing. The PIC 10F chips don't have A/D (yet); the PIC 12F675 does. But the PICs don't have the 20x differential amplifier.
[*]The high-speed PWM, which lets you have a 8-bit, 100KHz output that means smaller inductors. The best the PICs can do (especially the small ones) is 32KHz PWM.[/list]
[ QUOTE ]
Some ATtiny's are programmable in a free C compiler (gcc) (however, gcc only works on AVRs that have separate ram, which does NOT include many of the ATtiny parts.)

[/ QUOTE ]

Actually, most (4/7 parts) of the ATTiny chips now have RAM. Especially the other great contender for power supplies, the ATTiny26L. This chip has two high-speed PWM (250KHz max) channels with complementary outputs, and 11 A/D channels, in a 20-pin SOIC or DIP package, or a 5mm square MLF-32 package. You can have your choice of multiple single-ended, 1x, or 20x differential channels on the 10-bit A/D.

The ATTiny13V has RAM, 4 A/D channels, and 2 PWM channels (max 39 KHz from 2.7 to 5.5V) in an 8-pin package. And it works from 1.8V to 5.5V.

As for the ATTiny15L, which doesn't have a separate RAM stack but does have 32 general-purpose registers: you can program the ATTiny15L with GCC if you're careful. Just don't tell the compiler it's RAMless (just use the default processor family), don't use the avr-libc headers (I've made my own headers for the Tiny15L that generate efficient code from readable C), and check the assembly output afterwards. Always use the optimizer. I've been using GCC for the Tiny15L and am quite happy with its code generation. Of course, with only 512 words of program memory, you could use assembly language just as well, but if you change chip families a lot (I go back and forth between the AVR and PIC 18F chips), C is great for most projects.

[ QUOTE ]
The main competitor is the the PIC 12F series (also 8 pins) and new 10F series (6 pin SOT23-style package!) Prices and capabilities are "similar"; the rivalry is at times intense.

Other small micros include the Fairchild ACE and some cygnal (now
silabs) 8051 variants.

[/ QUOTE ]

And of course the other big contender in the 8-bit 8-pin micro space is Freescale (the chip company formerly known as Motorola Semiconductor). Their 68HC908 series is super easy to program (they have a built-in monitor program), and they also have a free C compiler that's fine for the smaller chips (up to 4K of code). Nice timer units, but only 8-bit A/D converters. No really high speed PWM.

Bruce Lightner's description of how to use AVR-GCC on the Tiny15L
My page on the same thing
 

bikeNomad

Newly Enlightened
Joined
Sep 8, 2001
Messages
166
Location
Stanwood WA
Re: Need help with microprocessor control, selecti

[ QUOTE ]
NewBie said:
Look at Atmel's app. notes for battery chargers and power supplies. I posted links in the microprocessor thread to that and much more.

[/ QUOTE ]
Note that if you actually try to build the circuits that they describe, you'll have to fix their bugs first. There are several errors in the code and schematics. Do some research first before pulling your hair out.
 

koala

Flashlight Enthusiast
Joined
Mar 5, 2003
Messages
2,295
Location
Melbourne, Australia
Re: Need help with microprocessor control, selecti

/ubbthreads/images/graemlins/grin.gif I suggest that you look in to picaxe cheap, easy and fun for a starter.
 
Top