Hi Ashley, I looked at your code and it looks great. I think this will work for us. We can either CRC the entire message before we start sending it. This will delay the message a little bit but I think it will be OK. Great contribution to the list! Tal > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Ashley Roll > Sent: Saturday, May 11, 2002 11:59 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: Looking for an efficient CRC > > > Hi Tal, > > > Is there a good CRC or error detection mechanism that can be > > consume only > > few instructions for each byte of data ? Somebody mention to > > us that we can > > speed up algorithms such as CRC16 using lookup tables but I > > don't think the > > 12c508 can hold tables of decent size. > > I was probably the one you were thinking of. I suggested that one could > implement a table based CRC16 using tables less then 256 items in a > discussion about a week ago. > > For instance you could build a CRC16 that updates 4 bits per time > using two > 16 element tables. This is 32 instructions for data plus a few extra > instructions to do the jump into the table. This should easily fit on the > first code page in a 12C805 if you haven't got any other tables you should > be fine. > > I've not actually tried to implement this technique yet, but it > should work. > From a quick "Guess-timate" of the algorithm it will probably be somewhere > in the order of 50-70 instruction cycles per byte to update the CRC.. > > Is that going to be fast enough? > > Maybe its time I actually tried to implement this.. > > Cheers, > Ash. > > --- > Ashley Roll > Digital Nemesis Pty Ltd > www.digitalnemesis.com > Mobile: +61 (0)417 705 718 > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body