473,387 Members | 1,529 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Nov 27 '05 #1
2 4755
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-...util__crc.html

Nov 27 '05 #2
Rolf Magnus napisał(a):
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-...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
Nov 27 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tuvas | last post by:
Anyone know a module that does CRC16 for Python? I have an aplication that I need to run it, and am not having alot of sucess. I have a program in C that uses a CRC16 according to CCITT standards,...
2
by: Kavitha Rao | last post by:
Hi, I am getting the following errors while trying to run this snippet in Microsoft Visual C++.Can't seem to print the crc value stored. /* +++Date last modified: 05-Jul-1997 */ /* Crc - 32...
40
by: grid | last post by:
Hi, I have written a couple of programs which just prints the bits in both directions.Would appreciate any help to refine them a bit. 1. #include<stdio.h> #include<limits.h> void...
0
by: VenuGopal | last post by:
Hi, I am recording a wave file using the MCI. Currently It rcords in the PCM format. Now i want to save the file in the CCITT format (any of the algorithms will do). I see MSDN and i come to...
0
by: Brad Simon | last post by:
I have an app that needs to create a CRC-16 CCITT code for a small string (less than 16 characters). I cannot find any sample code that will help me do it. My language of choice is VB .NET 2.0,...
6
by: Gonzalo Monzón | last post by:
Hi all! I have been translating some Python custom C extension code into Python, as I need these modules to be portable and run on a PocketPC without the need of compile (for the purpose its a...
1
by: Ed | last post by:
Please help me with an algorithm to calculate CRC-CCITT in C++ Thanks
2
by: pythoneiro | last post by:
Please, Please, is there here some good soul that understand this functions hi8 and lo8 (from GCC AVR) and can help me to port it to Python? uint16_t crc_ccitt_update (uint16_t crc, uint8_t...
1
by: sklett | last post by:
I need to bang out a quick application to extract CCITT compressed TIF images from a ton of PDFs. I've used PDFSharp in the past to work with PDFs but ti doesn't have support for the PDF...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.