Projet

Général

Profil

« Précédent | Suivant » 

Révision 783

Ajouté par Abdou FAYE il y a presque 4 ans

fin tp SPc1

Voir les différences:

branch/faye/sp4c12/SP4c1/SP4c1/SessionM32C_E8a_SYSTEM.ini
Renesas Communications=USB interface,0,
[Target]
M32C E8a SYSTEM=Renesas Communications
[USER_DATA]
RESET=fe0000
branch/faye/sp4c12/SP4c1/SP4c1/SP4c1.c
/* This file is generated by Renesas Project Generator (Ver.4.18). */
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
/***********************************************************************/
#include "sfr32c87.h"
void uart0_init(void) ;
void uart0_tx(char c);
void uart0_init()
// initialisation du port serie
void main()
{
registre u0mr
uart0_init();
while(1)
{
uart0_tx('a');
}
}
void uart0_init(void)
// initialisation du port serie
{
//registre u0mr
smd0_u0mr = 1;
smd1_u0mr = 0;
smd2_u0mr = 1;
......
u0brg = 64;
// registre u0c0
clk0_u0c0 = 1;
clk1_u0c0 = 0;
crs_u0c0 = 1;
crd_u0c0 = 1;
nch_u0c0 = 0;
ckpol_u0c0 = 0;
uform_u0c0 = 0;
u0c0 = 0x00;
// registre u0c1
te_u0c1 = 1;
re_u0c1 = 1;
u0rrm_u0c1 = 0;
u0lch_u0c1 = 0;
sclkstpb_u0c1 = 0;
u0c1 = 0x05;
pd6_3 = 1;
pd6_2 = 0;
ps0_3 = 1;
ps0_2 = 0;
}
void uart0_tx(char c) //envoi d'un caractere liaison serie
{
while(!ti_u0c1); //attente liaison
u0tb = c;
}

Formats disponibles : Unified diff