Prinsipnya adalah menumpangkan audio ke fungsi osilator dari rangkaian 555
Dari hasil googling menuntunku menuju ke instructable.com dan memperoleh rangkaian sederhana seperti berikut ini :
Semua Tentang Belajar Teknologi Digital Dalam Kehidupan Sehari - Hari
IC timer 555 adalah sirkuit terpadu (chip) yang digunakan dalam berbagai pembangkit timer, pulsa dan aplikasi osilator. Komponen ini digunakan secara luas, berkat kemudahan dalam penggunaan, harga rendah dan stabilitas yang baik
Kami bantu anda untuk memahami lebih jelas mengenai migrasi tv digital, apa sebabnya dan bagaimana efek terhadap kehidupan. Jasa teknisi juga tersedia dan siap membantu instalasi - setting perangkat - pengaturan antena dan distribusi televisi digital ke kamar kos / hotel
Project Sederhana dengan Dot Matrix dan Attiny2313. Bisa menjadi hadiah buat teman atau pacarmu yang ulang tahun dengan tulisan dan animasi yang dapat dibuat sendiri.
Jika anda pencinta IC TTL datau CMOS maka project jam digital ini akan menunjukkan bahwa tidak ada salahnya balik kembali ke dasar elektronika digital , sebab semuanya BISA dibuat dengan teknologi jadul
Teknologi kontrol sudah melampaui ekspektasi semua orang dan dengan kemajuan dunia elektronika, kini semakin leluasa berkreasi melalui Node Red
#define F_CPU 1000000UL // frek clock internal#include <avr/io.h>#include <util/delay.h>#include <avr/eeprom.h>#include <avr/interrupt.h>#include <avr/pgmspace.h>uint8_t angka1=10 ;uint8_t angka2=10 ;uint8_t angka3=10 ;uint8_t angka4=10 ;uint8_t segstep=0;uint8_t kalibrasi=3;int number=0;void conv_segmen(uint8_t digit)//nampilin segmen{switch (digit){case 0 :{PORTB &= ~_BV(PB0) & ~_BV(PB1) & ~_BV(PB2) & ~_BV(PB3) & ~_BV(PB4) & ~_BV(PB5);PORTB |= _BV(PB6) ;break;}case 1 :{PORTB &= ~_BV(PB1) & ~_BV(PB2) ;PORTB |= _BV(PB0) | _BV(PB3) | _BV(PB4) | _BV(PB5) | _BV(PB6) ;break;}case 2 :{PORTB &= ~_BV(PB0) & ~_BV(PB1) & ~_BV(PB3) & ~_BV(PB4) & ~_BV(PB6) ;PORTB |= _BV(PB2) | _BV(PB5) ;break;}case 3 :{PORTB &= ~_BV(PB0) & ~_BV(PB1) & ~_BV(PB2) & ~_BV(PB3) & ~_BV(PB6) ;PORTB |= _BV(PB4) | _BV(PB5) ;break;}case 4 :{PORTB &= ~_BV(PB1) & ~_BV(PB2) & ~_BV(PB5) & ~_BV(PB6) ;PORTB |= _BV(PB0) | _BV(PB3) | _BV(PB4) ;break;}case 5 :{PORTB &= ~_BV(PB0) & ~_BV(PB2) & ~_BV(PB3) & ~_BV(PB5) & ~_BV(PB6) ;PORTB |= _BV(PB1) | _BV(PB4) ;break;}case 6 :{PORTB &= ~_BV(PB0) & ~_BV(PB2) & ~_BV(PB3) & ~_BV(PB4) & ~_BV(PB5) & ~_BV(PB6) ;PORTB |= _BV(PB1) ;break;}case 7 :{PORTB &= ~_BV(PB0) & ~_BV(PB1) & ~_BV(PB2) ;PORTB |= _BV(PB3) | _BV(PB4) | _BV(PB5)| _BV(PB6) ;break;}case 8 :{PORTB &= ~_BV(PB0) & ~_BV(PB1) & ~_BV(PB2) & ~_BV(PB3) & ~_BV(PB4) & ~_BV(PB5) & ~_BV(PB6);break;}case 9 :{PORTB &= ~_BV(PB0) & ~_BV(PB1) & ~_BV(PB2) & ~_BV(PB3) & ~_BV(PB5) & ~_BV(PB6);PORTB |= _BV(PB4) ;break;}case 10 :{PORTB |= _BV(PB0) | _BV(PB1) | _BV(PB2) | _BV(PB3) | _BV(PB4) | _BV(PB5) | _BV(PB6) ;break;}}}void init_ctr(void) //counter tampilan{TCCR0A |= (1 << WGM01); // Configure timer 0 for CTC modeTIMSK |= (1 << OCIE0A); // Enable CTC interruptOCR0A = 50; // Set CTC compare value till blink disapear at 1MHz AVR clock, with a prescaler of 64TCCR0B |= (1 << CS01)|(1 << CS00); // Start timer at Fcpu/64}void init_ctr1(void)//counter perhitungan 600ms sampling{TCCR1B |= (1 << WGM12); // Configure timer 1 for CTC modeTIMSK |= (1 << OCIE1A); // Enable CTC interruptOCR1A = 586; //compare the CTC A = 600ms =586TCCR1B |= ((1 << CS10) | (1 << CS12)); // Start timer at Fcpu/1024}ISR(TIMER1_COMPA_vect) //timer capture RPM counter{ uint16_t rpm;switch(kalibrasi) {case 1 :{rpm=number/100;break; }case 2 :{rpm=number/10;break; }case 3 :{rpm=number;break; }case 4 :{rpm=number*10;break; }case 5 :{rpm=number*100;break; }default: rpm=0;}angka1 = rpm%10;if(rpm>9) angka2 = ((rpm%100) - (rpm%10)) /10 ;else angka2=10;if(rpm>99) angka3 = ((rpm%1000) - (rpm%100)) /100 ;else angka3=10;if(rpm>999) angka4 = ((rpm%10000) - (rpm%1000)) /1000 ;else angka4=10;number=0;}ISR(TIMER0_COMPA_vect) // timer pindah kolom{segstep++;switch(segstep) {case 1 :{ conv_segmen(10);PORTD |= _BV(PD0);PORTD &= ~_BV(PD1) & ~_BV(PD4) & ~_BV(PD5) ;conv_segmen(angka1);break;}case 2 :{ conv_segmen(10);PORTD |= _BV(PD1);PORTD &= ~_BV(PD0) & ~_BV(PD4) & ~_BV(PD5) ;conv_segmen(angka2);break;}case 3 :{ conv_segmen(10);PORTD |= _BV(PD4);PORTD &= ~_BV(PD1) & ~_BV(PD0) & ~_BV(PD5) ;conv_segmen(angka3);break;}case 4 :{ conv_segmen(10);PORTD |= _BV(PD5);PORTD &= ~_BV(PD1) & ~_BV(PD4) & ~_BV(PD0) ;conv_segmen(angka4);segstep=0;break;}}}SIGNAL (SIG_INT0){number++;}void tombol(void){cli();conv_segmen(10);
sei();kalibrasi++;if (kalibrasi == 6) kalibrasi=1;eeprom_write_byte((uint8_t*)10, kalibrasi);_delay_ms(200);
DDRD &= ~_BV(PD3) ; // tombol}void baca_eeprom(void){kalibrasi = eeprom_read_byte((uint8_t*)10);if(kalibrasi == 0xFF) kalibrasi=3;}int main(void){GIMSK |= (1<<INT0);MCUCR |= (1<<ISC01)| (1<<ISC11); //fall edgeDDRD |= _BV(PD0) | _BV(PD1) | _BV(PD4) | _BV(PD5) ; // seg select
if(bit_is_clear(PIND, PD3) )DDRB |= _BV(PB0) | _BV(PB1) | _BV(PB2) | _BV(PB3) | _BV(PB4) | _BV(PB5) | _BV(PB6) ; // seg a,b,c,d,e,f,ginit_ctr();init_ctr1();baca_eeprom();sei();while(1){
}}
//==========LONENLY PAKMAN=======// by : ahocool@gmail.com// http://aisi555.blogspot.com//=========== 2012 ===============#define F_CPU 20000000UL //xtal yg digunakan#include <avr/io.h>#include <util/delay.h>#include <avr/interrupt.h>#include <avr/pgmspace.h>#define HSYNC PORTB=0; //H sinkronisasi#define BLACK PORTB=1; // warna hitem
//deklarasi variableuint8_t textnya,pakline,arah;static uint16_t x,y,tick;char pakman1[12] = // memory penyimapan data gambar pakman{ //kanan mangap0b00000000,0b01111100,0b11001100,0b11001000,0b11110000,0b11100000,0b11000000,0b11100000,0b11110000,0b11111000,0b01111100,0b00000000,};char pakman2[12] ={ //kanan mingkem0b00000000,0b01111100,0b11001110,0b11001110,0b11111110,0b11111110,0b11111110,0b11111110,0b11000000,0b11111110,0b01111100,0b00000000,};char pakman3[12] ={ //kiri mangap0b00000000,0b01111100,0b01100110,0b00100110,0b00011110,0b00001110,0b00000110,0b00001110,0b00011110,0b00111110,0b01111100,0b00000000,};char pakman4[12] ={ //kiri mingkem0b00000000,0b00111100,0b01100110,0b01100110,0b01111110,0b01111110,0b01111110,0b01111110,0b00000110,0b01111110,0b00111100,0b00000000,};char pakman5[12] ={ //bawah mangap0b00000000,0b01111100,0b11111110,0b11110010,0b11110010,0b11001110,0b11001110,0b11000010,0b10000010,0b10000010,0b10000010,0b00000000,};char pakman6[12] ={ //bawah mingkem0b00000000,0b01111100,0b11111110,0b11110010,0b11110010,0b11111110,0b10111110,0b10111110,0b10111110,0b10111110,0b10111100,0b00000000,};char pakman7[12] ={ //atas mangap0b00000000,0b10000010,0b10000110,0b10000110,0b10000110,0b11011110,0b10110010,0b11110010,0b11111110,0b01111100,0b00000000,};char pakman8[12] ={ //atas mingkem0b00000000,0b10111100,0b10111110,0b10111110,0b10111110,0b10111110,0b11110010,0b11110010,0b11111110,0b01111100,0b00000000,};void timer_init(void){//inisialisasi timer per rasterline 64us (PAL TV)TCCR1B |= (1<<WGM12);TIMSK |= (1<<OCIE1A);OCR1A = 1280; //64 us dengan xtal 20Mhz, untuk 16Mhz= 1024;TCCR1B |= (1<<CS10); //full speed}//interupt timer untuk menampilkan gambarISR (TIMER1_COMPA_vect) {static uint16_t rasterline=0; //barisuint16_t a;uint8_t out=0; // variabel simpan memory byte pakmanHSYNC;//posisi berdasarkan nilai x,y dengan lebar 12 barisif( rasterline > (18 + y) && rasterline <= (30 +y) ) {_delay_us(4);BLACK;_delay_us(7);for(a=0;a<x;a++) asm("nop");// tampilkan sesuai arah dari pakmanif(arah==0){if(tick<5000)out= pakman1[pakline];else out= pakman2[pakline];}else if(arah==1){if(tick<5000)out= pakman3[pakline];else out= pakman4[pakline];}if(arah==2){if(tick<5000)out= pakman5[pakline];else out= pakman6[pakline];}if(arah==3){if(tick<5000)out= pakman7[pakline];else out= pakman8[pakline];}//geser bit untuk tampilkan data gambar ke pakman ke TVPORTB= (out & 0x81) + 1;out <<=1;PORTB= (out & 0x81) + 1;out <<=1;PORTB= (out & 0x81) + 1;out <<=1;PORTB= (out & 0x81) + 1;out <<=1;PORTB= (out & 0x81) + 1;out <<=1;PORTB= (out & 0x81) + 1;out <<=1;PORTB= (out & 0x81) + 1;out <<=1;PORTB= (out & 0x81) + 1;pakline++; //tambahkan index array dari gambar pakman}// Vsync ada disini tanpa membedakan genap ganjilelse if( rasterline >= 0 && rasterline < 5 ) {_delay_us(27);BLACK;_delay_us(5);HSYNC;_delay_us(27);BLACK;} else if( (rasterline >= 5 && rasterline <= 10) ) {_delay_us(2);BLACK;_delay_us(28);HSYNC;_delay_us(2);BLACK;} else if( rasterline >311-6 ) {_delay_us(2);BLACK;_delay_us(28);HSYNC;_delay_us(2);BLACK;} else {_delay_us(3);BLACK;pakline=0;}rasterline++;tick++; //variabel timer untuk mangap & mingkemif(tick >10000) tick=0;if( rasterline > 311 )rasterline = 0; //maksimum baris/raster}void tombol(void) // membaca tombol{if(bit_is_clear(PIND, PIND3)){x--;arah=1;if(x<1)x=125;_delay_ms(50);}else if(bit_is_clear(PIND, PIND4)){x++;arah=0;if(x>125)x=1;_delay_ms(50);}else if(bit_is_clear(PIND, PIND5)){y-=3;arah=3;if(y<3)y=280;_delay_ms(50);}else if(bit_is_clear(PIND, PIND6)){y+=3;arah=2;if(y>280)y=0;_delay_ms(50);}}int main() { //Main Programx=1;y=13;arah=0;DDRD &=~(1<<PD3) & ~(1<<PD4) & ~(1<<PD5) & ~(1<<PD6); //tombolDDRB = (1<<PB7)|(1<<PB0); //PB0=1K, PB7=470 ohmtimer_init();sei();for( ;; )tombol();}