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 :
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