PDA

View Full Version : 12F508 config -- going nuts



Michael
- 1st April 2020, 15:23
Thought I'd buy this chip because digikey had so many in stock and search results seemed to make it popular in the 8 pin low cost pics (unless someone has a better idea). Started off using 12f675 which was a bad idea, took forever to figure out configuring the int clock and that chip is wacko imho.

Please, can anyone tell me how to set the 12F508 for internal osc 4mhz (or do I even need to? does it default to internal)? I've tried everything.

get an error on _intrc _fosc_intosc tried a half dozen.

or do set it up like the 12f675 with that weird define?

Looking for a reliable 8 pin PIC that is a dollar or under that is the best choice -- just need to use 3 I/O for something. ___THANKS

mpgmike
- 1st April 2020, 16:20
Oscillator setting is controlled through the CONFIG Register. The only Internal Oscillator option available is 4 MHz.

The PIC12F508 has no analog capabilities, only 1 Timer (Timer0), less-than-minimal memory, was introduced in 2009... It may be an acceptable choice if you only need to toggle an LED. To actually do any real work, it's about useless.

I don't know if you have at least PBP3.0, but there are an abundance of newer designs that may cost less, and will certainly do much more. For the 8-pin application, a good universal choice is the PIC16F18313. Don't let the "PIC16F" fool you, it is an 8-pin MCU. Grab a data sheet and have a look. I think you'll like what it can do, and it's cheap.

Michael
- 1st April 2020, 20:12
I'm just using it to do some simple I/O stuff so 12F508 will be fine. Would appreciate a time saver if anyone can tell me for the osc, I tried em all --

#config
__config _? tried _fosc_intosc intrc &other crap that gives me compile errors

#endconfig

Michael
- 1st April 2020, 20:58
Needed IntRC

not INTRC

Ridiculous.

I spend half my time configuring new chips. Writing code is the easy part.

Ioannis
- 4th April 2020, 11:06
Well, sorry you had hard time configuring the chips.

I think 12F675 is a fine little chip. If you still want to use it let me know.

Ioannis