 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
RadGar Guest
|
Posted: Sun Nov 27, 2005 2:11 pm Post subject: CCITT in C++ for AVR |
|
|
Hi,
I'm reposting my question in this group from comp.arch.embedded - as
it was suggested to me that it might be better to do so. In advance to
all reading: this is meant mostly for people who code in C++ for
microcontrollers such as AVR.
So here it goes:
I am making a school project for PocketPC which is to send some data
to mechanic robots controlled by AVRs or other types of microcontrollers
(mostly AVR). The data I send is own designed packet, which includes its
own 16bit CRC. After some googling I found the CCITT ( poly 0x1021 with
0xFFFF init) and other types of 16bit CRCs (XModem, ARC) - I chose to go
with CCITT, but still can go with other type if it makes it easier.
To the subject now - I have no idea what type of compilers are
available for such microcontrollers (AVR etc). What I'd like to know is
there any library with CCITT (or other) calculation function. I'm aware
there are many source codes for that on the web, but I'd still would go
with the library function (just easier for the people to use it) - the
speed is not an issue. It's just easier to point other people to the lib
function in the documentation instead of making them type some code I
present in the doc.
Hope I made myself clear. Thanks for any help, regards
Rafal Mroz
|
|
| Back to top |
|
 |
Rolf Magnus Guest
|
Posted: Sun Nov 27, 2005 4:49 pm Post subject: Re: CCITT in C++ for AVR |
|
|
RadGar wrote:
| Quote: | To the subject now - I have no idea what type of compilers are
available for such microcontrollers (AVR etc).
|
There are several C compilers like keil and gcc, but I only know one C++
compiler for AVR, which would be g++.
| Quote: | What I'd like to know is there any library with CCITT (or other)
calculation function.
|
The avr-libc (usable from C and C++) does support several CRC16 variants
including CCITT. See:
http://www.nongnu.org/avr-libc/user-manual/group__util__crc.html
|
|
| Back to top |
|
 |
RadGar Guest
|
Posted: Sun Nov 27, 2005 5:20 pm Post subject: Re: CCITT in C++ for AVR |
|
|
Rolf Magnus napisaĆ(a):
| Quote: | RadGar wrote:
To the subject now - I have no idea what type of compilers are
available for such microcontrollers (AVR etc).
There are several C compilers like keil and gcc, but I only know one C++
compiler for AVR, which would be g++.
What I'd like to know is there any library with CCITT (or other)
calculation function.
The avr-libc (usable from C and C++) does support several CRC16 variants
including CCITT. See:
http://www.nongnu.org/avr-libc/user-manual/group__util__crc.html
|
The C compilers would do as good as C++ (not in need of the OO C++ in
this case tbh).
Thanks for the link - it might just save my day. regards,
RadGar
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|