Chapter 9
Example in C
#include "pa1508.h"
void main (VOID)
{
UINT
ui_Address = 0x390; //Base address of the board, set to 390Hex
BYTE
b_BoardHandle = 0;
BYTE
b_Channel = 0xF5;
/**********************************************************/
/* The function SetBoardInformation checks the parameters */
/* of the board and returns the handle of the board
/**********************************************************/
i_PA1508_SetBoardInformation
/********************************************************************/
/* The function SetOutputMemoryOn stores the current state of the
/* output. This is neccessary for the function Set1DigitalOutputOff */
/********************************************************************/
i_PA1508_SetOutputMemoryOn
/*********************************************************/
/* The function Set8DigitalOutputOn activates
/* the following outputs: 0,2,4,5,6,7, (b_Channel = 0xF5)*/
/*********************************************************/
i_PA1508_Set8DigitalOutputOn
/**********************************************************/
/* The function Set8DigitalOutputOff deactivates
/* the following outputs: 0,2,4,5,6,7, (b_Channel = 0xF5) */
/**********************************************************/
i_PA1508_Set8DigitalOutputOff (b_BoardHandle, b_Channel);
/******************************************************/
/* The function CloseBoardHandle blocks the
/* access to the board and closes the board handle
/******************************************************/
i_PA1508_CloseBoardHandle
}
//Handle of the board
//Number of channels to be set
(ui_Address, &b_BoardHandle);
(b_BoardHandle);
(b_BoardHandle, b_Channel);
(b_BoardHandle);
PA 1508
*/
*/
*/
*/
*/
*/
45
Need help?
Do you have a question about the PA 1508 and is the answer not in the manual?
Questions and answers