"Kembali Ke Dasar Elektronika Digital ... "

Jumat, 07 Juni 2013

Tutorial: POV TEXT Sederhana



Yang mau belajar tentang POV... nih ane share, tapi yang model paling sederhana dulu ya...
Jadi startnya masih ngaco karena ga ada semacam sensor penanda posisi motor
tapi lumayan lah buat start pemula....

Sebelumnya kita perlu tau prinsip POV,sebenernya sama dengan prinsip scanning led matrix, dimana tiap byte dari baris dikeluarkan satu persatu berdasarkan periode waktu. Karena led ini bergerak (dalam hal ini berputar) maka kelembaman mata akan menyebabkan efek terlihatnya teks. Seperti pada video berikut ini :






Video diatas merupakan dasar POV yang cukup sederhana yang tidak memiliki sensor penanda awal posisi motor dan deretan led, sehingga efek yang muncul adalah tulisan yang tidak diam alias ikut muter. Sensor yang mungkin dipakai adalah Opto sensor atau magnetic-hall efect sensor. Sensor ini nantinya akan mentrigger interupt yang akan menandai titik referensi awal dari motor.


0307feat2fig1.gif (410×433)



Hall_sensor_tach.gif (274×204)
Sensor Opto dan Magnetic (Hall Effect)





skematiknya ini ya ...



scriptnya ga jauh beda dengan praktek LOVEHURT kok ...


#define F_CPU 1000000UL

#include <avr/io.h>

#include <util/delay.h>

#include <avr/eeprom.h>

#include <inttypes.h>

#include <avr/interrupt.h>

#include <avr/pgmspace.h> 

#include <string.h>



//database Huruf

const char h_A[5] PROGMEM = {0x7e, 0x11, 0x11, 0x11, 0x7e}; //A

const char h_B[5] PROGMEM = {0x7f, 0x49, 0x49, 0x49, 0x36}; //B

const char h_C[5] PROGMEM = {0x3e, 0x41, 0x41, 0x41, 0x22}; //C

const char h_D[5] PROGMEM = {0x7f, 0x41, 0x41, 0x22, 0x1c}; //D

const char h_E[5] PROGMEM = {0x7f, 0x49, 0x49, 0x49, 0x41}; //E

const char h_F[5] PROGMEM = {0x7f, 0x09, 0x09, 0x09, 0x01}; //F

const char h_G[5] PROGMEM = {0x3e, 0x41, 0x49, 0x49, 0x7a}; //G

const char h_H[5] PROGMEM = {0x7f, 0x08, 0x08, 0x08, 0x7f}; //H

const char h_I[5] PROGMEM = {0x80, 0x41, 0x7f, 0x41, 0x80};//I

const char h_J[5] PROGMEM = {0x20, 0x40, 0x41, 0x3f, 0x01}; //J

const char h_K[5] PROGMEM = {0x7f, 0x08, 0x14, 0x22, 0x41}; //K

const char h_L[5] PROGMEM = {0x7f, 0x40, 0x40, 0x40, 0x40}; //L

const char h_M[5] PROGMEM = {0x7f, 0x02, 0x04, 0x02, 0x7f}; //M

const char h_N[5] PROGMEM = {0x7f, 0x04, 0x08, 0x10, 0x7f}; //N

const char h_O[5] PROGMEM = {0x3e, 0x41, 0x41, 0x41, 0x3e}; //O

const char h_P[5] PROGMEM = {0x7f, 0x11, 0x11, 0x11, 0x0e}; //P

const char h_Q[5] PROGMEM = {0x3e, 0x41, 0x51, 0x21, 0x5e}; //Q

const char h_R[5] PROGMEM = {0x7f, 0x09, 0x19, 0x29, 0x46}; //R

const char h_S[5] PROGMEM = {0x46, 0x49, 0x49, 0x49, 0x31}; //S

const char h_T[5] PROGMEM = {0x01, 0x01, 0x7f, 0x01, 0x01}; //T

const char h_U[5] PROGMEM = {0x3f, 0x40, 0x40, 0x40, 0x3f}; //U

const char h_V[5] PROGMEM = {0x1f, 0x20, 0x40, 0x20, 0x1f}; //V

const char h_W[5] PROGMEM = {0x3f, 0x40, 0x38, 0x40, 0x3f}; //W

const char h_X[5] PROGMEM = {0x63, 0x14, 0x08, 0x14, 0x63}; //X

const char h_Y[5] PROGMEM = {0x07, 0x08, 0x70, 0x08, 0x07}; //Y

const char h_Z[5] PROGMEM = {0x61, 0x51, 0x49, 0x45, 0x43}; //Z

const char h_27[5] PROGMEM = {0x32, 0x49, 0x79, 0x41, 0x3f}; //@

const char h_28[5] PROGMEM = {0x02, 0x01, 0x51, 0x09, 0x06}; //?

const char h_29[5] PROGMEM = {0x80, 0x80, 0x5f, 0x80, 0x80}; //!

const char h_30[5] PROGMEM = {0x3e, 0x51, 0x49, 0x45, 0x3e}; //0

const char h_31[5] PROGMEM = {0x80, 0x42, 0x7f, 0x40, 0x80}; //1

const char h_32[5] PROGMEM = {0x42, 0x61, 0x51, 0x49, 0x46}; //2

const char h_33[5] PROGMEM = {0x41, 0x41, 0x45, 0x4b, 0x31}; //3

const char h_34[5] PROGMEM = {0x18, 0x14, 0x12, 0x7f, 0x10}; //4

const char h_35[5] PROGMEM = {0x27, 0x45, 0x45, 0x45, 0x39}; //5

const char h_36[5] PROGMEM = {0x3c, 0x4a, 0x49, 0x49, 0x31}; //6

const char h_37[5] PROGMEM = {0x01, 0x71, 0x09, 0x05, 0x03}; //7

const char h_38[5] PROGMEM = {0x36, 0x49, 0x49, 0x49, 0x36}; //8

const char h_39[5] PROGMEM = {0x06, 0x49, 0x49, 0x29, 0x1e}; //9

const char h_40[5] PROGMEM = {0x80, 0x60, 0x60, 0x80, 0x80}; //dot

const char h_41[5] PROGMEM = {0x20, 0x10, 0x08, 0x04, 0x02}; //slash

const char h_42[5] PROGMEM = {0x08, 0x08, 0x08, 0x08, 0x08}; //-

const char h_43[5] PROGMEM = {0x80, 0x80, 0x80, 0x80, 0x80}; //blank

const char h_44[5] PROGMEM = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; //end



char charnya[5];



void tulis(void)



{



int a;



for(a=0 ; a<5 ;a++)

 { 

   PORTD = charnya[a] ;

   _delay_ms(2);



 }





PORTD = 0x80 ;

_delay_ms(2);

}







int main(void)

{
    DDRD = 0b1111111; // PD0-PD6 output

 while(1)

 {

//ubah susunan huruf sesuai keinginan (asal ga penuh aja memorynya)



     strncpy_P(charnya,h_A,5);

  tulis();



  strncpy_P(charnya,h_H,5);

  tulis();



  strncpy_P(charnya,h_O,5);

  tulis();



         strncpy_P(charnya,h_C,5);

  tulis();



  strncpy_P(charnya,h_O,5);

  tulis();



  strncpy_P(charnya,h_O,5);

  tulis();



  strncpy_P(charnya,h_L,5);

  tulis();



     _delay_ms(500);  //ubah2 sesuai keinginan dan kecepatan motor

 }

 

return 0;

}









lumayan kan ? skematik dalam bentuk eagle dapat didownload disini
Share:

3 komentar:

  1. maksimal berapa karakter gan bisa nampil?

    BalasHapus
  2. kalau pakai sensor supaya stabil gimana skema dan kodenya?

    BalasHapus
  3. Kak, saya mau coba membuat seperti ini
    dimana bisa beli KIT nya, dan kira kira habis berapa ?

    Terima kasih,
    balas ya kak,

    email : alayyubi.aswad@gmail.com

    BalasHapus

Kontak Langsung



12179018.png (60×60)
+628155737755

HP: 081331339072
Mail : ahocool@gmail.com

ANTI SPAM !



Blog Ini Mendukung Blogger Indonesia Yang Jujur dan Memberikan Informasi Sebenarnya, Bukan Menyampah Demi $Rp$ Yang Hanya Merendahkan Blogger Indonesia

Site View

Categories

555 (6) 7 segmen (3) adc (3) amplifier (1) analog (9) android (11) attiny (1) attiny2313 (16) blog (1) bluetooth (1) cmos (1) dasar (31) display (2) gcc (1) infrared (2) Input Output (3) jam (6) jualan (10) kereta api (1) keyboard (1) keypad (3) kios pulsa (2) kit (6) komponen (9) komputer (3) komunikasi (1) kontrol (2) lain-lain (8) lcd (2) led (9) led matrix (6) line tracer (1) lm35 (1) memory (1) metal detector (4) microcontroller (48) mikrokontroller (1) mikrotik (4) paket belajar (19) palang pintu otomatis (1) pcb (2) project (33) proyek (1) radio (3) remote (1) revisi (1) rfid (1) robot (1) rpm (2) rs232 (1) script break down (3) sdcard (3) sensor (1) sharing (2) sms (5) software (16) tachometer (2) telepon (7) televisi (16) transistor (1) troubleshoot (3) tulisan (34) tutorial (67) vu meter (1) vumeter (1) wav player (3) wayang (1) wifi (1)

Diskusi


kaskus
Forum Hobby Elektronika