logo

Select Sidearea

Populate the sidearea with useful widgets. It’s simple to add images, categories, latest post, social media icon links, tag clouds, and more.
hello@youremail.com
+1234567890
 

Tutorial Microcontroller MCS-51 , AVR Codevision, ARM STM32F4, Keil

Tutorial Microcontroller MCS-51 ATMEL ISP 

 

Product Kit Trainer

Tutorial MCS51

Tutorial AVR

Tutorial ARMSTM32

Link Download Software

Galery

Pelatihan


Best Seller Trainer

Super MCS51 Trainer
image

Standart MCS51 Trainer
image

Super AVR Trainer

image

Standart AVR Trainer
image

Programmer USBASP image

Standart ARM Trainerimage

 

 

5. Percobaan Counter 0 dengan Display pada LCD Karakter

Lakukan konfigurasi pada codevision untuk pemilihan TIMER0 mode normal, dan konfigurasi pada LCD Karakter.

Pada percobaan ini data hasil counter pada TCNT0 akan ditampilkan pada display LCD karakter 2×16

#include <mega8535.h>
// Alphanumeric LCD Module functions
#asm
.equ __lcd_port=0x15 ;PORTC
#endasm
#include <lcd.h>
#include <stdlib.h>
// Declare your global variables here           char temp[4];void main(void){ PORTC=0x00; DDRC=0x00;           // Timer/Counter 0 initialization           // Clock source: T0 pin Rising Edge           // Mode: Normal top=FFh           // OC0 output: Disconnected TCCR0=0x07; TCNT0=0x00; OCR0=0x00;           // Timer(s)/Counter(s) Interrupt(s) initialization TIMSK=0x02;
// LCD module initialization lcd_init(16);           // Global enable interrupts #asm("sei") while (1) {            // Place your code here  itoa(TCNT0,temp);  lcd_gotoxy(0,0);   lcd_puts(temp); };}