473,805 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CCITT in C++ for AVR

Hi,

I'm reposting my question in this group from comp.arch.embed ded - 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
microcontroller s 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 microcontroller s
(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 microcontroller s (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 4770
RadGar wrote:
To the subject now - I have no idea what type of compilers are
available for such microcontroller s (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 microcontroller s (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
17882
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, but need to get a program that tests it with python as well. Thanks!
2
2595
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 BIT ANSI X3.66 CRC checksum files */ #include <stdio.h> #include "crc.h"
40
2006
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 printbits_reverse(unsigned char a){ int i; for(i=0 ; i < CHAR_BIT ; i++)
0
1243
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 knw that i need to use the ""SETAUDIO"" where i can set the FORMAT.... but i am not able to do it On Clicking Record Button
0
1929
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, but C# is also an option. I am not sure if I am allowed to purchase 3rd party plug-ins / controls / etc. for this project, so a code sample that worked would be great. I have not done amything like this before, and I am tight on time. Any help...
6
2272
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 must 2.4 as it is the last PythonCE release with great improvements). But I've been stuck with a script wich does not work as expected once translated to python, 2.4
1
2683
by: Ed | last post by:
Please help me with an algorithm to calculate CRC-CCITT in C++ Thanks
2
2896
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 data) { data ˆ= lo8 (crc);
1
3177
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 /CCITTFaxDecode filter. I've googled for the obvious terms to try to find some code samples or information about how to accomplish what I want but haven't found anything at all. If anyone here has experience in working with PDFs and extracting TIFFs...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10107
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7649
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5544
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3846
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.