Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
void Reg_des (unsigned char bin) //FUNCION ANDA!!!!
{
unsigned char cnclk;
for(cnclk=0;cnclk<9;cnclk++) //Counter --> "9" is the number of cycles
{
RDDT=(bin>>cnclk) & 1; //RDDT is a pre-defined pin!! This line moves the 8-bit entered
//value one more time per cycle and gets the last bit
Delay(500); //Delay, it's made with another function
RDCLK=~RDCLK; //Sends clock to RDCLK --> PRE-defined pin.
RDCLK=~RDCLK;
Delay(500); //Generated by function, don't have to use.
}
Delay(500);
}
#define F_CPU 20000000UL
#include<avr/io.h>
#include<util/delay.h>
unsigned char seq[]={
0b11100001,
0b11111010,
0b11111010,
0b11111010,
0b11100001,
0b11111111,
0b11111111,
0b11100000,
0b11111011,
0b11110101,
0b11101110,
0b11111111,
};
int main()
{
DDRA=0xFF;
DDRB=0xFF;
PORTA=0;
PORTB=0;
int i,j,k;
while(1)
{
for( k=0;k<12;k++)
{
for( j=0;j<10;j++)
{
for(i=0;i<12;i++)
{
PORTA=(1<<i);
PORTB=~seq[i+k];
_delay_ms(0.03);
}}
}}
return 0;
}
#define F_CPU 20000000UL
#include<avr/io.h>
#include<util/delay.h>
unsigned char seq[]={
0b11100001,
0b11111010,
0b11111010,
0b11111010,
0b11100001,
0b11111111,
0b11111111,
0b11100000,
0b11111011,
0b11110101,
0b11101110,
0b11111111,
};
int main()
{
DDRA=0xFF;
DDRB=0xFF;
PORTA=0;
PORTB=0;
int i,j,k;
while(1)
{
for( k=0;k<12;k++)
{
for( j=0;j<10;j++)
{
for(i=0;i<12;i++)
{
PORTA=(1<<i);
PORTB=~seq[i+k];
_delay_ms(0.03);
}}
}}
return 0;
}