Looking for a real small PIC

Thread Starter

R!f@@

Joined Apr 2, 2009
10,014
Hey Guys.
I like to know if there is a PIC that I am looking for.

Requirements are:
1. SMD package.
2. One ADC input or an I2C input
3. 1 output (A PWM out is preferable ).

Need to be 8 pin or less (less is better). Don't care about the package type. It needs to be a SMD.

Project details :
Need to light up a LED and fade it out within a second, Led is triggered by the ADC pin voltage or I2C address. That's it.
Circuit needs to be as small as possible
 
Last edited:

tshuck

Joined Oct 18, 2012
3,534
I'm fond of the 10F320, which fits the bill...

Microchip's parametric search tool would reveal many more options for your specs.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
10,014
Damn.. So many to look for.
What the heck was I looking around for ( Did not find anything )
Should have asked here first.

Thanks a bunch fellows. I will check around while in workshop.
 
Last edited:

JohnInTX

Joined Jun 26, 2012
4,787
The PIC10F322 has 3 ADC inputs and 2 PWM outputs for $0.64 qty 1 in a SOT-23 package.

Bob
+1 Its a little jewel. It's also closer to midrange than baseline like other 10F PICs with a bigger stack, interrupts, LAT outputs (no more r-m-w headaches-better than midrange!), TMR0 has its own prescaler (not shared with WDT), TMR2 for a period/PWM timebase and it can write/read its flash to emulate EEPROM.

If you decide to use it, be sure to pick up the AC244045 header board. This chip does not have built in debugging so you need the header (which has a special version of the 10f322) to do debugging with a PICkit. Get some in the DIP package for prototyping.

I've been playing with a few and .. $0.64 Amazing.

Have fun!
 

THE_RB

Joined Feb 11, 2008
5,438
I believe he is using the MikroC PRO C compiler which does not (AFAIK) support 10F series PICs.

To Rif@@; If you use a 10F series PIC you may need to program it in ASM.

Your requirements of lighting a LED and "fading it out" over a second are trivial. You don't need a proper PWM module for that.

I would pick up one of the really common hobby 8pin PICs with ADC like the 12F675.
 

JohnInTX

Joined Jun 26, 2012
4,787
I believe he is using the MikroC PRO C compiler which does not (AFAIK) support 10F series PICs.
It sure doesn't. Plus, it doesn't support uCHIP debuggers (programmers, yes) They have MicroICE for debugging.

To Rif@@; If you use a 10F series PIC you may need to program it in ASM.
I would too, but I've also played with XC8 in the PRO mode on the smallest 10Fs. You can do quite a lot (at least more than I expected) in C on even the smallest ones. It makes pretty good code.
 

ErnieM

Joined Apr 24, 2011
8,415
I wouldn't buy any PIC device not marked "No assembly required." :cool:

My tiny PIC of choice is the PIC12F615, 8 pins, DIP, SOIC, even a lead less chip carrier package. The 1K ROM let me fit code in C for an A2D controlled timer using the sample version of the Source Boost C compiler (one of the few available at the time).

The best feature of this little device comes with the PIC12HV615 version: it has a built in 5V shunt regulator across the power pins. Just need a resistor and a cap to regulate the supply on it.

That chip is a workhorse for me, I used it in at least 3 different projects, and the last one used two in each unit.
 

Thread Starter

R!f@@

Joined Apr 2, 2009
10,014
Man, that 10F320/322 in a SOT-23 package is Gooood!
It might be just what the doctor wants.
Smaller that 5mm LED.

It might just do.

Thanks Guys.
 

THE_RB

Joined Feb 11, 2008
5,438
It won't have an MSSP (I2C) module.

You can do I2C manually in code, but I would do it in C for ease and in that case a PIC with 2k word of ROM would be a good choice. A 1k PIC might leave you stranded if needing manual I2C, manual PWM and C code. (And yes I know the asm oldtimers could fit it in 1k easy, along with a USB stack ;))
 

Thread Starter

R!f@@

Joined Apr 2, 2009
10,014
Hey, that is great.
I2C in code. Never knew that it could be done.
Is it difficult.

Do you think the 10F322 can do what I want.

I just need to look for I2C address and trigger the LED ON and then just fade it out smoothly with in a sec or two then again wait for I2C command to trigger again.

Is this possible ?
 

Thread Starter

R!f@@

Joined Apr 2, 2009
10,014
I have 12F683

The reason I am looking for the smallest one is a secret for now.

The project is a secret. I have strict space limitations. You might laugh at what I am gonna do.

How much space is required for coding I2C in software and give a fade out delay of 1 to 2 seconds?

When the time comes it will be posted here.
 

ErnieM

Joined Apr 24, 2011
8,415
Hey, that is great.
I2C in code. Never knew that it could be done.
Is it difficult.

Do you think the 10F322 can do what I want.

I just need to look for I2C address and trigger the LED ON and then just fade it out smoothly with in a sec or two then again wait for I2C command to trigger again.

Is this possible ?
You want to make a slave I2C in code? Making a slave in hardware separates the men from the boys. Doing that in code... need 2 inputs, preferably both programmable edge triggered interrupts... not impossible, but why?

All you need is a trigger. That is one wire. I2C takes 2 wires.

If you are making an array of LED modules why not use ole reliable serial data?
 
Top