public void PIATestInterval_8() { byte result; PIA pia = new PIA(); pia.Boot(); pia.Write(TIM8T, 100); for (int ii = 1; ii <= 7; ii++) { pia.Tick(); } result = pia.Read(INTIM); Assert.AreEqual(99, result); for (int ii = 99; ii >= 1; ii--) { for (int jj = 1; jj <= 8; jj++) { pia.Tick(); } result = pia.Read(INTIM); Assert.AreEqual(ii - 1, result); } pia.Tick(); result = pia.Read(INTIM); Assert.AreEqual(255, result); pia.Tick(); result = pia.Read(INTIM); Assert.AreEqual(254, result); }
public void PIAWriteInterval_8() { PIA pia = new PIA(); pia.Boot(); pia.Write(TIM8T, 100); byte result = pia.Read(INTIM); Assert.AreEqual(99, result); }