Skip to content

Commit

Permalink
Merge pull request #403 from open-ephys/issue-402
Browse files Browse the repository at this point in the history
Add missing configuration to ConfigureUCLAMiniscopeV4Camera
  • Loading branch information
bparks13 authored Jan 17, 2025
2 parents 2c3d576 + 6748c93 commit 815c00b
Showing 1 changed file with 10 additions and 2 deletions.
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

0 comments on commit 815c00b

Please sign in to comment.