Pololu Simple Instrukcja Użytkownika Strona 85

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 101
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 84
basically a carryless long division of a CRC “polynomial”, 0x91, into your message (expressed as a continuous stream
of bits), where all you care about is the remainder. The Simple Motor Controller uses CRC-7, which means it uses an
8-bit polynomial and, as a result, produces a 7-bit remainder. This remainder is the lower 7 bits of the CRC byte you
tack onto the end of your command packets.
For sample C code that computes the CRC byte of a command packet, see Section 6.7.6.
The CRC implemented on the Simple Motor Controller is the same as the one on the Maestro
[http://www.pololu.com/product/1352] servo controller and jrk [http://www.pololu.com/product/1392] and qik
[http://www.pololu.com/product/1110] motor controllers, but it differs from that on the TReX
[http://www.pololu.com/product/777] motor controller. Instead of being done MSB first, the computation is
performed LSB first to match the order in which the bits are transmitted over the serial line. In standard
binary notation, the number 0x91 is written as 10010001. However, the bits are transmitted in this
order: 1, 0, 0, 0, 1, 0, 0, 1, so we will write it as 10001001 to carry out the computation below.
The CRC-7 algorithm is as follows:
1. Express your 8-bit CRC-7 polynomial and message in binary, LSB first. The polynomial 0x91 is written as
10001001.
2. Add 7 zeros to the end of your message.
3. Write your CRC-7 polynomial underneath the message so that the LSB of your polynomial is directly below
the LSB of your message.
4. If the LSB of your CRC-7 is aligned under a 1, XOR the CRC-7 with the message to get a new message; if
the LSB of your CRC-7 is aligned under a 0, do nothing.
5. Shift your CRC-7 right one bit. If all 8 bits of your CRC-7 polynomial still line up underneath message bits,
go back to step 4.
6. What’s left of your message is now your CRC-7 result (transmit these seven bits as your CRC byte when
talking to the Simple Motor Controller with CRC enabled).
If you have never encountered CRCs before, this probably sounds a lot more complicated than it really is. The
following example shows that the CRC-7 calculation is not that difficult. For the example, we will use a two-byte
sequence: 0x83, 0x01.
Steps 1 & 2 (write as binary, least significant bit first, add 7 zeros to the end of the message):
CRC-7 Polynomial = [1 0 0 0 1 0 0 1]
message = [1 1 0 0 0 0 0 1] [1 0 0 0 0 0 0 0] 0 0 0 0 0 0 0
Steps 3, 4, & 5:
_______________________________________________
1 0 0 0 1 0 0 1 ) 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
XOR 1 0 0 0 1 0 0 1 | | | | | | | | | | | | | | |
_______________ | | | | | | | | | | | | | | |
1 0 0 1 0 0 0 1 | | | | | | | | | | | | | |
shift ----> 1 0 0 0 1 0 0 1 | | | | | | | | | | | | | |
_______________ | | | | | | | | | | | | | |
1 1 0 0 0 0 0 0 | | | | | | | | | | |
1 0 0 0 1 0 0 1 | | | | | | | | | | |
_______________ | | | | | | | | | | |
1 0 0 1 0 0 1 0 | | | | | | | | | |
1 0 0 0 1 0 0 1 | | | | | | | | | |
Pololu Simple Motor Controller User's Guide © 2001–2014 Pololu Corporation
6. Using the Serial Interface Page 85 of 101
Przeglądanie stron 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 100 101

Komentarze do niniejszej Instrukcji

Brak uwag

Electrolux EKC60303HW manuals

Owner’s manuals and user’s guides for Unknown Electrolux EKC60303HW.
We providing 6 pdf manuals Electrolux EKC60303HW for download free by document types: User Manual






More products and manuals for Unknown Electrolux

Models Document Type
EHGL4X-4BR User Manual   Electrolux EHGL4X-4BR User Manual [de] [en] [fr] [nl] , 40 pages
GK69TSIO User Manual   Electrolux GK69TSIO User Manual [de] [en] , 20 pages
EKI6555EIW User Manual   Electrolux EKI6555EIW Ohjekirja, 44 pages
EXD16DN3W User Manual     Electrolux EXD16DN3W User Manual, 108 pages
ESL46050 User Manual     Electrolux ESL46050 Manuali i perdoruesit, 60 pages
EOB5351AOX User Manual   Electrolux EOB5351AOX Kullanım kılavuzu [fr] [nl] , 32 pages
ETNK1023R User Manual Electrolux ETNK1023R User Manual [nl] , 11 pages
EKG603101X User Manual    Electrolux EKG603101X Руководство пользователя [ru] , 44 pages
EON4630X ELUX EURO User Manual     Electrolux EON4630X ELUX EURO User Manual, 50 pages
ESF7520ROX User Manual   Electrolux ESF7520ROX Manuali i perdoruesit, 28 pages
EHD8740IOK User Manual    Electrolux EHD8740IOK Uživatelský manuál, 44 pages
ESL64022 User Manual   Electrolux ESL64022 Ohjekirja [sk] , 48 pages
EHD60150P User Manual   Electrolux EHD60150P Manual de utilizare, 28 pages
PKKS8 User Manual   Electrolux PKKS8 User Manual [de] [en] [fr] [it] , 20 pages
EQWP4510IK User Manual   Electrolux EQWP4510IK Kasutusjuhend, 20 pages
ZB5022 User Manual         Electrolux ZB5022 Ръководство за употреба [pl] [sk] , 68 pages
TOP10 User Manual    Electrolux TOP10 Manual de usuario, 2 pages
ECM30132W Basic Guide   Electrolux ECM30132W Basic Guide [it] , 8 pages
EKG51103OW User Manual   Electrolux EKG51103OX Пайдаланушы нұсқаулығы, 52 pages
ERS3400X User Manual Electrolux ERS3400X User Manual [ja] [zh] , 14 pages