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

enum Status

status options for a subsystem

Values:

enumerator OFF
enumerator ON
enumerator UNDEF
enum SubSystem

subsystems that can be switched on/off

Values:

enumerator ZYNQ
enumerator CAMERAS
enumerator HK

Public Functions

LvpsManager()

constructor. sets all statuses to UNDEF

Status GetStatus(SubSystem sub_system)

get the current status of a subsystem

int SwitchOn(SubSystem sub_system)

switch on a subsystem and check its return line

Parameters:

subsytem – the subsytem to be switched on

int SwitchOff(SubSystem sub_system)

switch off a subsystem and check its return line

Parameters:

subsystem – the subsystem to be switched off

bool Check(SubSystem sub_system)

check the return line. returns true if on and false if off

Parameters:

subsystem – the subsystem to check

Public Members

Status zynq_status

stores the current Zynq status

Status cam_status

stores the current cameras status

Status hk_status

stores the current HK status, currently not connected

uint8_t P1Bits[4]

stores the last read bits from Port0

Private Types

enum PortValue

options to write to the digital port

Values:

enumerator HIGH
enumerator LOW

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