Projet

Général

Profil

« Précédent | Suivant » 

Révision 151

Ajouté par maantourou il y a plus de 6 ans

fonction position de la tourelle V

Voir les différences:

branch/Antourou/Emb_App/crt0mr.a30
; after reset,this program will start
;-----------------------------------------------------------------
__SYS_INITIAL:
LDC #__Sys_Sp,ISP ; set initial ISP
t LDC #__Sys_Sp,ISP ; set initial ISP
MOV.B #2,0AH
MOV.B #00,PMOD ; Set Processor Mode Register
branch/Antourou/Emb_App/programme_principal_etud.c
void main()
{
CanFrame comm;
CanFrame requete;
UINT flag;//FLGPTN flag
short position;
ports_mcu();
lcd_init();
periph_init();
......
comm.data.val=450;
snd_dtq (CanTx,comm.msg);
dly_tsk(100);
//Lecture de la position de la tourelle
requete.data.id='R';
// Lecture de la requ?te
requete.data.rtr=1;
periph[ADDR('R')].ev=0x01;
snd_dtq(CanTx,requete.msg);
wai_flg (ev_periph, 0x01, TWF_ANDW, &flag);
position=periph[ADDR('R')].val;
}
}
......
{
LED_V=!LED_V;
}

Formats disponibles : Unified diff