PA 1508
9.5.2
Digital output channels
1) Setting a digital output channel and then resettting it
(The other output channels are reset)
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 = 1;
/**********************************************************/
/* The function SetBoardInformation checks the parameters */
/* of the board and returns the handle of the board
/**********************************************************/
i_PA1508_SetBoardInformation
/***********************************************/
/* The function activates the output channel
/* which was given with the variable b_Channel */
/***********************************************/
i_PA1508_Set1DigitalOutputOn
/*******************************************************/
/* The function Set1DigitalOutputOn deactivates one
/* channel which was given with the variable b_Channel */
/*******************************************************/
i_PA1508_Set1DigitalOutputOff (b_BoardHandle, b_Channel);
/***************************************************/
/* The function CloseBoardHandle blocks the access */
/* to the board and closes the board handle
/***************************************************/
i_PA1508_CloseBoardHandle
42
i_PA1508_SetBoardInformation
(...)
i_PA1508_Set1DigitalOutputOn
(...)
i_PA1508_Set1DigitalOutputOff
(...)
i_PA1508_CloseBoardHandle (...)
//Handle of the board
//Number of the channel to be read
(ui_Address, &b_BoardHandle);
(b_BoardHandle, b_Channel);
(b_BoardHandle);}
*/
*/
*/
*/
Chapter 9
Need help?
Do you have a question about the PA 1508 and is the answer not in the manual?
Questions and answers