PROGRAMMING JTAG Programming ATtiny 45 DESIGN Eagle Design and Milling SIMULATION PROTEUS RESOURCES DOWLOAD FILES
In my Project, I need a humidity sensor for to sense the water amount for every plant. I will use "Step Response" in Input Device from 2016 Class. here There are many ways to program AVR microcontrollers. JTAG Supported By: See AVRStudio Tools help for MKI and MKII device support Supported Programmers: JTAG-ICE, JTAG-ICE MKII, Dragon, JTAG-ICE clones, AVRONE, STK600 (programming only) JTAG is an in-system debugging tool which allows you to manipulate and examine the status of a supported AVR while it is running in a circuit. JTAG allows the user to stop execution at any time, the manipulation of the AVR's internal registers and much more. A bootloader is a small AVR program which sits in a user-settable reserved section of the regular flash. Bootloaders make use of the flash self-modification features available in the newer AVRs to allow the AVR to program itself via program data loaded from an external source. Bootloaders may source their data from any location (eg external dataflash or SD card) however by far the most common type of Bootloader communicates with a PC via the AVR's RS-232 (serial) port. Serial Peripheral Interface (SPI) Serial Peripheral Interface (SPI) is a synchronous serial data protocol used by microcontrollers for communicating with one or more peripheral devices quickly over short distances. It can also be used for communication between two microcontrollers. With an SPI connection there is always one master device (usually a microcontroller) which controls the peripheral devices. Typically there are three lines common to all the devices: MISO (Master In Slave Out) - The Slave line for sending data to the master MOSI (Master Out Slave In) - The Master line for sending data to the peripherals SCK (Serial Clock) - The clock pulses which synchronize data transmission generated by the master and one line specific for every device: SS (Slave Select) - the pin on each device that the master can use to enable and disable specific devices. When a device's Slave Select pin is low, it communicates with the master. When it's high, it ignores the master. This allows you to have multiple SPI devices sharing the same MISO, MOSI, and CLK lines. The SPI standard is loose and each device implements it a little differently. This means you have to pay special attention to the device's datasheet when writing your code. Note that MISO, MOSI, and SCK are available in a consistent physical location on the ICSP header; this is useful, for example, in designing a shield that works on every board. In System Programming (ISP) Supported By: Vast majority of AVRs Supported Programmers: AVRISP MKI/II, JTAG MKII, STK500, STK600, Dragon, AVRISP clones, AVR910 Programmers, AVRONE In-system programming (ISP), also called in-circuit serial programming (ICSP), is the ability of some programmable logic devices, microcontrollers, and other embedded devices to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. ISP requires that the target AVR is running at a clock rate of at least four times that of the ISP clock. This is a common pitfall and a source of confusion to many new to AVRs. Bootloaders A bootloader is a small AVR program which sits in a user-settable reserved section of the regular flash. Bootloaders make use of the flash self-modification features available in the newer AVRs to allow the AVR to program itself via program data loaded from an external source. Bootloaders may source their data from any location (eg external dataflash or SD card) however by far the most common type of Bootloader communicates with a PC via the AVR's RS-232 (serial) port. ATtiny 45 bootloaders pins PROGRAMMING ATTINY 45 ATtiny 45 IS A Atmel 8-bit AVR Microcontroller with 2/4/8K Bytes In-System Programmable Flash, with some important Features: 1. Operating Voltage: 1.8 - 5.5 (45V and 45 series) 2. Speed Grade: 0 – 10 MHz 3. I/O and Packages: Six Programmable I/O Lines 4. In-System Programmable via SPI Port Alternate Port Functions: Most port pins have alternate functions in addition to being general digital I/Os.Port pin control signals from the simplified can be overridden by alternate functions. ATtiny support in Arduino 1. Open preferences dialog in the Arduino software. 2. Find the “Additional Boards Manager URLs” field near the bottom of the dialog. 3. Paste URL into the field: https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json and click OK. 4. Open the boards manager in the Tools > Board menu. 5. Scroll to the bottom of the list; you should see an entry for “ATtiny”. Click on the ATtiny entry. An install button should appear. Click the install button. Connecting the ATtiny You’ll need to provide power to the ATtiny and connect it to your programmer. That is, connecting MISO, MOSI, SCK, RESET, VCC, and GND of the programmer to the corresponding pins on the ATtiny. (Or, if you’re using an circuit w/ an ATtiny, simply connect the programmer to the ISP header on the board – you may also need to power the board separately.) if you will use USBtiny, you can find drivers in download files CONECTIONS FOR USBtiny Burn Bootloaders You know about flash, eeprom and RAM as parts of the chip. What I did not mention is that there are also 3 bytes of permanent (by permanent I mean that they stick around after power goes out, but that you can change them as many times as you'd like) storage called the fuses. The fuses determine how the chip will act, whether it has a bootloader, what speed and voltage it likes to run at, etc. Note that despite being called 'fuses' they are re-settable and dont have anything to do with protection from overpowering (like the fuses in a home). The fuses are documented in the datasheets, but AVR Fuses, You can calculate Low, High and Extended byte in this page here FUSES ATTINY 45 ATtiny25/45/85 has three fuse bytes, that fuses are read as logical zero, “0”, when programmed. Programming 1. Open the Blink sketch from the examples menu. 2. Select “ATtiny” from the Tools > Board menu and the particular ATtiny you’re using from the Tools > Processor menu. In case, ATtiny 45 3. Select the appropriate item from the Tools > Programmer menu (e.g. “Arduino as ISP” if you’re using an Arduino board as the programmer, USBtinyISP for the USBtinyISP, FabISP, or TinyProgrammer, etc). In our case, USBtinyISP 4. Upload the sketch using "Upload using programmer". For to read a analog signal, we will use a Analog imputs pin from datasheet ATtiny 45. EAGLE DESIGN AND MILLING EAGLE FILES FAB ACADEMY FILE MILLING I tried to make a humidity sensor in Roland CNC. With mistakes, I did it! One side... For both side you: 1. Put double side adhesive tape 2. Milling traces and cut 3. Turn cut board and put in hole. Try to put in exact point and milling traces SIMULATION DOWNLOAD All files Download