Biomedical Engineering Reference
In-Depth Information
End of Chapter Appendix 3
The algorithm sequence for generating a complete transmitted packet is given below:
k=1;
% packet number
cksm = 0
% checksum byte
data pointer = first RAM address
1. j=1; % byte counter
2. send header /'sync pattern' in encoded form with a 10 bit frame
3. cksm = header + cksm
4. send k in encoded form with a 10 bit frame
5. cksm = cksm + k
6. fetch data byte from RAM,
7. increment data pointer
8. send byte in encoded form with a ten bit frame
9. cksm = cksm+ byte
10. j= j + 1
11. if j = 32 go to step 13
12. Go to step 6
13. chk_sm = 2's complement of cksm
14. send chk_sm in encoded form with a 10- bit frame
15. cksm = 0; k = k+1
16. if k= 200 go to step 18
17. go to step 1 for next packet
18. stop
Search WWH ::




Custom Search