Projet

Général

Profil

« Précédent | Suivant » 

Révision 829

Ajouté par mukis il y a presque 4 ans

UART0 - Affiche de l'alphabet en boucle

Voir les différences:

branch/KIS/sp4c12/Uart/Uart/SessionM32C_E8a_SYSTEM.ini
[Target]
M32C E8a SYSTEM=Renesas Communications
[USER_DATA]
RESET=fe0000
RESET=fe0002
branch/KIS/sp4c12/Uart/Uart/Uart.c
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
/***********************************************************************/
#include "sfr32c87.h"
#pragma INTERRUPT 18 irectrame
void uart0_init(void);
void uart0_tx(char c);
//char uart0_rx(void);
int trame_OK=0;
void main(void)
{
char lettre;
int i=0;
uart0_init();
while(1)
{
uart0_tx('c');
for(lettre='A';lettre<='Z';(int)lettre++ )
{
uart0_tx(lettre);
for (i=0; i<10000; i++)
{
}
}
}
}
void uart0_init(void)
{
pd6_1=0;
pd6_2=0;
ps0_1=0;
......
te_u0c1=1;
u0tb =c;
te_u0c1=0;
}
}
/*char uart0_rx(void)
{
}*/

Formats disponibles : Unified diff