Hardware Reference
In-Depth Information
GND
SCK
RESET
Using the Arduino as an ISP Programmer
An in-system programmer (ISP) is a device that can program other chips. There are several system programmers
available. I recommend the Adafruit USBTinyISP, which you can download at https://www.adafruit.com/products/46 .
In this case, as shown in Figure 9-8 , you want to use the Arduino as an ISP programmer, which allows you to wire it
directly, and to create a custom PCB, or to make a shield for quick programming.
Figure 9-8. The Arduino Uno as an ISP programmer
The ATtiny in the example is the ATtiny85. Other ATtiny chips can be programmed the same way as long as the
correct ISP pins are mapped. The example in Figure 9-6 also shows a corresponding circuit board that you can create.
Since an Arduino resets when connected via a serial port, you will need to disable the reset pin in order to avoid a
reset when programming. This can be done in a couple of way—you can either use a 10mF capacitor from the reset pin
to the ground or a 124W resistor to pull reset high to the 5V pin.
Analog pins are numbered from 1,2 and 3. They correspond to the pins 7, 3, and 2 on the chip, but are referenced
in this way: ADC1 is 1, ADC 2 is 2, and ADC 3 is 3. Since they are already properly initialized, do not set the pin mode
for analog pins. All the digital pins can be referenced via their pin number on the data sheet.
it is possible to program an attiny that is configured for 1 mhz, as 8 mhz will cause the delay functions to be
extra slow.
Note
It is also important to note that internal analog reference is usually 1.1, but it is possible to set it to other values too;
however, you must not apply an external voltage to the AREF pin, or else you will short out the op amp in the ADC.
 
 
Search WWH ::




Custom Search