View previous topic :: View next topic |
Author |
Message |
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Mon May 18, 2020 7:47 am |
|
|
While I've tried other compilers since I bought PCM back as V2.54..(came with spiral bound book !) I stayed with CCS. Life, well proramming, is far less complicated using CCS. I can't type (bum finger), so over the years I've created an extensive library of solid working functions and drivers. Also getting too old to learn yet another compiler, especially one that needs a LOT of code for simple things, like 'RS232'.
Jay |
|
|
ads
Joined: 09 May 2020 Posts: 11
|
|
Posted: Mon May 18, 2020 8:36 am |
|
|
gaugeguy wrote: | Quote: | Actually what I want is to write codes in an another compiler. To do this, I need to understand functions and how it works. Thank you all for reading. And sorry for dwelling on this subject. |
Are you trying to use the CCS built in functions for a different compiler? |
Yes. I used student version and now I am no longer a student soon I won't be able to use it. And since XC8 is free and some of the firms here are using mplab, I need to learn it.
Quote: | While I've tried other compilers since I bought PCM back as V2.54..(came with spiral bound book !) I stayed with CCS. Life, well proramming, is far less complicated using CCS. I can't type (bum finger), so over the years I've created an extensive library of solid working functions and drivers. Also getting too old to learn yet another compiler, especially one that needs a LOT of code for simple things, like 'RS232'. |
Thanks sir, I will keep that in mind. |
|
|
gaugeguy
Joined: 05 Apr 2011 Posts: 303
|
|
Posted: Mon May 18, 2020 9:17 am |
|
|
The CCS built in functions provide a simplified way to set up the PIC peripherals so that getting code running is quicker.
These functions do not work in XC8. If you want to use XC8 you will need to learn how to set up peripherals using the XC8 functions and definitions.
While both do set the hardware registers they use very different C code to accomplish this. You cannot cut and paste from one to the other. |
|
|
ads
Joined: 09 May 2020 Posts: 11
|
|
Posted: Mon May 18, 2020 9:40 am |
|
|
gaugeguy wrote: | The CCS built in functions provide a simplified way to set up the PIC peripherals so that getting code running is quicker.
These functions do not work in XC8. If you want to use XC8 you will need to learn how to set up peripherals using the XC8 functions and definitions.
While both do set the hardware registers they use very different C code to accomplish this. You cannot cut and paste from one to the other. |
I know. That is why I was trying to find definition / declaration. To understand and write my own (some parts of it) if necessary |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Mon May 18, 2020 10:24 am |
|
|
Problem is that the actual CCS functions are excruciatingly complex.
#USE RS232 for example can code for different baud rates, different clocks,
different UARTs, and even for software serial. Probably about thirty
different possible solutions.
Seriously, if you want this flexibility, use CCS. |
|
|
|