블로그 이미지
안녕하세요? 이안입니다. 과학의 모든것을 좋아합니다. 이안김

카테고리

분류 전체보기 (481)
NOTICE (12)
SALE (8)
자유 게시판 (40)
◆ APPLE II (54)
◆ SD Smart Drive (15)
◆ SD DISK II (82)
◆ SD Music card (27)
◆ SD MIDI ][+ (23)
◆ Mockingboard 4c (20)
◆ Hyperion 512K RAM+ (5)
◆ Accelerator (10)
◆ PS2 Adapter (8)
◆ Z80 Card (24)
◆ APMSX (26)
◆ APV40 (0)
◆ FC-150 (15)
◆ i86 PC (20)
◆ MPU 관련 (9)
◆ CPLD (1)
◆ RF (5)
◆ 진공관및 오디오 (28)
◆ AutoBike (13)
◆Other (27)
비공개 연구실 (0)
★ 개인방 (1)
스크랩 (0)
임시보관함 (0)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

최근에 올라온 글

XMODEM PROTOCOL

◆ SD DISK II / 2014. 3. 18. 14:02

XMODEM PROTOCOL

XMODEM USING MINICOM: 

XMODEM is one of the serial communication protocols which is used to write/read  the data to/from microcontroller serially. So in order to do that you need to have some medium to communicate that medium is xmodem .

XMODEM is used to transmit the files to/from PC.

This is having many models like:
1. XMODEM - CRC
2. XMODEM - CHECKSUM
3. XMODEM - 1K
4. XMODEM - 1KG

Firstly lets discuss about XMODEM - CRC  in detail as we are using it presently:

You send your data in the form of packets :
A Packet consists of

1. Start of header           <   soh    >     1 byte
2. Packet number           <   pk no >     1 byte
3. ~Packet number        <~(pk no)>    1 byte
4. 128 bytes of data       <   data    > 128byte
5. 2 bytes of check sum <    crc     >     2byte
                                                            -------------
                                                            133 byte
                                                            -------------
In this protocol the data packet is in the format :


The file is divided into packets and send according to acknowledgements . Before sending another packet acknowledgement should be sent to say that we received the packet successfully or return No Acknowledgement so that the same packet will be retransmitted .

Packet number starts from value 1 and goes upto 255 and then start from 0 . 
Checksum is calculated by taking a 256 modulus of the sum of all ASCII values of each of 128 bytes in the data block.

The data flow is given :


The receiver will be sending 'C' to transmitter i.e:XMODEM to say that i am ready to receive data waits for 3 seconds and then timeout and again resend 'C' this will be continuing  until we receive data.

If we get the data then send the acknowledgement to the minicom so that xmodem will come to know that packet was received successfully and then this continues and if something goes wrong some error in the packet or not received it sends <NAK> (No Acknowledgement ) so that it transmit the same packet to the receiver. 

To verify that whole data is transmitted it sends EOT at the end which is nothing but End Of Transmission we should be checking for EOT. 

At receiver side you should build the code to receive the data don't bother about transmission as it is simple it is done by the hyperterminal. I will show you this clearly in next post.

In next post we will discuss about the XMODEM - checksum it is similar as the crc little changes were present.


'◆ SD DISK II' 카테고리의 다른 글

SD DISK][ Emulator용 LCD 개발 중  (0) 2014.03.20
SD DISK][ Emulator 마지막 Sample보드  (1) 2014.03.18
SD DISK][ Emulator V2.43 메뉴얼  (0) 2014.03.13
Shot reboot testing  (0) 2014.03.13
SD DISK][ Emulator용 Bluetooth 아답타  (0) 2014.03.09
Posted by 이안김
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함