Semua Tentang Belajar Teknologi Digital Dalam Kehidupan Sehari - Hari

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 Penulis



12179018.png (60×60)
+628155737755

Mail : ahocool@gmail.com

Site View

Categories

555 (8) 7 segmen (3) adc (4) amplifier (2) analog (19) android (14) antares (11) arduino (28) artikel (11) attiny (3) attiny2313 (19) audio (5) baterai (5) blog (1) bluetooth (1) chatgpt (2) cmos (2) crypto (2) dasar (46) digital (11) dimmer (5) display (3) esp8266 (26) euro2020 (13) gcc (1) gsm (1) iklan (1) infrared (2) Input Output (3) iot (76) jam (7) jualan (12) kereta api (1) keyboard (1) keypad (3) kios pulsa (2) kit (6) komponen (17) komputer (3) komunikasi (1) kontrol (8) lain-lain (8) lcd (2) led (14) led matrix (6) line tracer (1) lm35 (1) lora (11) lorawan (2) MATV (1) memory (1) metal detector (4) microcontroller (70) micropython (6) mikrokontroler (2) mikrokontroller (14) mikrotik (5) modbus (9) mqtt (3) ninmedia (5) ntp (1) paket belajar (19) palang pintu otomatis (1) parabola (88) pcb (2) power (1) praktek (2) project (33) proyek (1) python (8) radio (28) raspberry pi (9) remote (1) revisi (1) rfid (1) robot (1) rpm (2) rs232 (1) script break down (3) sdcard (3) sensor (2) sharing (3) signage (1) sinyal (1) sms (6) software (18) solar (1) solusi (1) tachometer (2) technology (1) teknologi (2) telegram (2) telepon (9) televisi (167) television (28) telkomiot (5) transistor (2) troubleshoot (3) tulisan (94) tutorial (108) tv digital (6) tvri (2) vu meter (2) vumeter (2) wav player (3) wayang (1) wifi (3) yolo (7)

Arsip Blog

Diskusi


kaskus
Forum Hobby Elektronika