• Tidak ada hasil yang ditemukan

BAB V KESIMPULAN DAN SARAN

5.2 Saran

Setelah melakukan proses pembuatan, percobaan, pengujian alat dan

pendataan, penulis memberikan saran agar modul alat “Colony counter” ini

dapat lebih baik efektif dan efisien dalam melakukan penggunanaanya maka

penulis memberikan saran sebagai berikut:

1. Dalam melakukan pembuatan modul Tugas Akhir agar sebaiknya lebih

memperhatikan keselamatan terutama pada saat pembutan modul

(Hardwere).

2. Penulis menyarankan agar di kembangkan menjadi lebih praktis

(portable) dengan menggunakan batrai sebagai sumber tegangan

sehingga modul alat lebih mudah disimpan dan di bawa.

3. Ditambahkan menu penyimpanan data sebagai memori agar lebih

memudahkan user.

4. Menggunakan sensor secan agar lebih otomatis dalam melakukan proses

perhitungan colony.

5. Memperbaiki bentuk box chasing agar lebih elegant, praktis dan lebih

rapi dalam mendesain modul alat colony counter ini.

71

DAFTAR PUSTAKA

Ambar Tri Utomo, Ramadani Syahputra, I., 2011. Implementasi Mikrokontroller

Sebagai Pengukur Suhu Delapan Ruangan. Pengukur Suhu, 4(Pengukur Suhu

Delapan Ruangan), pp.153–159.

Ardi Winanto, (2008). Pemrograman dengan bahasa C pada WinAVR.Bandung :

Informatika Bandung.. Microcontroller AVR ATmega8/32/16/8535 dan.

Chamim, A.N.N., Ahmadi, D. & Iswanto, 2016. Atmega16 Implementation As

Indicators Of Maximum Speed. International Journal of Applied

Engineering Research ISSN, 11(15), pp.8432–8435.

Chamim, A.N.N. & Iswanto, 2011. Implementasi Mikrokontroler Untuk

Pengendalian Lampu Dengan Sms. In Prosending Retii 6.

Dwidjoseputro, D. 2005. Dasar-Dasar Mikrobiologi. Jakarta: Djambatani.

Hadietomo, Ratna. 1990. Mikrobiologi Dalam Praktek. Jakarta : PT. Gramedia.

Hidayat, L., Iswanto & Muhammad, H., 2015. Perancangan Robot Pemadam Api

Divisi Senior Berkaki. Jurnal Semesta Teknika, 14(2), pp.112–116.

Iswanto, dan Raharja Maharani, N. Microcontroller Teori dan Praktek ATMega

16 Dengan Bahasa C.(2015). Yogyakarta : CV BUDI UTAMA.

Iswanto, 2008. Design dan Implementasi Sistem Embedded Mikrokontroler

ATMEGA8535 dengan Bahasa Basic, Yogyakarta: Gava Media.

Iswanto, I. & Raharja, N.M., 2010. Sistem monitoring dan peringatan dini tanah

longsor. In Simposium Nasional RAPI IX 2010. pp. 54–62.

Iswanto, I., Raharja, N.M. & Subardono, A., 2009. Sistem Peringatan Dini Tanah

Longsor Berbasis Atmega8535. In Seminar Nasional Informatika 2009

(semnasIF 2009). pp. 53–57.

Iswanto, I. & Setiawan, R.D., 2013. Power Saver with PIR Sensor. Journal of

Control & Instrumentation, 4(3), pp.26–34.

ISWANTO, JAMAL, A. & SETIADY, F., 2011. Implementasi Telepon Seluler

sebagai Kendali Lampu Jarak Jauh. Jurnal Ilmiah Semesta Teknika, 14(1),

pp.81–85.

ISWANTO & MUHAMMAD, H., 2012. WEATHER MONITORING STATION

WITH REMOTE RADIO FREQUENCY WIRELESS

COMMUNICATIONS. International Journal of Embedded Systems and

Applications (IJESA), 2(3), pp.99–106.

Iswanto & Raharja, N.M., 2015. Mikrokontroller: Teori dan Praktik Atmega 16

dengan Bahasa C, Penerbit Deepublish.

Muhammad, H. & Iswanto, 2013. EGT 10 Design and Application For Position.

International Journal of Mobile Network Communications & Telematics (

IJMNCT), 3(3), pp.1–8.

Pleczar, M.J.2006. Dasar Dasar Mikrobiologi. Jakarta : UI-Press.

Sadad, R.T.A. & Iswanto, 2010. Implementasi Mikrokontroler Sebagai

Pengendali Kapasitor Untuk Perbaikan Faktor Daya Otomatis pada Jaringan

Listrik. SEMESTA TEKNIKA, 13(2), pp.181–192.

SADAD, R.T.A., ISWANTO & SADAD, J.A., 2011. Implementasi

Mikrokontroler Sebagai Pengendali Lift Empat Lantai. JURNAL ILMIAH

SEMESTA TEKNIKA, 14(2), pp.160–165.

Suripto, S. & Iswanto, 2012. DESAIN AND IMPLEMENTATION OF FM

RADIO WAVES AS DISTANCE MEASURING AC VOLTAGE.

International Journal of Mobile Network Communications & Telematics

(IJMNCT), 2(5), pp.13–24.

Suriawiria,U. Mikrobiologi Dasar. 2005 Jakarta : Papas Sinar Sinanti.

Tunggal, T.P., Latif, A. & Iswanto, 2016. Low-cost portable heart rate monitoring

based on photoplethysmography and decision tree. In ADVANCES OF

SCIENCE AND TECHNOLOGY FOR SOCIETY: Proceedings of the 1st

International Conference on Science and Technology 2015 (ICST-2015). p.

090004. Available at:

http://scitation.aip.org/content/aip/proceeding/aipcp/10.1063/1.4958522.

Triwiyanto, “Praktikum Mikrokontroller.tutorialelectronic.com, “ (2013).

Surabaya : Poltekes Kemenkes Surabaya.

Wahyudianto, A., Iswanto & Chamim, A.N.N., 2013. ALAT PENGONTROL

LAMPU MENGGUNAKAN REMOTE TV UNIVERSAL. In SEMINAR

NASIONAL ke 8 Tahun 2013. pp. 112–116.

http://elektronikaelektronika.blogspot.com/2007/04/LCD.html (2007). Oleh

Bambang Sulistyo (Diakses 13 Agustus 2015. 20.00 ).

http://www.organisasi.org/1970/01/definisi-pengertian-bakteri-ciri-ciridan-

peranan-bakteri-bagi-kehidupan-manusia.html (2008). Oleh

Daniel(Diakses pada 1 April (2015)

http://elektronikaelektronika.blogspot.com/2007/04/buzzer.html . (2007) . Oleh

Heru Pratama, (Diakses 15 Agustus 2015. 20.30 )

http://www.scribd.com/doc/198994628/Laporan-Resmi-Praktikum-Mikrobiologi

(2013). Oleh Setiyono, M.R.(Diakses 1 April 2015).

http://colonycounter/colony.html (2014). Oleh Suyatno, (Diakses 19 Agustus

2015. 09.00).

http://elektronikaelektronika.blogspot.com/2007/04/Limit switch.html. (2007).

Oleh Ubay Fakhrudin (Diakses 17 Agustus 2015. 22.30 ).

http://elektronikaelektronika.blogspot.com/2007/04/LED.html . (2007). Oleh

Zulkifli Hasan (Diakses 17 Agustus 2015. 21.30 ).

https://abisabrina.wordpress.com/2010/08/14/fungsi-dasar-transistor/ .(2010).

Oleh Abi Sabrina (Diakses pada 31 Agustus 2016. 18.26).

– Up to 16 MIPS Throughput at 16 MHz – On-chip 2-cycle Multiplier

High Endurance Non-volatile Memory segments

– 16 Kbytes of In-System Self-programmable Flash program memory – 512 Bytes EEPROM

– 1 Kbyte Internal SRAM

– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM – Data retention: 20 years at 85°C/100 years at 25°C(1) – Optional Boot Code Section with Independent Lock Bits

In-System Programming by On-chip Boot Program True Read-While-Write Operation

– Programming Lock for Software SecurityJTAG (IEEE std. 1149.1 Compliant) Interface

– Boundary-scan Capabilities According to the JTAG Standard – Extensive On-chip Debug Support

– Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG InterfacePeripheral Features

– Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes

– One 16-bit Timer/Counter with Separate Prescaler, Compare Mode, and Capture Mode

– Real Time Counter with Separate Oscillator – Four PWM Channels

– 8-channel, 10-bit ADC 8 Single-ended Channels

7 Differential Channels in TQFP Package Only

2 Differential Channels with Programmable Gain at 1x, 10x, or 200x – Byte-oriented Two-wire Serial Interface

– Programmable Serial USART – Master/Slave SPI Serial Interface

– Programmable Watchdog Timer with Separate On-chip Oscillator – On-chip Analog Comparator

Special Microcontroller Features

– Power-on Reset and Programmable Brown-out Detection – Internal Calibrated RC Oscillator

– External and Internal Interrupt Sources

– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby and Extended Standby

I/O and Packages

– 32 Programmable I/O Lines

– 40-pin PDIP, 44-lead TQFP, and 44-pad QFN/MLFOperating Voltages – 2.7V - 5.5V for ATmega16L – 4.5V - 5.5V for ATmega16Speed Grades – 0 - 8 MHz for ATmega16L – 0 - 16 MHz for ATmega16

Power Consumption @ 1 MHz, 3V, and 25°C for ATmega16L – Active: 1.1 mA

– Idle Mode: 0.35 mA – Power-down Mode: < 1 µA

8-bit

Microcontroller

with 16K Bytes

In-System

Programmable

Flash

ATmega16

ATmega16L

Rev. 2466T–AVR–07/10

2 2466T–AVR–07/10

Configurations

Disclaimer

Typical values contained in this datasheet are based on simulations and characterization of other AVR microcontrollers manufactured on the same process technology. Min and Max values will be available after the device is characterized.

(XCK/T0) PB0 (T1) PB1 (INT2/AIN0) PB2 (OC0/AIN1) PB3 (SS) PB4 (MOSI) PB5 (MISO) PB6 (SCK) PB7 RESET VCC GND XTAL2 XTAL1 (RXD) PD0 (TXD) PD1 (INT0) PD2 (INT1) PD3 (OC1B) PD4 (OC1A) PD5 (ICP1) PD6 PA0 (ADC0) PA1 (ADC1) PA2 (ADC2) PA3 (ADC3) PA4 (ADC4) PA5 (ADC5) PA6 (ADC6) PA7 (ADC7) AREF GND AVCC PC7 (TOSC2) PC6 (TOSC1) PC5 (TDI) PC4 (TDO) PC3 (TMS) PC2 (TCK) PC1 (SDA) PC0 (SCL) PD7 (OC2) PA4 (ADC4) PA5 (ADC5) PA6 (ADC6) PA7 (ADC7) AREF GND AVCC PC7 (TOSC2) PC6 (TOSC1) PC5 (TDI) PC4 (TDO) (MOSI) PB5 (MISO) PB6 (SCK) PB7 RESET VCC GND XTAL2 XTAL1 (RXD) PD0 (TXD) PD1 (INT0) PD2 (INT1) PD3

(OC1B) PD4 (OC1A) PD5 (ICP1) PD6 (OC2) PD7 VCC GND

(SCL) PC0 (SDA) PC1 (TCK) PC2 (TMS) PC3 PB4 (SS) PB3 (AIN1/OC0) PB2 (AIN0/INT2) PB1 (T1) PB0 (XCK/T0) GND VCC PA0 (ADC0) PA1 (ADC1) PA2 (ADC2) PA3 (ADC3)

PDIP

TQFP/QFN/MLF

NOTE:

Bottom pad should be soldered to ground.

3 2466T–AVR–07/10

throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power con-sumption versus processing speed.

Block Diagram

Figure 2. Block Diagram

INTERNAL OSCILLATOR OSCILLATOR WATCHDOG TIMER MCU CTRL. & TIMING OSCILLATOR TIMERS/ COUNTERS INTERRUPT UNIT STACK POINTER EEPROM SRAM STATUS REGISTER USART PROGRAM COUNTER PROGRAM FLASH INSTRUCTION REGISTER INSTRUCTION DECODER PROGRAMMING LOGIC SPI ADC INTERFACE COMP. INTERFACE PORTA DRIVERS/BUFFERS

PORTA DIGITAL INTERFACE

GENERAL PURPOSE REGISTERS X Y Z ALU + -PORTC DRIVERS/BUFFERS

PORTC DIGITAL INTERFACE

PORTB DIGITAL INTERFACE

PORTB DRIVERS/BUFFERS

PORTD DIGITAL INTERFACE

PORTD DRIVERS/BUFFERS XTAL1 XTAL2 RESET CONTROL LINES VCC GND MUX & ADC AREF PA0 - PA7 PC0 - PC7 PD0 - PD7 PB0 - PB7 AVR CPU TWI AVCC INTERNAL CALIBRATED OSCILLATOR

4 2466T–AVR–07/10

registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten times faster than con-ventional CISC microcontrollers.

The ATmega16 provides the following features: 16 Kbytes of In-System Programmable Flash Program memory with Read-While-Write capabilities, 512 bytes EEPROM, 1 Kbyte SRAM, 32 general purpose I/O lines, 32 general purpose working registers, a JTAG interface for Boundary-scan, On-chip Debugging support and programming, three flexible Timer/Counters with com-pare modes, Internal and External Interrupts, a serial programmable USART, a byte oriented Two-wire Serial Interface, an 8-channel, 10-bit ADC with optional differential input stage with programmable gain (TQFP package only), a programmable Watchdog Timer with Internal Oscil-lator, an SPI serial port, and six software selectable power saving modes. The Idle mode stops the CPU while allowing the USART, Two-wire interface, A/D Converter, SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next External Inter-rupt or Hardware Reset. In Power-save mode, the Asynchronous Timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except Asynchronous Timer and ADC, to minimize switching noise during ADC conversions. In Standby mode, the crystal/reso-nator Oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with low-power consumption. In Extended Standby mode, both the main Oscillator and the Asynchronous Timer continue to run.

The device is manufactured using Atmel’s high density nonvolatile memory technology. The On-chip ISP Flash allows the program memory to be reprogrammed in-system through an SPI serial interface, by a conventional nonvolatile memory programmer, or by an On-chip Boot program running on the AVR core. The boot program can use any interface to download the application program in the Application Flash memory. Software in the Boot Flash section will continue to run while the Application Flash section is updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega16 is a powerful microcontroller that provides a highly-flexible and cost-effec-tive solution to many embedded control applications.

The ATmega16 AVR is supported with a full suite of program and system development tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators, and evaluation kits.

Pin Descriptions

VCC Digital supply voltage.

GND Ground.

Port A (PA7..PA0) Port A serves as the analog inputs to the A/D Converter.

Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up resistors (selected for each bit). The Port A output buffers have sym-metrical drive characteristics with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running.

5 2466T–AVR–07/10

capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running.

Port B also serves the functions of various special features of the ATmega16 as listed on page 58.

Port C (PC7..PC0) Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The

Port C output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs.

Port C also serves the functions of the JTAG interface and other special features of the ATmega16 as listed on page 61.

Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The

Port D output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running.

Port D also serves the functions of various special features of the ATmega16 as listed on page 63.

RESET Reset Input. A low level on this pin for longer than the minimum pulse length will generate a

reset, even if the clock is not running. The minimum pulse length is given in Table 15 on page 38. Shorter pulses are not guaranteed to generate a reset.

XTAL1 Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.

XTAL2 Output from the inverting Oscillator amplifier.

AVCC AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally

con-nected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter.

6 2466T–AVR–07/10

Note: 1.

Data Retention

Reliability Qualification results show that the projected data retention failure rate is much less than 1 PPM over 20 years at 85°C or 100 years at 25°C.

7 2466T–AVR–07/10

Examples

compilation. Be aware that not all C Compiler vendors include bit definitions in the header files

and interrupt handling in C is compiler dependent. Please confirm with the C Compiler documen-tation for more details.

8 2466T–AVR–07/10

Introduction

This section discusses the AVR core architecture in general. The main function of the CPU core

is to ensure correct program execution. The CPU must therefore be able to access memories, perform calculations, control peripherals, and handle interrupts.

Architectural

Overview

Figure 3. Block Diagram of the AVR MCU Architecture

In order to maximize performance and parallelism, the AVR uses a Harvard architecture – with separate memories and buses for program and data. Instructions in the program memory are executed with a single level pipelining. While one instruction is being executed, the next instruc-tion is pre-fetched from the program memory. This concept enables instrucinstruc-tions to be executed in every clock cycle. The program memory is In-System Reprogrammable Flash memory. The fast-access Register File contains 32 × 8-bit general purpose working registers with a single clock cycle access time. This allows single-cycle Arithmetic Logic Unit (ALU) operation. In a typ-ical ALU operation, two operands are output from the Register File, the operation is executed, and the result is stored back in the Register File – in one clock cycle.

Six of the 32 registers can be used as three 16-bit indirect address register pointers for Data Space addressing – enabling efficient address calculations. One of the these address pointers can also be used as an address pointer for look up tables in Flash Program memory. These added function registers are the 16-bit X-register, Y-register, and Z-register, described later in this section.

The ALU supports arithmetic and logic operations between registers or between a constant and a register. Single register operations can also be executed in the ALU. After an arithmetic opera-tion, the Status Register is updated to reflect information about the result of the operation.

Flash Program Memory Instruction Register Instruction Decoder Program Counter Control Lines 32 x 8 General Purpose Registrers ALU Status and Control I/O Lines EEPROM

Data Bus 8-bit

Data SRAM

Direct Addressing Indirect Addressing

Interrupt Unit SPI Unit Watchdog Timer Analog Comparator I/O Module 2 I/O Module1 I/O Module n

9 2466T–AVR–07/10

mat. Every program memory address contains a 16-bit or 32-bit instruction.

Program Flash memory space is divided in two sections, the Boot program section and the Application Program section. Both sections have dedicated Lock bits for write and read/write protection. The SPM instruction that writes into the Application Flash memory section must reside in the Boot Program section.

During interrupts and subroutine calls, the return address Program Counter (PC) is stored on the Stack. The Stack is effectively allocated in the general data SRAM, and consequently the Stack size is only limited by the total SRAM size and the usage of the SRAM. All user programs must initialize the SP in the reset routine (before subroutines or interrupts are executed). The Stack Pointer SP is read/write accessible in the I/O space. The data SRAM can easily be accessed through the five different addressing modes supported in the AVR architecture.

The memory spaces in the AVRarchitecture are all linear and regular memory maps.

A flexible interrupt module has its control registers in the I/O space with an additional global interrupt enable bit in the Status Register. All interrupts have a separate interrupt vector in the interrupt vector table. The interrupts have priority in accordance with their interrupt vector posi-tion. The lower the interrupt vector address, the higher the priority.

The I/O memory space contains 64 addresses for CPU peripheral functions as Control Regis-ters, SPI, and other I/O functions. The I/O Memory can be accessed directly, or as the Data Space locations following those of the Register File, $20 - $5F.

ALU

Arithmetic

Logic Unit

The high-performance AVR ALU operates in direct connection with all the 32 general purpose working registers. Within a single clock cycle, arithmetic operations between general purpose registers or between a register and an immediate are executed. The ALU operations are divided into three main categories – arithmetic, logical, and bit-functions. Some implementations of the architecture also provide a powerful multiplier supporting both signed/unsigned multiplication and fractional format. See the “Instruction Set” section for a detailed description.

Status Register

The Status Register contains information about the result of the most recently executed

arithme-tic instruction. This information can be used for altering program flow in order to perform conditional operations. Note that the Status Register is updated after all ALU operations, as specified in the Instruction Set Reference. This will in many cases remove the need for using the dedicated compare instructions, resulting in faster and more compact code.

The Status Register is not automatically stored when entering an interrupt routine and restored when returning from an interrupt. This must be handled by software.

The AVR Status Register – SREG – is defined as:

• Bit 7 – I: Global Interrupt Enable

The Global Interrupt Enable bit must be set for the interrupts to be enabled. The individual inter-rupt enable control is then performed in separate control registers. If the Global Interinter-rupt Enable Register is cleared, none of the interrupts are enabled independent of the individual interrupt enable settings. The I-bit is cleared by hardware after an interrupt has occurred, and is set by the RETI instruction to enable subsequent interrupts. The I-bit can also be set and cleared by the application with the SEI and CLI instructions, as described in the instruction set reference.

Bit 7 6 5 4 3 2 1 0

I T H S V N Z C SREG

Read/Write R/W R/W R/W R/W R/W R/W R/W R/W

10 2466T–AVR–07/10

nation for the operated bit. A bit from a register in the Register File can be copied into T by the BST instruction, and a bit in T can be copied into a bit in a register in the Register File by the BLD instruction.

• Bit 5 – H: Half Carry Flag

The Half Carry Flag H indicates a Half Carry in some arithmetic operations. Half Carry is useful in BCD arithmetic. See the “Instruction Set Description” for detailed information.

• Bit 4 – S: Sign Bit, S = N

V

The S-bit is always an exclusive or between the Negative Flag N and the Two’s Complement Overflow Flag V. See the “Instruction Set Description” for detailed information.

• Bit 3 – V: Two’s Complement Overflow Flag

The Two’s Complement Overflow Flag V supports two’s complement arithmetics. See the “Instruction Set Description” for detailed information.

• Bit 2 – N: Negative Flag

The Negative Flag N indicates a negative result in an arithmetic or logic operation. See the “Instruction Set Description” for detailed information.

• Bit 1 – Z: Zero Flag

The Zero Flag Z indicates a zero result in an arithmetic or logic operation. See the “Instruction Set Description” for detailed information.

• Bit 0 – C: Carry Flag

The Carry Flag C indicates a carry in an arithmetic or logic operation. See the “Instruction Set

Dokumen terkait