/*---------------------------------------------------------------------------------------------------------*/
/* */
/* Copyright(c) 2014 Nuvoton Technology Corp. All rights reserved. */
/* */
/*---------------------------------------------------------------------------------------------------------*/
//***********************************************************************************************************
// Nuvoton Technology Corp.
// Date: 23/Jan/2014
// E-Mail: [email protected]
//***********************************************************************************************************
// Application: GPIO Sample Code
//
// Output : P1.4 & P2.1 toggle
//***********************************************************************************************************
//------------------------- <<< Use Configuration Wizard in Context Menu >>> --------------------------------
// <h> UART pin Select
// <o0.6> UART pin
// <0=> Select P1.0, P1.1 as UART pin(default)
// <1=> Select P2.6, P2.7 as UART pin(28 pin only)
// </h>
//-------------------------------- <<< end of configuration section >>> -------------------------------------
#define Uart_Port_Sel 0x00
#include <stdio.h>
#include "N79E81x.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 @ 11.0592MHz
Show_Version_Number_To_PC();
printf ("\n*===================================================================");
printf ("\n* Name: N79E81x Series GPIO Sample Code.");
printf ("\n*===================================================================");
TMOD |= 0x01;
while(1)
{
P14 = 0;
P21 = 0;
Delay1ms(100);
P14 = 1;
P21 = 1;
Delay1ms(100);
}
}
//-----------------------------------------------------------------------------------------------------------