我的第一个POV
哈哈,如期完成我的第一个POV。比我预想的要漂亮好多啊~~这次真是如有神助。盒子改装,钻孔,装配,都很顺利,最怕的钻孔,做得很让我满意,哈哈。
赶快发几张照片,因为一只手甩POV一只手拿照相机所以视频不太清晰,后面会再补发一个(已经重新发布比较清晰的视频)。
[hana-flv-player video="/my-files/video/S3020688.flv"/]
哈哈,佩服自己的手工啊。
刚刚忘记贴了,这是现在的程序:
//ICC-AVR application builder : 2007-9-29 22:46:39 // Target : M8 // Crystal: 1.0000Mhz #include <iom8v.h> #include <macros.h> void port_init(void) { PORTB = 0xFF; DDRB = 0xFF; PORTC = 0xFF; //m103 output only DDRC = 0xFF; PORTD = 0xFF; DDRD = 0xFF; } //call this routine to initialize all peripherals void init_devices(void) { //stop errant interrupts until set up CLI(); //disable all interrupts port_init(); MCUCR = 0x00; GICR = 0x00; TIMSK = 0x00; //timer interrupt sources //SFIOR &= 0b11111011; SEI(); //re-enable interrupts //all peripherals are now initialized } void delay(void) { unsigned char i, j; for(i=8; i>0; i--) for(j=8; j>0; j--); } const unsigned char bitmap[] = { 0b11110111, 0b10000111, 0b01111111, 0b01111111, 0b10110111, 0b00000111, 0b01111111, 0b01110111, 0b00000111, 0b01101111, 0b11110111, 0b01110111, 0b00001111, 0b01111111, 0b01111101, 0b00000001, 0b01101111, 0b01110111, 0b01110111, 0b10001111, 0b11111111, 0b11111111, 0b10001111, 0b01010111, 0b01010111, 0b01010111, 0b01001111, 0b11111111, 0b11111111, 0b11111111, 0b00111111, 0b00111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b10001111, 0b01110111, 0b01110111, 0b01110111, 0b01100111, 0b11111111, 0b01110111, 0b00000111, 0b01101111, 0b11110111, 0b01110111, 0b00001111, 0b01111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111, 0b11111111 }; void main(void) { int i=0; init_devices(); while(1) { PORTD = bitmap[i]; i = i == 55 ? 0 : i+1; delay(); } }