Pemanfaatan Timer pada ESP8266

Interrupt Software Timer

#include <ESP8266WiFi.h>
#include <Ticker.h>  
Ticker blinker;
#define LED 2  //On board LED
void changeState()
{
  digitalWrite(LED, !(digitalRead(LED)));  
}

void setup()
{
    pinMode(LED,OUTPUT);
    blinker.attach(0.5, changeState); //atau attach_ms dalam milisecond
}

void loop()
{
}

Interrupt Hardware Timer (Timer1), Timer0 tidak bisa digunakan karena untuk koneksi WiFi

#include <ESP8266WiFi.h>
#include <Ticker.h>
Ticker blinker;
#define LED 2  //On board LED
void ICACHE_RAM_ATTR onTimerISR(){
    digitalWrite(LED,!(digitalRead(LED)));  //Toggle LED Pin
    timer1_write(600000);//12us

}


void setup()

{

    pinMode(LED,OUTPUT);

 


    timer1_attachInterrupt(onTimerISR);

    timer1_enable(TIM_DIV16, TIM_EDGE, TIM_SINGLE);

    timer1_write(600000); //120000 us

}


void loop()

{

}


Sumber:

https://circuits4you.com/category/esp8266/

https://www.switchdoc.com/category/esp8266/

Driver PL2303HX untuk Windows 10 64bit

Pernah beli alat USB to Serial Converter murah, dengan IC PL2303. Saat dipasang di komputer, ternyata butuh driver. Alhasil menemukan driver di situs produsen IC namun ada catatan :

Windows 8/8.1/10 are NOT supported in PL-2303HXA and PL-2303X EOL chip versions.

Untungnya ada situs yang baik hati (lupa dimana) memberikan file hasil modifikasi driver Windows 7 agar bisa dipasang di Windows 10.

Link: http://latiful.hayat.web.id/file/PL2303HX-edit.zip

Semoga bisa bermanfaat

Contoh kode interupsi I2S pada WAU8822 pada Nuvoton NUC-LB140

Contoh loopback dari dan ke WAU serta pembentukan sinyal sinusoida

#include "NUC100Series.h"
#include "gpio.h"
#include "portinit.h" //lcd
#include "lcd.h"
#include "wau8822n.h"

# define PLLCON_SETTING      CLK_PLLCON_50MHz_HIRC
# define PLL_CLOCK           50000000
# define HCLK_DIV            1

#define MUTE_OFF(x)         PE->DOUT &= ~(1 << 14)
#define MUTE_ON(x)          PE->DOUT |=  (1 << 14)

//#define POOLING
#define LOOPBACK 1
#define MONOTOSTEREO 1
#define GAIN 1//50

#define SIN_SAMPLES     32
int32_t i32SinIdx = 0;
int16_t i16Sin[SIN_SAMPLES] = {
    0,3203,6284,9124,11612,13655,15172,16106,16423,16107,15172,13655,
    11613,9124,6284,3204,1,-3205,-6284,-9124,-11613,-13654,-15173,-16107,
    -16422,-16106,-15172,-13655,-11613,-9123,-6285,-3203
};

uint32_t g_u32TxValue;
uint32_t connect=TRUE;
void displayLCD(){

    //PC15=0;
    print_Line(0,   " Teknik Elektro ");
    printS(2*8+4,1*16,"Universitas"); //printS(x, y, char)
    printS(2*8,2*16,"Muhammadiyah");
    printS(3*8,3*16, "Purwokert0");
    connect=FALSE;

}

uint32_t spectrum[128];
volatile uint8_t ii=0;
extern void wau(void){
    uint8_t i;
    for(i=0;i<128;i++){
        spectrum[i]=0;
    }


    SYS_UnlockReg(); // Unlock protected registers
    CLK_EnableXtalRC(CLK_PWRCON_XTL12M_EN_Msk | CLK_PWRCON_OSC10K_EN_Msk ); // Enable HXT external 12MHz cyrstal
    CLK_SetCoreClock(50000000);    //  Set HCLK frequency 50MHz
    SYS_LockReg(); // Lock protected registers

    Port_Init(SPI3PORT);
    init_LCD();
    clear_LCD();

    //I2C - I2S WAU8822 codec
    WAU8822_Config();

    GPIO_SetMode(PE, BIT14, GPIO_PMD_OUTPUT);
    PE14=0;  //PHone OUT Enable (NUC-LB-140)

#ifdef POOLING
    //uint32_t u32Tmp;

    //open I2S function
    //st.u32SampleRate     = 16000;
    //st.u8WordWidth       = I2S_DATABIT_16;
    //st.u8AudioFormat     = I2S_STEREO;
    //st.u8DataFormat      = I2S_FORMAT_I2S;
    //st.u8Mode            = I2S_MODE_SLAVE;
    //st.u8TxFIFOThreshold = I2S_FIFO_TX_LEVEL_WORD_0;
    //st.u8RxFIFOThreshold = I2S_FIFO_RX_LEVEL_WORD_8;//SMP_ONE
    I2S_Open(I2S,I2S_MODE_MASTER,32000,I2S_DATABIT_16,I2S_STEREO,I2S_FORMAT_I2S);

    // Set MCLK and enable MCLK
    I2S_EnableMCLK(I2S,6000000);

    while(1)
    {

            if((I2S->STATUS & I2S_STATUS_TXFULL_Msk) == 0)
            {
                u32Tmp = i16Sini[i32SinIdxi];
                u32Tmp &= 0xFFFFUL;
                //u32Tmp |= u32Tmp << 16;  //duplicate it to stereo to Tx FIFO
                I2S->TXFIFO = u32Tmp;
                i32SinIdxi++;
                if(i32SinIdxi >= SIN_SAMPLESi)
                    i32SinIdxi = 0;

            }

    }
#else

    //interrupt
    I2S_Open(I2S,I2S_MODE_SLAVE,32000,I2S_DATABIT_16,I2S_STEREO,I2S_FORMAT_I2S);
    I2S_EnableMCLK(I2S,12000000);

    I2S_EnableInt(I2S,I2S_IE_RXTHIE_Msk );
    NVIC_EnableIRQ(I2S_IRQn);

    GPIO_SetMode(PC,BIT12,GPIO_PMD_OPEN_DRAIN);PA12=1;
    GPIO_SetMode(PC,BIT14,GPIO_PMD_OPEN_DRAIN);

    if(PE15==1) displayLCD();

    while(1)
    {
        CLK_SysTickDelay(1000000);
        if(PE15==0)
        {
            if(connect==FALSE) {
                clear_LCD();
                print_Line(0,   "Line-In Sound OK");
            }
            PC12 ^= 1;  //in LIN connected
            connect=TRUE;


        }else{
            if(connect){displayLCD();}

        }


    }
#endif
}

void I2S_IRQHandler(void)
{
    uint32_t u32Tmp=0;
    //unit32_t s =

    /* Fill sin samples to I2S until Tx FIFO full */
    while((I2S->STATUS & I2S_STATUS_TXFULL_Msk) == 0)
    {

#if LOOPBACK // Just loop Rx FIFO to Tx FIFO
        u32Tmp = I2S->RXFIFO;
        I2S->TXFIFO = (u32Tmp*GAIN);
#elif MONOTOSTEREO // Mono data in Rx FIFO and duplicate it to stereo to Tx FIFO
        u32Tmp = I2S->RXFIFO*GAIN & 0xFFFF0000UL;
        u32Tmp |= u32Tmp >> 16;
        I2S->TXFIFO = u32Tmp;

#else // Output Sin Wave
        u32Tmp = i16Sin[i32SinIdx];
        u32Tmp &= 0xFFFFUL;
        u32Tmp |= u32Tmp << 16;
        I2S->TXFIFO = u32Tmp;
        i32SinIdx++;
        if(i32SinIdx >= SIN_SAMPLES)
            i32SinIdx = 0;
#endif
    }
    ii = u32Tmp;
    PC->DOUT ^= (1 << 14);
}

Ways to detect heart rate

Based on Onitsch Cartoons, he can measure hetbeat using piezzoelectric by taped the sensor into his finger.

Its using arduino board and make it works great without noise. Here is the skecth:

Connect piezzoelectric into A2, or may another Analog input pin by change A2 code above into another Analog input. For fine result, it can be filterred and gained using following schematic. The schematic is from amgalbu whose post his article into element14 community. He is using oprocoupler instead of using piezzoelectirc

The basic idea is that the operational amplifier sums up Vcc/2 with the amplified DC component of the Vsensor. Vcc/2 is obtained through the R4/R5 partitor. The AC component is measured on the C5 capacitor. This signal is amplified by a factor of 330 (R1/R2). The RF1 trimmer will make it possible to fine-tune the gain (amgalbu)

I have not test it yet, but I’m sure it will be working great. I just need a time to check it out

Memprogram AT89S52 dengan Arduino

Programmer AT89S51 biasanya membutuhkan koneksi serial, namun laptop tidak memiliki port serial. Karena Arduino menggunakan port serial, maka bisa dimanfaatkan menjadi programmer AT89S52.

 

Siapkan arduino dengan kode berikut:

lalu upload ke arduino.

 

Siapkan rangkaian sesuai skema berikut:

 

Lalu gunakan applikasi file uploader untuk upload file

Kalibrasi MPU6050

MPU6050 adalah sensor sudut dan percepatan atau biasa disebut gyrometer. Sama seperti kebanyakan sensor lain, MPU6050 perlu dikalibrasi sebelum digunakan. Kinerja gyrometer ini sangat terpengaruh terhadap suhu, jadi pastikan suhu stabil terlebih dahulu sebelum melakukan proses kalibrasi. Beri jarak waktu antara 3 sampai dengan 5 menit setelah power on agar suhu stabil. Hasil proses kalibrasi pun akan berbeda saat dilakukan di suhu ruangan dibandingkan dengan kalibrasi di luar ruangan. Pastikan dikalibrasi pada suhu ruangan yang sama, atau setidaknya hampir sama, dengan dengan suhu dimana alat akan digunakan.

Berikut kode kalibrasi dari Luis Ródenas denga sedikit modifikasi:

Pastikan sudah melakuan instalasi librari I2Cdev dan MPU6050 dan hubungkan MPU6050 dengan skema berikut

 

Taru MPU6050 pada bidang datar, semisal meja dan jangan digerakkan sampai proses kalibrasi selesai.  Selanjutnya, untuk proses kalibrasi, buka dengan serial monitor dengan baud rate 115200 dan kirimkan satu huruf (bebas) lalu tekan send atau klik tombol enter. Tunggi hingga daftar offset muncul dengan ditandai tulisan ‘Your offsets:’

How to make USBasp work with Arduino in Linux

Make sure USBasb plugged into USB Port and check whenever its conected or not by typing lsusb in terminal.

stufi1983@latif-laptop:~$ lsusb
Bus 001 Device 003: ID 0db0:6877 Micro Star International RT2573
Bus 001 Device 004: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

USBasp should detected with VendorID 16c0 and ProductID 05dc. Look at bus address. It says Bus 002 Device 003. See permission on Bus 002 Device 001 by typing ls -l /dev/bus/usb/002/003 in terminal.

stufi1983@latif-laptop:~$ ls -l /dev/bus/usb/002/003
crw-rw-r-- 1 root root 189, 130 Sep  6 10:05 /dev/bus/usb/002/003

Current permission is crw-rw-r– mean user dont have permission to write at the bus. So, change permission to 777 with chmod command.

stufi1983@latif-laptop:~$ sudo chmod 777 /dev/bus/usb/002/003
[sudo] password for stufi1983:

OK, Done. USBasp now already to use with Arduino. Select in Arduino  menu Tool>Progammer>USBasp. Make new file New>Examples>Basic>Blink. Then upload by using menu: File>Upload using Programer

Be wise in using Microcontroller’s memory

Memory is a finite resource on these tiny processors and some applications are just plain too big for an microcontroler(uC). But most code has some room for optimization. So if program is just a little overweight, with a little diet and exercise, probably shed enough bytes to make it fit into uC. As we know, there are 3 types of memory in uC:

  • Flash or Program Memory
  • SRAM
  • EEPROM

Flash Memory

Flash memory is used to store your program image and any initialized data. You can execute program code from flash, but you can’t modify data in flash memory from your executing code. To modify the data, it must first be copied into SRAM

Flash memory is the same technology used for thumb-drives and SD cards. It is non-volatile, so your program will still be there when the system is powered off.

Flash memory has a finite lifetime of about 100,000 write cycles. So if you upload 10 programs a day, every day for the next 27 years, you might wear it out.

SRAM

SRAM or Static Random Access Memory, can be read and written from your executing program. SRAM memory is used for several purposes by a running program:

  • Static Data – This is a block of reserved space in SRAM for all the global and static variables from your program. For variables with initial values, the runtime system copies the initial value from Flash when the program starts.
  • Heap – The heap is for dynamically allocated data items. The heap grows from the top of the static data area up as data items are allocated.
  • Stack – The stack is for local variables and for maintaining a record of interrupts and function calls. The stack grows from the top of memory down towards the heap. Every interrupt, function call and/or local variable allocation causes the stack to grow. Returning from an interrupt or function call will reclaim all stack space used by that interrupt or function.

EEPROM

EEPROM is another form of non-volatile memory that can be read or written from your executing program. It can only be read byte-by-byte, so it can be a little awkward to use. It is also slower than SRAM and has a finite lifetime of about 100,000 write cycles (you can read it as many times as you want).

Several Memory Problems

Most memory problems occur when the stack and the heap collide. When this happens, one or both of these memory areas will be corrupted with unpredictable results. In some cases it will cause an immediate crash. In others, the effects of the corruption may not be noticed until much later. One way to diagnose memory problems is to measure how much memory is in use.

Optimize Flash memory

Flash memory usage is depend on code and compiler. If it have reached or exceeded the space available, some of these optimizations may help get you back under the limit.

Remove Dead Code

If project is a mash-up of code from several sources, chances are there are parts that are not getting used and can be eliminated to save space.

  • Unused Libraries – Are all the #include libraries actually used?
  • Unused Functions – Are all the functions acutally being called?
  • Unused Variables – Are all the variables actually being used?
  • Unreachable Code – Are there conditional expressions which will never be true?
 Hint: If  not sure about an #include, a function or a variable. Comment it out. If the program still compiles, that code is not being used. Just remove it!

Consolidate Repeated Code

If any sequence of code statements in two or more places, consider making a function out of them.

Eliminate the Bootloader

If space is really-really tight, you might consider eliminating the bootloader. This can save as much as 2K or 4K of Flash – depending on which bootloader you are currently using.

The downside of this is that you will need to load your code using an ISP programmer instead of via a standard USB cable.

 

Optimize SRAM

SRAM is the most precious memory commodity. SRAM shortages are probably the most common memory problems. They are also the hardest to diagnose. If program is failing in an otherwise inexplicable fashion, a crashed may happen in the stack due to a SRAM shortage. There are a number of things that can do to reduce SRAM usage.

Remove Unused Variables

If not sure whether a variable is being used or not, comment it out. If the sketch still compiles, get rid of it!

Use F() Macro

Literal strings are repeat memory offenders. First they take up space in the program image in Flash, then they are copied to SRAM at startup as static variables. This is a horrible waste of SRAM since we will never be writing to them.

Paul Stoffregen of PJRC and Teensyduino fame developed the F() macro as a super-simple solution to this problem. The F() macro tells the compiler to keep your strings in PROGMEM. All you have to do is to enclose the literal string in the F() macro.

For example, replacing this:

  Serial.println("This string will be stored in memory. Horible waste of SRAM!");

with this:

  Serial.println(F(" This string will be stored in memory. Horible waste of SRAM!"));

Will save bytes of wonderful SRAM!

Reserve() your strings

The string library allows to reserve buffer space for a string with the reserve() function. The idea is prevent String from fragmenting the heap by using reserve(num) to pre-allocate memory for a String that grows.

With the memory already allocated, String doesn’t need to call realloc() if the string grows in length. In most usages, lots of other little String objects are used temporarily as you perform these operations, forcing the new string allocation to a new area of the heap and leaving a big hole where the previous one was (memory fragmentation). Usually all you need to do is use reserve() on any long-lived String objects that you know will be increasing in length as you process text.

Move constant data to PROGMEM.

Data items declared as PROGMEM do not get copied to SRAM at startup. They are a little less convenient to work with, but they can save significant amounts of SRAM. The basic Arduino reference for PROGMEM is here. And there is a more detailed tutorial on the subject here.

#define FS(x) (__FlashStringHelper*)(x)
const char MyText[]  PROGMEM  = { “My flash based text” };

void setup() {
Serial.begin(57600):
Serial.println(FS(MyText));
}

Reduce Buffer Sizes

Buffer and Array Allocations: If you allocate a buffer, make sure it is no bigger than it needs to be.

Buffers in Libraries: Also be aware that some libraries allocate buffers behind the scenes that may be candidates for trimming as well.

System Buffers: Another buffer hidden deeply in the system is the 64 byte serial receive buffer. If your sketch is not receiving a lot of high-speed serial data, you can probably cut this buffer size in half – or maybe even less.

For an Example, if using Arduino library, Serial buffer can be reduced. The Serial buffer size is defined in HardwareSerial.cpp. This file can be found in your Arduino install directory: \Arduino-1.x.x\hardware\arduino\cores\arduino\HardwareSerial.cpp. Look for the line: #define SERIAL_BUFFER_SIZE 64 And change it to 32 or less.

Reduce Oversized Variables: Don’t use a float when an int will do. Don’t use an int when a byte will do. Try to use the smallest data type capable of holding the information. Use char instead of int if only need 255 bits data.

 

Think Globally. Allocate Locally.

Let’s have another look at how SRAM is used (and abused):

Global & Static Variables

Global and Static variables are the first things loaded into SRAM. They push the start of the heap upward toward the stack and they will occupy this space for all eternity.

Dynamic Allocations

Dynamicaly allocated objects and data cause the heap to grow toward the stack. Unlike Global and Static variables, these variables can be de-allocated to free up space. But this does not necessarily cause the heap to shrink! If there is other dynamic data above it in the heap, the top of the heap will not move. When the heap is full of holes like swiss cheese we call it a “fragmented heap”.

Local Variables

Every function call creates a stack frame that makes the stack grow toward the heap. Each stack frame will contain:

  • All parameters passed to the function
  • All local variables declared in the function.

This data is usable within the function, but the space is 100% reclaimed when the function exits!

The Takeaway

Avoid dynamic heap allocations – These can quickly fragment the limited heap-space.

Prefer local to global allocation – Stack variables only exist while they are being used. If you have variables that only are used in a small section of your code, consider making that code into a function and declaring the variables local to the function.

 

Optimize EEPROM

EEPROM is a handy, non-volatile storage space that works well for storing data such as calibration or tuning constants that are not practical to hard-code into Flash.

It is unusual to run out of EEPROM. And it is not often practical to use EEPROM to offload SRAM data. But we’ll mention it here for completeness. Using EEPROM requires that you include the EEPROM library.

#include <EEPROM.h>

The EEPROM library gives us 2 functions:

uint8_t read(int) //Read a byte from the specified EEPROM address

void write(int, uint8_t) //Write a byte to the specified EEPROM address

  • Note that while reads are unlimited, there are a finite number of write cycles limited (typically about 100,000).
  • Always check that EEPROM is ready before reading/writing to it (eeprom_is_ready function)
  • Always prefer the update functions rather than the write ones, as update checks first if the stored data is different than the data, so it erases / writes the new data only if it has changed. Check first if the value has changed before writing, or even use the EEPROMex alternative EEPROM Arduino library.
  • Read / write operations on EEPROM should never be interrupted : you should always disable/clear interrupts (cli()) before any operation and re-enable/set interrupts after (sei()).

Here is the example:

while (!eeprom_is_ready());

cli();

if(eeprom_read_word((uint16_t*)addr) != sensorValue) {

eeprom_write_word((uint16_t*)addr, sensorValue);

}

sei();

Arduino: ATMega8535 & Arduino IDE

Arduino Uno, merupakan salah satu varian yang saat ini banyak digunakan untuk praktisi dan hobbi elektronika. Arduino adalah pengendali mikro dengan prosesor Atmel AVR dan softwarenya memiliki bahasa pemrograman sendiri. Memiliki library yang cukup komplit serta didukung forum yang ramai, sehingga memudahkan untuk membangun proyek sistem kendali. Library arduino memiliki hampir semua interface dan sesor.

Arduino Uno use widely by electronic practical and hobbyist. Arduino consist of microcontroller which have its own Integrated Development Environtment based on Processing. It has plenty of library supported by many discussion forum, so it will be make easier to build control system projects.

Mikrokontroler arduino bermacam macam, untuk lebih jelasnya dapat dilihat di wikipedia. Kebanyakan menggunakan mikrokontroler Atmel AVR, namun untuk Arduino Yun, Arduino Due dan Arduino Zero menggunakan arsitektur ARM.

Arduino has vary variant depending on its microcontroler, it can be seen through wikipedia. Most of it use AVR, and Atmel Microcontroler. There is also 3 variants using ARM mikrocontroller such as Arduino Yun, Arduino Due and Arduino Zero.

Arduino UNO memiliki pin I/O yang cukup memadai, sekitar 14. Jilka memerlukan pin yang lbih banyak, dapat menggunakan Arduino dengan mikrokontroler jenis ATMega2560 atau jenis ARM yang memiliki I/O 54 pin. Namun sayang sekali memerlukan biaya yang cukup mengusras kantong 😀

Arduino UNO has 14 pin can be used as I/O. If more pin needed, Arduino which employ ATMega2560 or ARM architechture are more elegible to use. Those variant have 54 I/O pin, of cource more expensive than Arduino UNO.

Pada komponen rack yang saya miliki hanya tersedia IC AVR jenis ATMega8, 328, 8535 dan ATTiny2313. Padahal project kali ini membutuhkan I/O sejumlah 20 pin. Mau tidak mau harus mengoprek ATMega8535 yang memiliki 40 pin (32 pin I/O) agar dapat diprogram menggunakan library Arduino. Oke, sekedar sharing ilmu, berikut langkah dan hasilnya :

In my component rack, there are only ATMega8, ATMega328, ATMega8535 and ATTiny2313. I’d tried to use ATMega8535 because I need 20 I/O pin. ATMega8535 has 32 I/O pin. To make ATMega8535 can be used with Arduino library, it can be done by add several line on arduino/hardware/arduino/board.txt as follow:

Tambahkan pada file arduino/hardware/arduino/board.txt dengan baris berikut:

##############################################################

arduino_atmega8535.name=Stumpino-Atmega8535-8Mhz arduino_atmega8535.upload.protocol=stk500v2 arduino_atmega8535.upload.maximum_size=7168 arduino_atmega8535.upload.speed=38400 arduino_atmega8535.bootloader.low_fuses=0xE4 arduino_atmega8535.bootloader.high_fuses=0x98 arduino_atmega8535.bootloader.extended_fuses=0xFD arduino_atmega8535.bootloader.path=atmega arduino_atmega8535.bootloader.file=stk500boot_v2_notdefined.hex #arduino_atmega8535.bootloader.unlock_bits=0x3F #arduino_atmega8535.bootloader.lock_bits=0x0F arduino_atmega8535.build.mcu=atmega8535 arduino_atmega8535.build.f_cpu=8000000L arduino_atmega8535.build.core=arduino arduino_atmega8535.build.variant=stumpinomega40 ##############################################################

arduino_atmega8535-16.name=Stumpino-Atmega8535-External 16Mhz arduino_atmega8535-16.upload.protocol=stk500v2 arduino_atmega8535-16.upload.maximum_size=7168 arduino_atmega8535-16.upload.speed=38400 arduino_atmega8535-16.bootloader.low_fuses=0xEF arduino_atmega8535-16.bootloader.high_fuses=0x98 arduino_atmega8535-16.bootloader.extended_fuses=0xFD arduino_atmega8535-16.bootloader.path=atmega arduino_atmega8535-16.bootloader.file=stk500boot_v2_notdefined.hex #arduino_atmega8535-16.bootloader.unlock_bits=0x3F #arduino_atmega8535-16.bootloader.lock_bits=0x0F arduino_atmega8535-16.build.mcu=atmega8535 arduino_atmega8535-16.build.f_cpu=16000000L arduino_atmega8535-16.build.core=arduino arduino_atmega8535-16.build.variant=stumpinomega40

Kemudian dengan bantuan header yang telah dibut oleh Eric Conner lalu taruh di folder arduino/hardware/arduino/variants/stumpinomega40

Using header that Eric Conner have made, place it in arduino/hardware/arduino/variants/stumpinomega40 folder

Ok, siap pakai. Buka Arduino lalu pilih menu Tool>Board>Stumpino ATMega8535-Eksternal16Mhz dan buka File>Example>01 Basic>Blink. Saya menggunakan downloader USBAsp, jadi saya pilih di bagian menu Tool>Programmer>USBAsp

OK, its ready to use. Open Arduino IDE than choose  Tool>Board>Stumpino ATMega8535-Eksternal16Mhz than open File>Example>01 Basic>Blink. I use USBAsp dwonloader, so I click on Tool>Programmer>USBAsp

Saatnya merangkai ATMega8535 dan ISP-pin di project board dan mencoba. Perlu diketahui, D13 pada ATMega8535 adalah di pin IC kaki 19, jadi tempatkan led di IC pin 19. Silahkan mencoba….

Its time to connect  ATMega8535 and ISP-pin in project board. Arduino D13 pin in ATMega8535 is pin 19. Happy trying…