enhering

Untitled

Feb 4th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. This code:
  2. SELECT_AMGP;
  3. nIgnore = m_cSPI.Transfer(5);
  4. nIgnore = m_cSPI.Transfer(10);
  5. DESELECT_AMGP;
  6. Is producing this output:
  7. ...
  8. 17631: 5
  9. 17632: 5
  10. 17633: 10
  11. 17634: 10
  12. 17635: 5
  13. 17636: 10
  14. 17637: 10
  15. 17638: 10
  16. 17639: 10
  17. ...
  18.  
  19. While this code:
  20. SELECT_AMGP;
  21. nIgnore = m_cSPI.Transfer(5);
  22. DESELECT_AMGP;
  23. SELECT_AMGP;
  24. nIgnore = m_cSPI.Transfer(10);
  25. DESELECT_AMGP;
  26.  
  27. Produces this output:
  28. ...
  29. 758: 5
  30. 759: 5
  31. 760: 5
  32. 761: 5
  33. 762: 10
  34. 763: 10
  35. ...
  36.  
  37. Finally, this code:
  38. uint8_t nDelay = 5;
  39. SELECT_AMGP;
  40. nIgnore = m_cSPI.Transfer(5);
  41. Delay_ms(nDelay);
  42. nIgnore = m_cSPI.Transfer(10);
  43. Delay_ms(nDelay);
  44. DESELECT_AMGP;
  45.  
  46. Produces this output:
  47. ...
  48. 1036: 5
  49. 1037: 5
  50. 1038: 5
  51. 1039: 10
  52. 1040: 10
  53. 1041: 10
  54. ...
Advertisement
Add Comment
Please, Sign In to add comment