Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions OpenEphys.Onix1/ConfigureUclaMiniscopeV4Camera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,14 @@ internal static void ConfigureDeserializer(DeviceContext device)
// acquisition. For this reason, the frame start needs to be marked.
device.WriteRegister(DS90UB9x.MARK, (uint)DS90UB9xMarkMode.VsyncRising);

// The camera does not rely on magic words for data alignment
device.WriteRegister(DS90UB9x.MAGIC_MASK, 0);
device.WriteRegister(DS90UB9x.MAGIC, 0);
device.WriteRegister(DS90UB9x.MAGIC_WAIT, 0);
device.WriteRegister(DS90UB9x.DATAMODE, 0);
device.WriteRegister(DS90UB9x.DATALINES0, 0);
device.WriteRegister(DS90UB9x.DATALINES1, 0);

DS90UB9x.Initialize933SerDesLink(device, DS90UB9xMode.Raw12BitLowFrequency);

var deserializer = new I2CRegisterContext(device, DS90UB9x.DES_ADDR);
Expand Down Expand Up @@ -221,7 +229,7 @@ static void Set200kHzI2C(DeviceContext device)

internal static void ConfigureCameraSystem(DeviceContext device, UclaMiniscopeV4FramesPerSecond frameRate, bool interleaveLed)
{
// NB: atMega (bit-banded i2c to SPI) requires that we talk slowly
// NB: atMega (bit-banged I2C to SPI) requires that we talk slowly
Set80kHzI2C(device);

// set up Python480
Expand Down Expand Up @@ -255,7 +263,7 @@ internal static void ConfigureCameraSystem(DeviceContext device, UclaMiniscopeV4
atMega.WriteByte(0x04, (uint)(interleaveLed ? 0x00 : 0x03));
WriteCameraRegister(atMega, 200, shutterWidth);

// NB: interaction with the atMega (bit-banded i2c to SPI) requires that we talk slowly, reset to
// NB: interaction with the atMega (bit-banged I2C to SPI) requires that we talk slowly, reset to
// talk to normal chips
Set200kHzI2C(device);
}
Expand Down