Show / Hide Table of Contents

Class ATmega644

Provides functionality for FCT ATmega644 MCUs

Inheritance
System.Object
ATmega644
Implements
II2c
ISignal
IAD7689
IAD9837
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Elatec.FCT.Client.Hardware
Assembly: ElatecFCT.dll
Syntax
public class ATmega644 : II2c, ISignal, IAD7689, IAD9837

Constructors

View Source

ATmega644(SerialPort)

Initializes a new instance of the ElatecFCT.Hardware.ATmega644 using a serial port

Declaration
public ATmega644(SerialPort comPort)
Parameters
Type Name Description
System.IO.Ports.SerialPort comPort

Fields

View Source

Cmd3V3off

Declaration
public static readonly byte[] Cmd3V3off
Field Value
Type Description
System.Byte[]
View Source

Cmd3V3on

Declaration
public static readonly byte[] Cmd3V3on
Field Value
Type Description
System.Byte[]
View Source

Cmd5V0off

Declaration
public static readonly byte[] Cmd5V0off
Field Value
Type Description
System.Byte[]
View Source

Cmd5V0on

Declaration
public static readonly byte[] Cmd5V0on
Field Value
Type Description
System.Byte[]
View Source

CmdFirmware

Declaration
public static readonly byte[] CmdFirmware
Field Value
Type Description
System.Byte[]
View Source

CmdGetInit

Declaration
public static readonly byte[] CmdGetInit
Field Value
Type Description
System.Byte[]
View Source

CmdInterlook

Declaration
public static readonly byte[] CmdInterlook
Field Value
Type Description
System.Byte[]
View Source

CmdSetInit

Declaration
public static readonly byte[] CmdSetInit
Field Value
Type Description
System.Byte[]
View Source

PA0

Declaration
public static readonly byte[] PA0
Field Value
Type Description
System.Byte[]
View Source

PA1

Declaration
public static readonly byte[] PA1
Field Value
Type Description
System.Byte[]
View Source

PA2

Declaration
public static readonly byte[] PA2
Field Value
Type Description
System.Byte[]
View Source

PA3

Declaration
public static readonly byte[] PA3
Field Value
Type Description
System.Byte[]
View Source

PA4

Declaration
public static readonly byte[] PA4
Field Value
Type Description
System.Byte[]
View Source

PA5

Declaration
public static readonly byte[] PA5
Field Value
Type Description
System.Byte[]
View Source

PA6

Declaration
public static readonly byte[] PA6
Field Value
Type Description
System.Byte[]
View Source

PA7

Declaration
public static readonly byte[] PA7
Field Value
Type Description
System.Byte[]
View Source

PB0

Declaration
public static readonly byte[] PB0
Field Value
Type Description
System.Byte[]
View Source

PB1

Declaration
public static readonly byte[] PB1
Field Value
Type Description
System.Byte[]
View Source

PB2

Declaration
public static readonly byte[] PB2
Field Value
Type Description
System.Byte[]
View Source

PB3

Declaration
public static readonly byte[] PB3
Field Value
Type Description
System.Byte[]
View Source

PB4

Declaration
public static readonly byte[] PB4
Field Value
Type Description
System.Byte[]
View Source

PB5

Declaration
public static readonly byte[] PB5
Field Value
Type Description
System.Byte[]
View Source

PB6

Declaration
public static readonly byte[] PB6
Field Value
Type Description
System.Byte[]
View Source

PB7

Declaration
public static readonly byte[] PB7
Field Value
Type Description
System.Byte[]
View Source

PC0

Declaration
public static readonly byte[] PC0
Field Value
Type Description
System.Byte[]
View Source

PC1

Declaration
public static readonly byte[] PC1
Field Value
Type Description
System.Byte[]
View Source

PC2

Declaration
public static readonly byte[] PC2
Field Value
Type Description
System.Byte[]
View Source

PC3

Declaration
public static readonly byte[] PC3
Field Value
Type Description
System.Byte[]
View Source

PC4

Declaration
public static readonly byte[] PC4
Field Value
Type Description
System.Byte[]
View Source

PC5

Declaration
public static readonly byte[] PC5
Field Value
Type Description
System.Byte[]
View Source

PC6

Declaration
public static readonly byte[] PC6
Field Value
Type Description
System.Byte[]
View Source

PC7

Declaration
public static readonly byte[] PC7
Field Value
Type Description
System.Byte[]
View Source

PD0

Declaration
public static readonly byte[] PD0
Field Value
Type Description
System.Byte[]
View Source

PD1

Declaration
public static readonly byte[] PD1
Field Value
Type Description
System.Byte[]
View Source

PD2

Declaration
public static readonly byte[] PD2
Field Value
Type Description
System.Byte[]
View Source

PD3

Declaration
public static readonly byte[] PD3
Field Value
Type Description
System.Byte[]
View Source

PD4

Declaration
public static readonly byte[] PD4
Field Value
Type Description
System.Byte[]
View Source

PD5

Declaration
public static readonly byte[] PD5
Field Value
Type Description
System.Byte[]
View Source

PD6

Declaration
public static readonly byte[] PD6
Field Value
Type Description
System.Byte[]
View Source

PD7

Declaration
public static readonly byte[] PD7
Field Value
Type Description
System.Byte[]
View Source

PORTA

Declaration
public static readonly byte PORTA
Field Value
Type Description
System.Byte
View Source

PORTB

Declaration
public static readonly byte PORTB
Field Value
Type Description
System.Byte
View Source

PORTC

Declaration
public static readonly byte PORTC
Field Value
Type Description
System.Byte
View Source

PORTD

Declaration
public static readonly byte PORTD
Field Value
Type Description
System.Byte
View Source

PortNames

Declaration
public static List<string> PortNames
Field Value
Type Description
System.Collections.Generic.List<System.String>

Properties

View Source

Comm

Get or set the serial port for ATmega644

Declaration
public SerialPort Comm { get; set; }
Property Value
Type Description
System.IO.Ports.SerialPort

Methods

View Source

ClearIO(Byte[])

Declaration
public void ClearIO(byte[] io)
Parameters
Type Name Description
System.Byte[] io
View Source

CloseCOM2()

Close COM2 (V24 break condition) to prevent current flow from the pins

Declaration
public void CloseCOM2()
View Source

EnterCOM1toCOM2Transparent(ATmega644.ExtBaudRate, ATmega644.ExtParity)

Enter transparent mode from COM1 to COM2

Declaration
public void EnterCOM1toCOM2Transparent(ATmega644.ExtBaudRate baudRate, ATmega644.ExtParity parityMode)
Parameters
Type Name Description
ATmega644.ExtBaudRate baudRate
ATmega644.ExtParity parityMode
View Source

EnterCOM1toCOM2Transparent(Int32, Parity)

Enter transparent mode from COM1 to COM2

Declaration
public void EnterCOM1toCOM2Transparent(int baudRate, Parity parityMode)
Parameters
Type Name Description
System.Int32 baudRate
System.IO.Ports.Parity parityMode
View Source

ExitCOM1toCOM2Transparent()

Exit transparent mode from COM1 to COM2

Declaration
public void ExitCOM1toCOM2Transparent()
View Source

GetSuccessCounter(ATmega644.CounterType)

Get AVR encrypted success counter

Declaration
public ATmega644.CryptoPackage GetSuccessCounter(ATmega644.CounterType Reader)
Parameters
Type Name Description
ATmega644.CounterType Reader
Returns
Type Description
ATmega644.CryptoPackage
View Source

GetTrialCounter(ATmega644.CounterType)

Get AVR encrypted trial counter

Declaration
public ATmega644.CryptoPackage GetTrialCounter(ATmega644.CounterType Reader)
Parameters
Type Name Description
ATmega644.CounterType Reader
Returns
Type Description
ATmega644.CryptoPackage
View Source

IncrementSuccessCounter(ATmega644.CounterType)

Increase AVR encrypted success counter

Declaration
public ATmega644.CryptoPackage IncrementSuccessCounter(ATmega644.CounterType Reader)
Parameters
Type Name Description
ATmega644.CounterType Reader
Returns
Type Description
ATmega644.CryptoPackage
View Source

IncrementTrialCounter(ATmega644.CounterType)

Increase AVR encrypted trial counter

Declaration
public ATmega644.CryptoPackage IncrementTrialCounter(ATmega644.CounterType Reader)
Parameters
Type Name Description
ATmega644.CounterType Reader
Returns
Type Description
ATmega644.CryptoPackage
View Source

OpenCOM2()

Open COM2 (undo V24 break condition) to enable communication

Declaration
public void OpenCOM2()
View Source

ReadAD7689(AD7689.Channels, Boolean)

Read the ADC

Declaration
public ushort ReadAD7689(AD7689.Channels channel, bool average)
Parameters
Type Name Description
AD7689.Channels channel

The channel to read

System.Boolean average

Tell the ADC if we want to average

Returns
Type Description
System.UInt16

The ADV value in V

View Source

ReadByte(Byte, Byte)

Declaration
public byte ReadByte(byte deviceAddress, byte address)
Parameters
Type Name Description
System.Byte deviceAddress
System.Byte address
Returns
Type Description
System.Byte
View Source

ReadIO(Byte[])

Declaration
public bool ReadIO(byte[] io)
Parameters
Type Name Description
System.Byte[] io
Returns
Type Description
System.Boolean
View Source

ReadIoDirOutput(Byte[])

Declaration
public bool ReadIoDirOutput(byte[] io)
Parameters
Type Name Description
System.Byte[] io
Returns
Type Description
System.Boolean
View Source

ReadReg(Byte, Byte, Int32)

Declaration
public byte[] ReadReg(byte deviceAddress, byte regAddress, int length)
Parameters
Type Name Description
System.Byte deviceAddress
System.Byte regAddress
System.Int32 length
Returns
Type Description
System.Byte[]
View Source

ResetCounter(ATmega644.CounterType)

Reset the counter for a specific DUT

Declaration
public ATmega644.CryptoPackage ResetCounter(ATmega644.CounterType Reader)
Parameters
Type Name Description
ATmega644.CounterType Reader
Returns
Type Description
ATmega644.CryptoPackage
View Source

SetCOM2TransparentRS232()

If COM1 to COM2 transparent mode is enter next it is set to R232. Default is RS232

Declaration
public void SetCOM2TransparentRS232()
View Source

SetCOM2TransparentRS485()

If COM1 to COM2 transparent mode is enter next it is set to RS485

Declaration
public void SetCOM2TransparentRS485()
View Source

SetFeqAD9837(Int64, AD9837.Waveform)

Set DAC frequency and waveform

Declaration
public void SetFeqAD9837(long freq, AD9837.Waveform waveform)
Parameters
Type Name Description
System.Int64 freq

the frequency to set

AD9837.Waveform waveform

waveform of the DAC

View Source

SetIO(Byte[])

Declaration
public void SetIO(byte[] io)
Parameters
Type Name Description
System.Byte[] io
View Source

SetIoHighZ(Byte[])

Declaration
public void SetIoHighZ(byte[] io)
Parameters
Type Name Description
System.Byte[] io
View Source

SetIoInput(Byte[])

Declaration
public void SetIoInput(byte[] io)
Parameters
Type Name Description
System.Byte[] io
View Source

SetIoOutput(Byte[])

Declaration
public void SetIoOutput(byte[] io)
Parameters
Type Name Description
System.Byte[] io
View Source

SetReadingModeAD7689(ReadingMode)

Init the FCTs ADC AD7689 ic

Declaration
public void SetReadingModeAD7689(ReadingMode mode)
Parameters
Type Name Description
ReadingMode mode
View Source

TxCOM1(Byte[])

Write via COM1 (fire and forget)

Declaration
public void TxCOM1(byte[] txCommand)
Parameters
Type Name Description
System.Byte[] txCommand
View Source

TxCOM2(Byte[], ATmega644.ExtBaudRate, Parity)

Transmit via COM2 (RS232 only)

Declaration
public void TxCOM2(byte[] data, ATmega644.ExtBaudRate baudRate, Parity parityMode)
Parameters
Type Name Description
System.Byte[] data
ATmega644.ExtBaudRate baudRate
System.IO.Ports.Parity parityMode
View Source

TxRxCOM1(Byte[])

Transmit and recive some bytes

Declaration
public byte[] TxRxCOM1(byte[] txCommand)
Parameters
Type Name Description
System.Byte[] txCommand
Returns
Type Description
System.Byte[]
View Source

TxRxCOM2(Byte[], Byte, ATmega644.ExtBaudRate, Parity, ATmega644.COM2Mode)

Transmit and receive via COM2 (RS232 or RS485)

Declaration
public byte[] TxRxCOM2(byte[] data, byte readTimeoutDeciSec, ATmega644.ExtBaudRate baudRate, Parity parityMode, ATmega644.COM2Mode mode)
Parameters
Type Name Description
System.Byte[] data
System.Byte readTimeoutDeciSec
ATmega644.ExtBaudRate baudRate
System.IO.Ports.Parity parityMode
ATmega644.COM2Mode mode
Returns
Type Description
System.Byte[]
View Source

TxRxCOM3(Byte[])

Transmit and receive via SoftUART port

Declaration
public byte[] TxRxCOM3(byte[] txCommand)
Parameters
Type Name Description
System.Byte[] txCommand
Returns
Type Description
System.Byte[]
View Source

WriteByte(Byte, Byte, Byte)

Declaration
public void WriteByte(byte deviceAddress, byte address, byte data)
Parameters
Type Name Description
System.Byte deviceAddress
System.Byte address
System.Byte data
View Source

WriteReg(Byte, Byte, Byte[], Int32)

Declaration
public void WriteReg(byte deviceAddress, byte regAddress, byte[] data, int length)
Parameters
Type Name Description
System.Byte deviceAddress
System.Byte regAddress
System.Byte[] data
System.Int32 length

Implements

II2c
ISignal
IAD7689
IAD9837
  • View Source
In This Article
Back to top Generated by DocFX