Low voltage power supply (LVPS)¶
Description¶
The LvpsManager
class handles the switching of the separate subsystems on/off by sending a digital pulse from the aDIO port on the CPU board itself (CN6).This pulse must be 5V with 50 mA of current for a duration of 10 ms. In order to provide sufficient current, the CPU aDIO ports are wired through a booster circuit before the connection to the LVPS. The LvpsManager
has a set of functions which interface to the aDIO_library in order to send the required pulse to the correct pins on Port0 and read in the return value from the subsystems on Port1. When a subsystem is switched on, a return value of 5V should be read on the correspond input line. The ports for each subsystem are defined in the header file AnalogManager.h. Every time a subsystem is switched on/off, the return lines are checked to verify the expected behaviour. The pinout of the aDIO port is described in the hardware interfaces section of this documentation.
LvpsManager¶
-
class LvpsManager¶
handles the switching on/off of instrument subsytems using the CPU’s aDIO ports and the aDIO library. all port definitions are given in LvpsManager.h
Public Types
Public Functions
-
LvpsManager()¶
constructor. sets all statuses to UNDEF
-
int SwitchOn(SubSystem sub_system)¶
switch on a subsystem and check its return line
- Parameters:
subsytem – the subsytem to be switched on
Public Members
-
uint8_t P1Bits[4]¶
stores the last read bits from Port0
Private Types
Private Functions
-
int InitPorts()¶
initialise the aDIO ports
-
int CloseDev()¶
close the aDIO device
-
int SetDirP1(uint8_t port_config)¶
write the direction of Port1
-
int ReadP1()¶
read the values of Port1
-
int SetDirP0(uint8_t port_config)¶
write the direction of Port0
- Parameters:
port_config – hex value to allow bit-programmable direction setting, e.g. 0xFF = 1111 1111 (all Port0 set to output)
-
int SetValP0(PortValue port_value)¶
set the value of Port0
- Parameters:
port_value – the value to set
-
int SetPulseP0(uint8_t port_config)¶
deliver a 5V, 10 ms pulse to a certain pin or pins of Port0
- Parameters:
port_config – specifies which pins eg. 0xFF = 1111 1111 (all pins pulsed)
Private Members
-
DeviceHandle aDIO_Device¶
the aDIO device handle
Private Static Attributes
-
static const uint32_t minor_number = 0¶
the aDIO minor number for use with the aDIO library functions
-
LvpsManager()¶