PA 1508
4) Setting simultaneously several digital outputs and then resetting
them.
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 Set8DigitalOutputOn activates the
/* following outputs: 0,2,4,5,6,7, (b_Channel = 0xF5) */
/* and deactivates the outputs 1,3.
/******************************************************/
i_PA1508_Set8DigitalOutputOn
/******************************************************/
/* The function CloseBoardHandle blocks the
/* access to the board and closes the board handle
/******************************************************/
i_PA1508_CloseBoardHandle
}
46
i_PA1508_SetBoardInformation
(...)
i_PA1508_Set8DigitalOutputOn
(...)
i_PA1508_CloseBoardHandle (...)
//Variable for the board handle
//Number of channels to be set
(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