ATTiny85 Clocking

Hello guys,

I have an ATTiny85 which says 20MHz max with External Crystal.

What will happen if I overclock it i.e. connect a crystal of freq. greater than 20MHz..??

SagarDev: What will happen if I overclock it i.e. connect a crystal of freq. greater than 20MHz..??

It will continue to work at frequencies slightly higher than 20MHz and then become unreliable/stop as you push the frequencies higher still. At what point this will happen is unknown. There are other 8/16 bit MCU's that can clock at a higher rate without the need to overclock them. Why do you need to overclock your tiny85?

It is not a need. Just a doubt.

Riva: There are other 8/16 bit MCU's that can clock at a higher rate without the need to overclock them.

Which MCUs are they?

SagarDev: Which MCUs are they?

PIC do 8bit and 8 pin chips that can manage >20MHz and if your willing to up the pin count then the range increases dramatically.

ARM

I've heard up to 24 or 25mhz it works, and with an external clock, you can usually push it further. On chips that have full swing crystal option, that's better than the normal low power crystal option. Boards normally work no problem at 22.whatever UART clock, if they're spec'ed for 20. I've gotten the 841 (spec'ed for 16 max) working at 20@5v room temp no probs, and the 1634 (spec'ed for 12 max) working at 16@5v. When overclocking, the operating temperature and voltage range may be more limited - you don't know.

Arduino IDE doesn't support PIC. I hear the peripherals are less intuitive to work with than AVRs. Some of the other Arduino boards (Due, Zero, 101, etc) are clocked higher, too - basically, anything that's not an AVR is clocked higher.

For best results with overclocking use good cooling (cooler runs a little faster) and up the supply voltage to the maximum (5.5V I think) - higher voltage is faster (but more power hungry). The datasheet 20MHz is good for the full temperature range mentioned in the datasheet at 5.0V, so there is some headroom (microcontrollers don't generate a huge amount of self-heating unlike full-blown CPUs.)

DrAzzy: Arduino IDE doesn't support PIC. I hear the peripherals are less intuitive to work with than AVRs.

If you use the Arduino IDE for code writing then the PIC equivalent MPIDE is very similar.

Riva: If you use the Arduino IDE for code writing then the PIC equivalent MPIDE is very similar.

Except you have to have a PC to run it on. The great thing about the Arduino IDE is that it runs in all three major platforms.

Grumpy_Mike: Except you have to have a PC to run it on. The great thing about the Arduino IDE is that it runs in all three major platforms.

I have not tried it (not having a Mac) but they do Linux/Apple versions of MPIDE

Or MJ's version UECIDE also supports Linux/Apple/Windows.

If you like neither of them then maybe the chipKIT core to plug into your Arduino IDE

EDIT: And another Apple option might be xcode

What language is used to program the PIC ?

I also noticed that the pin naming is different from the ATMEL IC pins.

SagarDev: What language is used to program the PIC ?

Take your pic :) You can program in C++ with the IDE's mentioned above but with other IDE's you can program in ASM, BASIC and probable other languages as well.

How are the names different?

Okay, on observing the PIC, I didn't find any difference in the pin naming.

So, can I use the "Serial" Commands in the ATTiny 85 / ATTiny 84 ?

SagarDev: Okay, on observing the PIC, I didn't find any difference in the pin naming.

So, can I use the "Serial" Commands in the ATTiny 85 / ATTiny 84 ?

No there is no UART in those chips. You could try software serial though.

I wanted to convert Data to 8-bit Binary in the code. Is it possible on the ATTiny ?

SagarDev: Okay, on observing the PIC, I didn't find any difference in the pin naming.

So, can I use the "Serial" Commands in the ATTiny 85 / ATTiny 84 ?

SoftwareSerial works. Some cores (including mine) come with a built-in software serial named Serial (in the case of my core this one is on the analog comparator pins, to use that interrupt instead of a more useful one), but not all of them do.

In any event, you will likely have to tune the internal oscillator, or use an external crystal - the factory calibration of the oscillator isn't accurate enough for serial (and the speed of the internal oscillator depends on the operating voltage, too).

SagarDev: I wanted to convert Data to 8-bit Binary in the code. Is it possible on the ATTiny ?

What does that even mean?

What does that even mean?

Maybe we should start with :

“WHAT do you mean by DATA ?”

Is it even possible for you to be more vague than that ?

I wanted to convert Data to 8-bit Binary in the code. Is it possible on the ATTiny ?

There is nothing to convert data is in 8 bit binary form, as is every other number in every other computer.