Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. wait
  2. SDA low
  3. SCL low
  4. wait
  5. for each bit
  6. if bit is set: SDA high
  7. if bit is unset: SDA low
  8. wait
  9. SCL high
  10. wait
  11. wait
  12. SCL low
  13. wait
  14. wait
  15. SDA high
  16. SCL high
  17. wait
  18. wait
  19. check ACK status
  20. SDA low
  21. SCL low
  22. wait
  23. return ACK status
  24.  
  25. wait
  26. SCL low
  27. SDA high
  28. for each bit (8 bits)
  29. SCL high
  30. wait
  31. wait
  32. SCL low
  33. wait
  34. check and store received bit
  35. wait
  36. do a NACK or ACK depending on if it is the last byte
  37.  
  38. wait
  39. SCL low
  40. SDA high
  41. for each bit (8 bits)
  42. SCL high <--------
  43. wait
  44. check and store received bit <--------
  45. wait
  46. SCL low <--------
  47. wait
  48. wait
  49. do a NACK or ACK depending on if it is the last byte
  50.  
  51. - Byte mode sequential
  52. - Page mode Sequential
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement