CC5X/CC8E C compiler-Does/has anyone used it? - Page 1
Forum section: electronics / general

author: djsb
author_rank: Super Contributor
timestamp: September 28, 2024, 05:27:38 pm
content: I'm going to give trying to understand some CC5X compiler code a tryhttps://www.bknd.com/cc5x/I'm just wondering if anyone here has used it at all? Is there any example code anywhere? The task I have eventually set myself is to understand the code used in this Sparkfun Serial LCD. This uses a PIC16F88 MCU (I wonder if this could be replaced with a more recent part, as there appears to be a lot of silicon errata documents on the 16F88).https://www.sparkfun.com/products/retired/9395https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/30487D.pdfThe firmware is under the documents tab and uses this compiler. As this LCD board is no longer available, I had the idea that maybe I could make a custom version (of the PCB using TH parts)for a standard 16 x 2 LCD. I could of course port the code to CCS C or XC8, but as the hex file is supplied, I don't want to make it too much work (and I'm a newbie C programmer, which does not help). Besides, I may want to add I2C capability as well. What are your thoughts on this compiler if you have used it? Thanks.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 28, 2024, 06:48:34 pm
content: I remember of it back in early 2000's. Didn't know it still existed.

author: westfw
author_rank: Super Contributor
timestamp: September 28, 2024, 07:51:04 pm
content: I also used it (slightly) way back when. I don't remember it having any horrible problems.IMO, that the web site still exists is a good sign.It does seem to have some non-standard C bits that are probably useful for microcontrollers; your big challenge is whether any of them really bother you...Code://Hardware port definitions#define RS PORTB.4#define R_W PORTB.1#define BL_Control PORTA.4#define CLR_DISP 0b.0000.0001 //Clear display#define CUR_HOME 0b.0000.0010 //Move cursor home and clear screen memory#define CUR_RIGHT 0b.0001.0100 //Move cursor one to right#define CUR_LEFT 0b.0001.0000 //Move cursor one to leftAlso of worry is whether it will load up the .h files provided by microchip for newer PICs (and whether it supports the newer sub-architectures. IIRC I used on a 12F509, which has the very minimal 12bit PIC core. Since then there are 14 and I think 16bit (I'm talking instruction width, not data width) "enhanced" PICs with some additional instructions. cc5x may or may not support these.

author: djsb
author_rank: Super Contributor
timestamp: September 28, 2024, 08:18:11 pm
content: Here is the list of MCU supported by CC5XCode:The CC5X C compiler supports all the listed devices.The header files are also available from the download page.Available header file list:Device Header file PublishedPIC10F200 10F200.H 3.2APIC10F202 10F202.H 3.2APIC10F204 10F204.H 3.2APIC10F206 10F206.H 3.2APIC10F220 10F220.H 3.2IPIC10F222 10F222.H 3.2IPIC10F320 10F320.H 3.5PIC10F322 10F322.H 3.5PIC12C508 12C508.H 3.1KPIC12C508A 12C508A.H 3.1KPIC12C509 12C509.H 3.1KPIC12C509A 12C509A.H 3.1KPIC12C671 12C671.H 3.1KPIC12C672 12C672.H 3.1KPIC12CE518 12CE518.H 3.1KPIC12CE519 12CE519.H 3.1KPIC12CE673 12CE673.H 3.1KPIC12CE674 12CE674.H 3.1KPIC12(L)F1501 12F1501.H 3.5APIC12LF1552 12F1552.H 3.5PIC12(L)F1571 12F1571.H 3.5APIC12(L)F1572 12F1572.H 3.5APIC12(L)F1612 12F1612.H 3.5APIC12(L)F1822 12F1822.H 3.4HPIC12(L)F1840 12F1840.H 3.5APIC12F508 12F508.H 3.2FPIC12F509 12F509.H 3.2FPIC12F510 12F510.H 3.2IPIC12F519 12F519.H 3.3HPIC12F609 12F609.H 3.4DPIC12F615 12F615.H 3.4DPIC12F617 12F617.H 3.4DPIC12F629 12F629.H 3.2IPIC12F635 12F635.H 3.4DPIC12F675 12F675.H 3.4DPIC12F683 12F683.H 3.4DPIC12F752 12F752.H 3.4HPIC12HV609 12HV609.H 3.4DPIC12HV615 12HV615.H 3.4DPIC12HV752 12HV752.H 3.4HPIC14000 14000.H 3.1KPIC16C432 16C432.H 3.1KPIC16C433 16C433.H 3.1KPIC16C505 16C505.H 3.1KPIC16C52 16C52.H 3.1KPIC16C54A 16C54.H 3.1KPIC16C54C 16C54.H 3.1KPIC16CR54B 16C54.H 3.1KPIC16CR54C 16C54.H 3.1KPIC16C54 16C54.H 3.1KPIC16CR54A 16C54.H 3.1KPIC16C54B 16C54.H 3.1KPIC16C55 16C55.H 3.1KPIC16C55A 16C55.H 3.1KPIC16C554 16C554.H 3.1KPIC16C556 16C556.H 3.1KPIC16C558 16C558.H 3.1KPIC16CR56A 16C56.H 3.1KPIC16C56A 16C56.H 3.1KPIC16C56 16C56.H 3.1KPIC16CR57B 16C57.H 3.1KPIC16C57C 16C57.H 3.1KPIC16CR57C 16C57.H 3.1KPIC16C57 16C57.H 3.1KPIC16CR58B 16C58.H 3.1KPIC16C58 16C58.H 3.1KPIC16C58B 16C58.H 3.1KPIC16CR58A 16C58.H 3.1KPIC16C58A 16C58.H 3.1KPIC16C61 16C61.H 3.1KPIC16CR62 16C62.H 3.1KPIC16C62 16C62.H 3.1KPIC16C620 16C620.H 3.1KPIC16C620A 16C620A.H 3.1KPIC16CR620A 16C620A.H 3.1KPIC16C621 16C621.H 3.1KPIC16C621A 16C621A.H 3.1KPIC16C622 16C622.H 3.1KPIC16C622A 16C622A.H 3.1KPIC16C62A 16C62A.H 3.1KPIC16C62B 16C62B.H 3.1KPIC16C63 16C63.H 3.1KPIC16CR63 16C63.H 3.1KPIC16C63A 16C63A.H 3.1KPIC16C64 16C64.H 3.1KPIC16CR64 16C64.H 3.1KPIC16C641 16C641.H 3.1KPIC16C642 16C642.H 3.1KPIC16C64A 16C64A.H 3.1KPIC16C65 16C65.H 3.1KPIC16CR65 16C65.H 3.1KPIC16C65A 16C65A.H 3.1KPIC16C65B 16C65B.H 3.1KPIC16C66 16C66.H 3.1KPIC16C661 16C661.H 3.1KPIC16C662 16C662.H 3.1KPIC16C67 16C67.H 3.1KPIC16C71 16C71.H 3.1KPIC16C710 16C710.H 3.1KPIC16C711 16C711.H 3.1KPIC16C712 16C712.H 3.1KPIC16C715 16C715.H 3.1KPIC16C716 16C716.H 3.1KPIC16C717 16C717.H 3.1KPIC16C72 16C72.H 3.1KPIC16CR72 16C72.H 3.1KPIC16C72A 16C72A.H 3.1KPIC16C73 16C73.H 3.1KPIC16C73A 16C73A.H 3.1KPIC16C73B 16C73B.H 3.1KPIC16C74 16C74.H 3.1KPIC16C745 16C745.H 3.1KPIC16C74A 16C74A.H 3.1KPIC16C74B 16C74B.H 3.1KPIC16C76 16C76.H 3.1KPIC16C765 16C765.H 3.1KPIC16C77 16C77.H 3.1KPIC16C770 16C770.H 3.1KPIC16C771 16C771.H 3.1KPIC16C773 16C773.H 3.1KPIC16C774 16C774.H 3.1KPIC16C781 16C781.H 3.1KPIC16C782 16C782.H 3.1KPIC16C83 16C83.H 3.1KPIC16CR83 16C83.H 3.1KPIC16CR84 16C84.H 3.1KPIC16C84 16C84.H 3.1KPIC16C923 16C923.H 3.1KPIC16C924 16C924.H 3.1KPIC16C925 16C925.H 3.1KPIC16C926 16C926.H 3.1KPIC16CE623 16CE623.H 3.1KPIC16CE624 16CE624.H 3.1KPIC16CE625 16CE625.H 3.1KPIC16(L)F1454 16F1454.H 3.5APIC16(L)F1455 16F1455.H 3.5APIC16(L)F1459 16F1459.H 3.5APIC16(L)F1503 16F1503.H 3.5APIC16(L)F1507 16F1507.H 3.5APIC16(L)F1508 16F1508.H 3.5APIC16(L)F1509 16F1509.H 3.5APIC16(L)F1512 16F1512.H 3.5APIC16(L)F1513 16F1513.H 3.5APIC16(L)F1516 16F1516.H 3.5APIC16(L)F1517 16F1517.H 3.5APIC16(L)F1518 16F1518.H 3.5APIC16(L)F1519 16F1519.H 3.5APIC16F15213 16F15213.H 3.8PIC16F15214 16F15214.H 3.8PIC16F15223 16F15223.H 3.8PIC16F15224 16F15224.H 3.8PIC16F15225 16F15225.H 3.8PIC16F15243 16F15243.H 3.8PIC16F15244 16F15244.H 3.8PIC16F15245 16F15245.H 3.8PIC16F15254 16F15254.H 3.8APIC16F15255 16F15255.H 3.8APIC16F15256 16F15256.H 3.8APIC16(L)F1526 16F1526.H 3.5APIC16(L)F1527 16F1527.H 3.5APIC16F15274 16F15274.H 3.8APIC16F15275 16F15275.H 3.8APIC16F15276 16F15276.H 3.8APIC16(L)F15313 16F15313.H 3.6PIC16(L)F15323 16F15323.H 3.6PIC16(L)F15324 16F15324.H 3.6PIC16(L)F15325 16F15325.h 3.6PIC16(L)F15344 16F15344.H 3.6PIC16(L)F15345 16F15345.h 3.6PIC16(L)F15354 16F15354.h 3.5GPIC16(L)F15355 16F15355.h 3.5GPIC16(L)F15356 16F15356.h 3.6PIC16(L)F15375 16F15375.h 3.6PIC16(L)F15376 16F15376.h 3.6PIC16(L)F15385 16F15385.h 3.6PIC16(L)F15386 16F15386.h 3.6PIC16LF1554 16F1554.H 3.5APIC16LF1559 16F1559.H 3.5APIC16LF1566 16F1566.h 3.5EPIC16LF1567 16F1567.h 3.5EPIC16(L)F1574 16F1574.H 3.5APIC16(L)F1575 16F1575.H 3.5APIC16(L)F1578 16F1578.H 3.5APIC16(L)F1579 16F1579.H 3.5APIC16(L)F1613 16F1613.H 3.5APIC16(L)F1614 16F1614.H 3.5APIC16(L)F1615 16F1615.H 3.5APIC16(L)F1618 16F1618.H 3.5APIC16(L)F1619 16F1619.H 3.5APIC16(L)F1703 16F1703.H 3.5APIC16(L)F1704 16F1704.H 3.5APIC16(L)F1705 16F1705.H 3.5APIC16(L)F1707 16F1707.H 3.5APIC16(L)F1708 16F1708.H 3.5APIC16(L)F1709 16F1709.H 3.5APIC16F17114 16F17114.H 3.8BPIC16F17115 16F17115.H 3.8BPIC16F17124 16F17124.H 3.8BPIC16F17125 16F17125.H 3.8BPIC16F17126 16F17126.H 3.8BPIC16(L)F1713 16F1713.H 3.5APIC16F17144 16F17144.H 3.8BPIC16F17145 16F17145.H 3.8BPIC16F17146 16F17146.H 3.8BPIC16F17154 16F17154.H 3.8CPIC16F17155 16F17155.H 3.8BPIC16F17156 16F17156.H 3.8BPIC16(L)F1716 16F1716.H 3.5APIC16(L)F1717 16F1717.H 3.5APIC16F17174 16F17174.H 3.8BPIC16F17175 16F17175.H 3.8BPIC16F17176 16F17176.H 3.8BPIC16(L)F1718 16F1718.H 3.5APIC16(L)F1719 16F1719.H 3.5APIC16(L)F1764 16F1764.H 3.5APIC16(L)F1765 16F1765.H 3.5APIC16(L)F1768 16F1768.H 3.5APIC16(L)F1769 16F1769.H 3.5APIC16(L)F1773 16F1773.h 3.5EPIC16(L)F1776 16F1776.h 3.5EPIC16(L)F1777 16F1777.h 3.5EPIC16(L)F1778 16F1778.h 3.5EPIC16(L)F1779 16F1779.h 3.5EPIC16(L)F1782 16F1782.H 3.5APIC16(L)F1783 16F1783.H 3.5APIC16(L)F1784 16F1784.H 3.5APIC16(L)F1786 16F1786.H 3.5APIC16(L)F1787 16F1787.H 3.5APIC16(L)F1788 16F1788.H 3.5APIC16(L)F1789 16F1789.H 3.5APIC16F18015 16F18015.H 3.8BPIC16F18025 16F18025.H 3.8BPIC16F18026 16F18026.H 3.8BPIC16F18044 16F18044.H 3.8BPIC16F18045 16F18045.H 3.8BPIC16F18046 16F18046.H 3.8BPIC16F18054 16F18054.H 3.8BPIC16F18055 16F18055.H 3.8BPIC16F18056 16F18056.H 3.8BPIC16F18074 16F18074.H 3.8BPIC16F18075 16F18075.H 3.8BPIC16F18076 16F18076.H 3.8BPIC16F18114 16F18114.H 3.8BPIC16F18115 16F18115.H 3.8BPIC16F18124 16F18124.H 3.8BPIC16F18125 16F18125.H 3.8BPIC16F18126 16F18126.H 3.8BPIC16F18144 16F18144.H 3.8BPIC16F18145 16F18145.H 3.8BPIC16F18146 16F18146.H 3.8BPIC16F18154 16F18154.H 3.8BPIC16F18155 16F18155.H 3.8BPIC16F18156 16F18156.H 3.8BPIC16F18174 16F18174.H 3.8BPIC16F18175 16F18175.H 3.8BPIC16F18176 16F18176.H 3.8BPIC16(L)F1823 16F1823.H 3.4HPIC16(L)F1824 16F1824.H 3.4EPIC16(L)F1825 16F1825.H 3.4HPIC16(L)F1826 16F1826.H 3.4HPIC16(L)F1827 16F1827.H 3.4HPIC16(L)F1828 16F1828.H 3.4EPIC16(L)F1829 16F1829.H 3.4HPIC16(L)F18313 16F18313.h 3.5EPIC16(L)F18323 16F18323.h 3.5EPIC16(L)F18324 16F18324.h 3.5EPIC16(L)F18325 16F18325.h 3.5EPIC16(L)F18326 16F18326.h 3.5EPIC16(L)F18344 16F18344.h 3.5EPIC16(L)F18345 16F18345.h 3.5EPIC16(L)F18346 16F18346.h 3.5EPIC16(L)F18424 16F18424.h 3.7DPIC16(L)F18425 16F18425.h 3.7DPIC16(L)F18426 16F18426.h 3.7PIC16(L)F18444 16F18444.h 3.7DPIC16(L)F18445 16F18445.h 3.7DPIC16(L)F18446 16F18446.h 3.7PIC16(L)F18455 16F18455.h 3.7DPIC16(L)F18456 16F18456.h 3.7DPIC16(L)F1847 16F1847.H 3.4HPIC16(L)F18854 16F18854.h 3.5EPIC16(L)F18855 16F18855.h 3.5EPIC16(L)F18856 16F18856.h 3.6PIC16(L)F18857 16F18857.h 3.5EPIC16(L)F18875 16F18875.h 3.5EPIC16(L)F18876 16F18876.h 3.6PIC16(L)F18877 16F18877.h 3.5EPIC16LF1902 16F1902.H 3.4HPIC16LF1903 16F1903.H 3.4HPIC16LF1904 16F1904.H 3.4HPIC16LF1906 16F1906.H 3.4HPIC16LF1907 16F1907.H 3.4HPIC16(L)F19155 16F19155.H 3.6PIC16(L)F19156 16F19156.H 3.6PIC16(L)F19175 16F19175.H 3.6PIC16(L)F19176 16F19176.H 3.6PIC16(L)F19185 16F19185.H 3.6PIC16(L)F19186 16F19186.H 3.6PIC16(L)F19195 16F19195.H 3.6PIC16(L)F19196 16F19196.H 3.6PIC16(L)F19197 16F19197.H 3.6PIC16(L)F1933 16F1933.H 3.4HPIC16(L)F1934 16F1934.H 3.4HPIC16(L)F1936 16F1936.H 3.4HPIC16(L)F1937 16F1937.H 3.4HPIC16(L)F1938 16F1938.H 3.4HPIC16(L)F1939 16F1939.H 3.4HPIC16(L)F1946 16F1946.H 3.4HPIC16(L)F1947 16F1947.H 3.4HPIC16F505 16F505.H 3.2APIC16F506 16F506.H 3.2IPIC16F526 16F526.H 3.3HPIC16F527 16F527.H 3.4IPIC16F54 16F54.H 3.2APIC16F57 16F57.H 3.5PIC16F570 16F570.H 3.5PIC16F570 16F570.H 3.5PIC16F59 16F59.H 3.5PIC16F610 16F610.H 3.4DPIC16F616 16F616.H 3.4DPIC16F627 16F627.H 3.1KPIC16F627A 16F627A.H 3.4DPIC16F628 16F628.H 3.1KPIC16F628A 16F628A.H 3.4DPIC16F630 16F630.H 3.4DPIC16F631 16F631.H 3.4DPIC16F636 16F636.H 3.4DPIC16F639 16F639.H 3.4DPIC16F648A 16F648A.H 3.4DPIC16F676 16F676.H 3.4DPIC16F677 16F677.H 3.4DPIC16F684 16F684.H 3.4DPIC16F685 16F685.H 3.4DPIC16F687 16F687.H 3.4DPIC16F688 16F688.H 3.4DPIC16F689 16F689.H 3.4DPIC16F690 16F690.H 3.4DPIC16(L)F707 16F707.H 3.4DPIC16F716 16F716.H 3.4DPIC16F72 16F72.H 3.2IPIC16(L)F720 16F720.H 3.4HPIC16(L)F721 16F721.H 3.4HPIC16(L)F722 16F722.H 3.4DPIC16(L)F722A 16F722A.H 3.4DPIC16(L)F723 16F723.H 3.4DPIC16(L)F723A 16F723A.H 3.4DPIC16(L)F724 16F724.H 3.4DPIC16(L)F726 16F726.H 3.4DPIC16(L)F727 16F727.H 3.4DPIC16F73 16F73.H 3.1KPIC16F737 16F737.H 3.2IPIC16F74 16F74.H 3.1KPIC16F747 16F747.H 3.2IPIC16F753 16F753.H 3.5PIC16F76 16F76.H 3.1KPIC16F767 16F767.H 3.2IPIC16F77 16F77.H 3.1KPIC16F777 16F777.H 3.2IPIC16F785 16F785.H 3.4DPIC16F818 16F818.H 3.4DPIC16F819 16F819.H 3.4DPIC16F83 16F83.H 3.1KPIC16F84 16F84.H 3.1KPIC16F84A 16F84A.H 3.1KPIC16F87 16F87.H 3.4DPIC16F870 16F870.H 3.2IPIC16F871 16F871.H 3.2IPIC16F872 16F872.H 3.2IPIC16F873 16F873.H 3.4DPIC16F873A 16F873A.H 3.4DPIC16F874 16F874.H 3.4DPIC16F874A 16F874A.H 3.4DPIC16F876 16F876.H 3.2IPIC16F876A 16F876A.H 3.2IPIC16F877 16F877.H 3.2IPIC16F877A 16F877A.H 3.2IPIC16F88 16F88.H 3.4DPIC16F882 16F882.H 3.4DPIC16F883 16F883.H 3.4DPIC16F884 16F884.H 3.4DPIC16F886 16F886.H 3.4DPIC16F887 16F887.H 3.4DPIC16F913 16F913.H 3.4DPIC16F914 16F914.H 3.4DPIC16F916 16F916.H 3.4DPIC16F917 16F917.H 3.4DPIC16F946 16F946.H 3.4DPIC16HV540 16HV540.H 3.1KPIC16HV610 16HV610.H 3.4DPIC16HV616 16HV616.H 3.4DPIC16HV753 16HV753.H 3.5PIC16HV785 16HV785.H 3.4DThe current version is 3.8C

author: Howardlong
author_rank: Super Contributor
timestamp: September 28, 2024, 08:40:15 pm
content: I used it too around 20-25 years ago. It was the only PIC16 C compiler with floating point, or at least one that wasn’t horrendously expensive.I also used the PIC18 version around the same time frame. ISTR that you had to manually organise your RAM banks.I moved to Microchip’s C18, and then was grandfathered into XC8 (based on Hi-Tech PICC & PICC18) which covers both PIC16 & PIC18, so haven’t had any need for CC5X or CC8E since.Unless there’s a particular reason not to, XC8 is the way to go these days IMHO. Oh, and a newer PIC, although you won’t find a pin compatible one with a PIC16F88. Microchip have standardised on pinouts for PIC16 for over 15 years.

author: iMo
author_rank: Super Contributor
timestamp: October 14, 2024, 02:16:01 pm
content: Me too, also around 2000. The free version had the 32b floating point but not the 32bit integer, afaik. The cheapest paid version was not particularly cheap, btw. I can remember I put the BasicStamp's Basic into the 16F88 and added some new functions. Also all my DDS VFOs were written in it. CC5X was the most optimized C compiler for pics at that time, indeed.