Advertisement
Guest User

Untitled

a guest
Jul 18th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. always @(posedge UsClk)
  2. begin
  3.     LastPPMIN=PPMIN;
  4.     if ((PPMIN==1) and (LastPPMIN==0)) begin
  5.         if (CurrentCount > 2500) begin
  6.             CurrentCount = 0;
  7.             ChannelSelect = 0;
  8.         end
  9.         else begin
  10.             PPMreg(ChannelSelect) = CurrentCount;
  11.             CurrentCount = 0;
  12.             ChannelSelect = ChannelSelect + 1;
  13.         end
  14.     end
  15.     else begin
  16.         CurrentCount = CurrentCount + 1;
  17.     end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement