AN370
8. Simple Application Example
To illustrate how all the functions fall into place into a simple application the sample source code is included here.
The user is advised to check the fcast_demo application provided.
/*
*------------------------------------------------------------------------------
*
*
VARIABLES:
*/
/* Structure for setting up the ODS .. must be in XDATA */
tOds_Setup xdata rOds_Setup;
/* Structure for setting up the PA .. must be in XDATA */
tPa_Setup xdata
/* Data byte frame .. the pointer must point to XDATA */
BYTE xdata
*pbFrameHead;
/*
*------------------------------------------------------------------------------
*/
/* Disable the Matrix and Roff modes on GPIO[3:1] */
PORT_CTRL &= ~(M_PORT_MATRIX | M_PORT_ROFF | M_PORT_STROBE);
PORT_CTRL |=
M_PORT_STROBE;
PORT_CTRL &= (~M_PORT_STROBE);
/* Turn the LED off */
GPIO_LED = 0;
/*------------------------------------------------------------------------------
*
SETUP PHASE
*------------------------------------------------------------------------------
*/
/* Call the system setup. This just for initialization. Argument of 1 configures
* the SYS module such that the bandgap can be turned off if needed.
98
rPa_Setup;
Rev. 1.0
*/
Need help?
Do you have a question about the Si4010 and is the answer not in the manual?
Questions and answers