/*---------------------------------------------------------------------------------------------------------*/
/* */
/* Copyright(c) 2015 Nuvoton Technology Corp. All rights reserved. */
/* */
/*---------------------------------------------------------------------------------------------------------*/
//***********************************************************************************************************
// Nuvoton Technology Corp.
// E-mail: MicroC-8bit@nuvoton.com
//***********************************************************************************************************
// Application: GPIO Sample Code
//
// Output : P1.4 & P2.1 toggle
//***********************************************************************************************************
//------------------------- <<< Use Configuration Wizard in Context Menu >>> --------------------------------
// <o0.6> UART pin Select
// <0=> Select P1.0, P1.1 as UART pin(default)
// <1=> Select P2.6, P2.7 as UART pin(28 pin only)
//-------------------------------- <<< end of configuration section >>> -------------------------------------
#define Uart_Port_Sel 0x00
#include <stdio.h>
#include "N79E715.h"
#include "Typedef.h"
#include "Define.h"
#include "Common.h"
#include "Delay.h"
#include "Version.h"
//-----------------------------------------------------------------------------------------------------------
void main(void)
{
AUXR1 |= Uart_Port_Sel; // Select P10/P11 as UART pin(default)
InitialUART0_Timer1(9600); // 9600 Baud Rate [url=home.php?mod=space&uid=72445]@[/url] 11.0592MHz
Show_Version_Number_To_PC();
printf ("\n*===================================================================");
printf ("\n* Name: N79E715 Series GPIO Sample Code.");
printf ("\n*===================================================================");
while(1)
{
P14 = 0;
P21 = 0;
Delay1ms(100);
P14 = 1;
P21 = 1;
Delay1ms(100);
}
}
//-----------------------------------------------------------------------------------------------------------
|