پاسخ : پروژه کامل ریموت 4 کاناله رادیویی ASK لرنینگ
کسایی که ساختن یا میدونن خواهشا کمکم کنن
کسایی که ساختن یا میدونن خواهشا کمکم کنن
if(level1 >= level0)
{
if(index < 8)
set(d_in[0],7-index);
else if(index < 16)
set(d_in[1],7-(index-8));
else if(index < 20)
set(d_in[2],7-(index-16));
else
set(d_in[3],7-(index-16)); :question:
index++;
}
set(d_in[2],7-(index-16));
else
set(d_in[3],7-(index-16));
7-(index-16
set(d_in[2]
set(d_in[3]
d_in[3]
set(d_in[3],7-(index-24));
if((level0 / level1) > 5 && !f_start)
{
f_start = 1;
:question: if(level1 > 4 && index == 23)set(d_in[3],0);
index = 0;
f_bit = 0;
if((d_in[0] > 0 ||
d_in[1] > 0 ||
d_in[2] > 0 ||
d_in[3] > 0)&&
d_remut[0] == d_in[0] &&
d_remut[1] == d_in[1] &&
d_remut[2] == d_in[2] &&
بعدش در ادامه این زیر مقدار صفر d_in[3 رو با d_remut[3] برابر باشه
d_remut[3] == d_in[3]) :question:
{
f_read = 1;
}
d_remut[0] = d_in[0];
d_remut[1] = d_in[1];
d_remut[2] = d_in[2];
-------------------------------------------------------
3:
در ادامه چه مقداری داخل d_remut[3] واریز میشه؟؟؟؟؟
d_remut[3] = d_in[3]; :question:
d_in[0] = 0;
d_in[1] = 0;
d_in[2] = 0;
d_in[3] = 0;
}
else if(KEY == ON_ERASE && d_key > 150)
{
KEY = ALL_ERASE;
n_remut = 0;
delay_ms(10);
for(i=0;i<n_eeprom;i++)
{
d_ee[i][0] = 0;
delay_ms(10);
d_ee[i][1] = 0;
delay_ms(10);
d_ee[i][2] = 0; :question:
delay_ms(10);
}
if(f_read)
{
f_read = 0;
//if(!PIND.7)printf("%u %u %u %u\n\r",d_remut[0],d_remut[1],d_remut[2],d_remut[3]);
if(d_remut[0] == crc_in[0] && d_remut[1] == crc_in[1] && d_remut[2] == crc_in[2] && d_remut[3] == crc_in[3]) :question:
{
d_crc++;
d_clar = 0;
for(i=0;i<n_remut;i++)
{
if(d_remut[0] == d_ee[i][0] && d_remut[1] == d_ee[i][1] && d_remut[2] == d_ee[i][2])
{
remut = d_remut[3]; :question:
}
}
}
if(!f_ok && n_remut < n_eeprom)
{
n_remut++;
delay_ms(10);
if(n_remut == 1)
{
t_remut = d_remut[3]; :question:
delay_ms(10);
}
if(!f_ok && n_remut < n_eeprom)
{
n_remut++;
delay_ms(10);
if(n_remut == 1)
{
t_remut = d_remut[3];
delay_ms(10);
}
d_ee[n_remut-1][0] = d_remut[0];
delay_ms(10);
d_ee[n_remut-1][1] = d_remut[1];
delay_ms(10);
d_ee[n_remut-1][2] = d_remut[2]; :question:
delay_ms(10);
}
الان توی میکرو تونستم کلید های این ریموت را بخونم .bit f_read,f_write,f_set,f_on_erase,f_all_erase,f_remut,f_ok; char us,index,d_crc,x_remut,d_time; char d_in[4],crc_in[4]; int d_clar,d_key,remut,d_led,clar_kay,i; eeprom char e_n_remut,e_d_ee[n_eeprom][3];
دیدگاه