catharsisll
Üye
- Katılım
- 14 Tem 2007
- Mesajlar
- 67
- Puanları
- 1
void main()
{
set_tris_b(0x00);
set_tris_c(0x00);
set_tris_d(0x00);
output_b(0x00);
output_c(0x00);
output_d(0x00);
do{
output_b(0xff);
output_c(0xff);
output_d(0xff);
delay_ms(500);
output_b(0x00);
output_c(0x00);
output_d(0x00);
delay_ms(500);
output_b(0xff);
output_c(0xff);
output_d(0xff);
delay_ms(500);
output_b(0x00);
output_c(0x00);
output_d(0x00);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_c7)
delay_ms(500);
output_low(pin_c7);
output_high(pin_d0);
delay_ms(500);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(500);
output_low(pin_d1);
output_high(pin_d2);
delay_ms(500);
output_low(pin_d2);
output_high(pin_d3);
delay_ms(500);
output_low(pin_d3);
output_high(pin_d4);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_d0);
delay_ms(500);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(500);
output_low(pin_d1);
output_high(pin_d2);
delay_ms(500);
output_low(pin_d2);
output_high(pin_d3);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_d0);
delay_ms(500);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(500);
output_low(pin_d1);
output_high(pin_d2);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_d0);
delay_ms(500);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(500);
output_low(pin_d1);
output_high(pin_d2);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_d0);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
}while(1);
}
#include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=20000000)
//========================
void a();
void b();
void c();
void d();
void main()
{
set_tris_b(0x00);
set_tris_c(0x00);
set_tris_d(0x00);
output_b(0x00);
output_c(0x00);
output_d(0x00);
do{
a();
b();
c();
d();
}while(1);
}
void a()
{
output_b(0xff);
output_c(0xff);
output_d(0xff);
delay_ms(500);
output_b(0x00);
output_c(0x00);
output_d(0x00);
delay_ms(500);
output_b(0xff);
output_c(0xff);
output_d(0xff);
delay_ms(500);
output_b(0x00);
output_c(0x00);
output_d(0x00);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_c7);
delay_ms(500);
output_low(pin_c7);
output_high(pin_d0);
delay_ms(500);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(500);
output_low(pin_d1);
output_high(pin_d2);
delay_ms(500);
output_low(pin_d2);
output_high(pin_d3);
delay_ms(500);
output_low(pin_d3);
output_high(pin_d4);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_d0);
delay_ms(500);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(500);
output_low(pin_d1);
output_high(pin_d2);
delay_ms(500);
output_low(pin_d2);
output_high(pin_d3);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_d0);
delay_ms(500);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(500);
output_low(pin_d1);
output_high(pin_d2);
delay_ms(500);
}
void b()
{
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_d0);
delay_ms(500);
output_low(pin_d0);
output_high(pin_d1);
delay_ms(500);
output_low(pin_d1);
output_high(pin_d2);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_low(pin_c6);
output_high(pin_d0);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
}
void c()
{
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_low(pin_c5);
output_high(pin_c6);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_low(pin_c4);
output_high(pin_c5);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_low(pin_c3);
output_high(pin_c4);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_low(pin_c2);
output_high(pin_c3);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_low(pin_c1);
output_high(pin_c2);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
}
void d()
{
output_high(pin_c0);
delay_ms(500);
output_low(pin_c0);
output_high(pin_c1);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
delay_ms(500);
output_low(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_low(pin_b5);
output_high(pin_b6);
output_high(pin_c0);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_low(pin_b4);
output_high(pin_b5);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_low(pin_b3);
output_high(pin_b4);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_low(pin_b2);
output_high(pin_b3);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
output_low(pin_b1);
output_high(pin_b2);
delay_ms(500);
output_high(pin_b0);
delay_ms(500);
output_low(pin_b0);
output_high(pin_b1);
delay_ms(500);
}
Sürekli aynı kodları tekrarlayıp durmuşsun. Sadece çıkışlar değişiyor. kurduğun döngüde her seferinde komut yazmak yerine sadece çıkışarı değiştirecek değişken grubu tanımlamak daha kısa kod yazmanı sağlar ve değişiklik yapmak istediğinde kolaylık olur.
Bu programda tam olarak ne yapmak istiyorsun?
Kodları sadece main fonksiyonu içine değil, farklı fonksiyonlar halinde yazıp main'de sırayla çağırırsan hata vermez
Ayrıca bu şekilde asssembler'da yazar gibi yazacaksan c kullanmanın bir anlamı kalmıyor.
Harcadığın zamana yazık.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?