ログインしてさらにmixiを楽しもう

コメントを投稿して情報交換!
更新通知を受け取って、最新情報をゲット!

タカラトミー☆コミュの5月30日

  • mixiチェック
  • このエントリーをはてなブックマークに追加
点灯するプログラム

#include<pic1684.h>

main(){
int i;
TRISB=0x00;
PORTB=0x00;
i=0;

while(i<10000){
RB0=1;
i=i+1;
}
i=0;
while(i<10000){
RB0=0;
i=i+1;
}
}

コメント(6)

#include<pic1684.h>

void bacch(){
long int i,k;
for(i=0;i<32000;i++){
for(k=0;k<32000;k++){
}
}
}

main(){

TRISB=0x00;
PORTB=0x00;
while(1){
RB0=1;
bacch();
RB0=1;
bacch();

}
}
#include<pic1684.h>

main(){
TRISA=0x0F;
TRISB=0x00;
PORTA=0x00;
PORTB=0x00;
while(1){

if(RA0==1) RB0=1;
else RB0=0;
if(RA1==1) RB1=1;
else RB1=0;
if(RA2==1) RB2=1;
else RB2=0;
if(RA3==1) RB3=1;
else RB3=0;
if(RA4==1) RB4=1;
else RB4=0;
}
}

RA0=1 RB0=1

RA1= RB1=1

RA2=1 RB2=1

RA3=1 RB3=1

RA=1 RB4=1
#include<pic1684.h>
#define NUM 200
void stop(){
for(long int n = 0;n < NUM;n++){
}
}
main(){
TRISA=0x00;
TRISB=0x00;
PORTA=0x00;
PORTB=0x00;

int num=100;
int i=0;
while(1){

while(i<2){
stop();
}
i=0;

while(i<num){
PORTA = 0x0F;
RA4 = 1;
PORTB = 0x0F;
RB4 = 1;
i++;
}
i=0;

while(i<num*3){
RA4=1;
i++;
}
i=0;

while(i<num){
PORTA = 0x0F;
RA4=1;
PORTB = 0x0F;
RB4=1;
i++;
}

stop();

while(i<num){
PORTA = 0x0F;
RA4=1;
PORTB = 0x0F;
RB4=1;
i++;
}
i=0;

while(i<num*3){
RA0=1;
RB4=1;
i++;
}
i=0;

while(i<num){
PORTA = 0x0F;
RA4=1;
PORTB = 0x0F;
RB4=1;
i++;
}
i=0;

stop();

while(i<num){
RA0=1;
RB4=1;
i++;
}
i=0;

while(i<num){
PORTA = 0x0F;
RA4=1;
PORTB = 0x0F;
RB4=1;
i++;
}
i=0;

while(i<num){
RA0=1;
RB4=1;
i++;
}
i=0;

stop();


while(i<num){
PORTA = 0x0F;
RA4=1;
PORTB = 0x0F;
RB4=1;
i++;
}
i=0;

while(i<num*3){
RA0=1;
RB4=1;
i++;
}
i=0;

while(i<num){
PORTA = 0x0F;
RA4=1;
PORTB = 0x0F;
RB4=1;
i++;
}
i=0;

stop();

while(i<num){
PORTA = 0x0F;
RA4 = 1;
PORTB = 0x0F;
RB4 = 1;
i++;
}
i=0;

while(i<num*3){
RA4=1;
i++;
}
i=0;

while(i<num){
PORTA = 0x0F;
RA4=1;
PORTB = 0x0F;
RB4=1;
i++;
}
i=0;

while(i<2){
stop();
}
i=0;

}

}


43210のやつだよー


#include<pic1684.h>

void wait(){

long int k;
for(k=0;k<1000;k++){

}
}


main(){
TRISA=0x00;
PORTA=0x00;
TRISB=0x00;
PORTB=0x00;
while(1){
PORTA=0x00;
PORTB=0x1F;
wait();
PORTA=0x00;
PORTB=0x10;
wait();
wait();
wait();
PORTA=0x0C;
PORTB=0xFF;
wait();
PORTA=0x00;
PORTB=0x00;
wait();
PORTA=0x08;
PORTB=0x11;
wait();
wait();
wait();
wait();
PORTA=0x0C;
PORTB=0xFF;
wait();
PORTA=0x00;
PORTB=0x00;
wait();
PORTA=0x0C;
PORTB=0xF1;
wait();
PORTA=0x08;
PORTB=0x11;
wait();
wait();
wait();
PORTA=0x08;
PORTB=0x1F;
wait();
PORTA=0x00;
PORTB=0x00;
wait();
PORTA=0x0C;
PORTB=0xFF;
wait();
wait();
wait();
wait();
wait();
PORTA=0x00;
PORTB=0x00;
wait();
PORTA=0x0C;
PORTB=0xFF;
wait();
PORTA=0x08;
PORTB=0x01;
wait();
wait();
wait();
PORTA=0x0C;
PORTB=0xFF;
wait();
PORTA=0x00;
PORTB=0x00;
wait();
wait();


}
}

ログインすると、みんなのコメントがもっと見れるよ

mixiユーザー
ログインしてコメントしよう!

タカラトミー☆ 更新情報

タカラトミー☆のメンバーはこんなコミュニティにも参加しています

星印の数は、共通して参加しているメンバーが多いほど増えます。