This is a library to use HV507 boards as a switching circuitry which is a module used with an electrical stimulator made by kaji-lab.

Embed: (wiki syntax)

« Back to documentation index

HV507 Class Reference

HV507 Class Reference

HV507 class. More...

#include <KajiLabHV507B.h>

Public Member Functions

 HV507 (const int arg_num_board=1)
 Constructor.
void init ()
 HV507 initialization.
void setHtoSR ()
 Set a stim bit.
void setLtoSR ()
 Set a ground bit.
void shiftSRBits_by (int arg_num_shifting)
 Function to shift data only index-incresing-direction.
void clearSR ()
 Fill all with zero (ground)
void setCh (const int arg_ch)
 Function to define ONE stimulation point.
void updateLatches ()
 Function to store data in shift register to latches.

Detailed Description

HV507 class.

With this class you can deal a HV507 board'''s''' as one object

Definition at line 47 of file KajiLabHV507B.h.


Constructor & Destructor Documentation

HV507 ( const int  arg_num_board = 1 )

Constructor.

Parameters:
(constint arg_num_of_board = 1) the number of Hv507 board.

Definition at line 8 of file KajiLabHV507B.cpp.


Member Function Documentation

void clearSR (  )

Fill all with zero (ground)

Definition at line 101 of file KajiLabHV507B.cpp.

void init (  )

HV507 initialization.

This is curried in constructor. In this function, all output pins are set as L (ALL GROUND), and Porarity (POL) is set to 1 (nomal mode; in other words, data in latches of HV507 is reflected to output as is. If POL = 0, the output is inverted data (inverse mode).

Definition at line 37 of file KajiLabHV507B.cpp.

void setCh ( const int  arg_ch )

Function to define ONE stimulation point.

Parameters:
(constint arg_ch) the pin number supposed to be a stim pin.

Definition at line 106 of file KajiLabHV507B.cpp.

void setHtoSR (  )

Set a stim bit.

Set one high bit (1) this is regarded as stim bit.

Definition at line 68 of file KajiLabHV507B.cpp.

void setLtoSR (  )

Set a ground bit.

Set one low bit (0) this is regarded as ground bit. If shifting the register many times, it is recommended to use shiftSRBits_by().

Definition at line 78 of file KajiLabHV507B.cpp.

void shiftSRBits_by ( int  arg_num_shifting )

Function to shift data only index-incresing-direction.

Parameters:
(intarg_num_shifting) stimulation point

Definition at line 54 of file KajiLabHV507B.cpp.

void updateLatches (  )

Function to store data in shift register to latches.

This is called in setCh. But if you need to use other function to deal the shift rester, you should call this function to output the data.

Definition at line 122 of file KajiLabHV507B.cpp.