Advertisement
Guest User

Untitled

a guest
Aug 17th, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. component simindex "simulated encoder index"
  2.  
  3. option nofp yes;
  4.  
  5. pin in s32 rawcounts;
  6. pin out bit index;
  7. param rw u32 scale;
  8. function (_);
  9. ;;
  10. FUNCTION(_){
  11. if (rawcounts % scale == 0){
  12. index = 1;
  13. } else {
  14. index = 0;
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement