MEL PICBASIC Forum - PBP3
http://www.picbasic.co.uk/forum/
Discussion related to the PBP3 compilerenSat, 15 Dec 2018 21:04:38 GMTvBulletin60http://www.picbasic.co.uk/forum/images/misc/rss.pngMEL PICBASIC Forum - PBP3
http://www.picbasic.co.uk/forum/
CRC engine in PIC18F67K40
http://www.picbasic.co.uk/forum/showthread.php?t=24035&goto=newpost
Fri, 07 Dec 2018 18:27:03 GMTHello to All-
Been some time since I have posted but I am asking if anyone has used the CRC module in this family?
I will need to generate a CRC16...Hello to All-
Been some time since I have posted but I am asking if anyone has used the CRC module in this family?
I will need to generate a CRC16 from a serial stream and wondered if this engine would do it.
Has anyone checked to see how efficient it is?
Regards to All,
Steve
]]>PBP3ecoli-557http://www.picbasic.co.uk/forum/showthread.php?t=24035I need to Tx always three digits
http://www.picbasic.co.uk/forum/showthread.php?t=24028&goto=newpost
Fri, 23 Nov 2018 18:49:04 GMTI am extracting a CRC from a string to send out serially. The resulting CRC can be any number from = 0 to 255 but I need to Tx always 3 digits so I...I am extracting a CRC from a string to send out serially. The resulting CRC can be any number from = 0 to 255 but I need to Tx always 3 digits so I came up with the following code. Is there any way to convert the CRC number into 3 digits in a simpler way?

Code:

W0 = 0
For DMY = 5 To 42
W0 = W0 + Pulse[DMY]
next DMY

DMY = W0.lowbyte

if DMY < 10 then
Pulse[43] = "0"
Pulse[44] = "0"
pulse[45] = DMY + 48
goto skip_CRC
endif