TinyCircuits

ATmega Pin 13 and Pin SCK

ATmega Pin 13 and Pin SCK
« on: December 09, 2014, 12:56:30 PM »
Hi,

I'm looking at the schematic for the ATmega 328 shield and see that the LED is connected to SCK (Pin 17 - PB5). However the "blink" program uses Pin 13 (PB1 - IO9). I do not see that Pin 17 and Pin 13 are connected anywhere on the schematic. Please could you clarify.

Thanks!

Re: ATmega Pin 13 and Pin SCK
« Reply #1 on: December 14, 2014, 03:48:11 PM »
In the Arduino world, the term "pin" is a bit confusing, and doesn't necessary match up with the true physical pin or port on the actual microcontroller.  The TinyDuino uses the same Arduino "pin" mapping as the standard Arduino Uno, so the SPI signals also have pin numbers assigned to them.  SS is pin 10, MOSI is pin 11, MISO is pin 12, and SCK is pin 13. 

Since the LED is connected to SCK, you can toggle this on and off by writing to Arduino pin 13.

Hope that clears it up!

Ken
TinyCircuits