/*---------------------------------------------------------------------------------------------------------*/
/* */
/* Copyright(c) 2019 Nuvoton Technology Corp. All rights reserved. */
/* */
/*---------------------------------------------------------------------------------------------------------*/
//***********************************************************************************************************
// Website: http://www.nuvoton.com
// E-Mail : MicroC-8bit@nuvoton.com
//***********************************************************************************************************
#include "ML51.h"
/**
* [url=home.php?mod=space&uid=247401]@brief[/url] Read UCID function
* @param None
* [url=home.php?mod=space&uid=266161]@return[/url] None
* [url=home.php?mod=space&uid=1543424]@Details[/url] Result stroage in XRAM UCIDBuffer[0:11]; as usual ML51 not with UCID data.
*/
void main (void)
{
unsigned char i;
MFP_P46_GPIO;
P46_INPUT_MODE;
while(P46); //loop here while P46 = 1;
/**
* include IAP.C in library to call UID_Read function.
*/
UCID_Read();
/* print XRAM UCIDBuffer[0:11] value for the result. */
#if 1
MFP_P31_UART0_TXD;
P31_QUASI_MODE;
UART_Open(24000000,UART0_Timer3,115200);
ENABLE_UART0_PRINTF;
printf ("UCID = ");
for(i=0;i<11;i++)
{
printf (" 0x%02bX",UCIDBuffer[i]);
}
printf (" 0x%02bX \n", UCIDBuffer[11]);
#endif
while(1);
}
|