CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

ADC definitions disappeared from header file?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
koesterk



Joined: 15 Apr 2008
Posts: 3

View user's profile Send private message

ADC definitions disappeared from header file?
PostPosted: Wed Jan 26, 2011 2:25 am     Reply with quote

Hi,
after more than 2 years I updated my PCM compiler. Unfortunately, I can't compile my code any more now. This line causes an error:

Code:
SETUP_ADC_PORTS(sAN11);


I checked the corresponding header file "16F677.h" and I found something interesting. The version from my old compiler looks like this:

Code:
// Constants used in SETUP_ADC_PORTS() are:
#define sAN0            1       //| A0
#define sAN1            2       //| A1
#define sAN2            4       //| A2
#define sAN3            8       //| A4
#define sAN4            16      //| C0
#define sAN5            32      //| C1
#define sAN6            64      //| C2
#define sAN7            128     //| C3
#define sAN8         0x10000    //| C6
#define sAN9         0x20000    //| C7
#define sAN10        0x40000    //| B4
#define sAN11        0x80000    //| B5
#define NO_ANALOGS      0       // None
#define ALL_ANALOG   0xF00FF    // A0 A1 A2 A4 C0 C1 C2 C3 C6 C7 B4 B5

// One of the following may be OR'ed in with the above using |
#define VSS_VDD              0x0000        //| Range 0-Vdd
#define VSS_VREF             0x4000        //| Range 0-Vref


The latest version of this header file looks slightly different:

Code:
// Constants used in SETUP_ADC_PORTS() are:
// First argument:
// OR together desired pins
#define sAN0                   1         //| A0
#define sAN1                   2         //| A1
#define sAN2                   4         //| A2
#define sAN3                   8         //| A4
#define sAN4                  16         //| C0
#define sAN5                  32         //| C1
#define sAN6                  64         //| C2
#define sAN7                  128        //| C3
#define NO_ANALOGS             0         // None
#define ALL_ANALOG            255        // A0 A1 A2 A4 C0 C1 C2 C3

// Optional Second argument:
#define VSS_VDD              0x0000  // Range 0-Vdd
#define VSS_VREF             0x4000  // Range 0-VrefH


Who knows why CCS has removed sAN8 .. sAN11 from this file? I found the same effect in many other header files from this chip family.

Thanks and best Regards
Klaus
Ttelmah



Joined: 11 Mar 2010
Posts: 19497

View user's profile Send private message

PostPosted: Wed Jan 26, 2011 3:13 am     Reply with quote

Load 4.099 instead, and swear at CCS.....

Learn a simple 'fact' about CCS. The latest releases are untested/unreliable. They seem to post code without any testing (they claimed some years ago, that they were improving this, but there has never been any sign of this becoming true....).
The last couple of releases have been full of problems, and the sections of include file 'going walkabout', is another to add to the list. On the download page, they always post the 'last known reasonably good' version as well for download, and unless you need a feature that is in the latest release, you are better off using this.
You could try just adding the defines back, but the fault does represent the 'state' of the compiler.

Best Wishes
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Jan 26, 2011 7:16 am     Reply with quote

I think one of the problems they're facing is the ever increasing number of PICs available.Way too many choices,features,etc.20 years ago,you used the 16C84 and 16F877...now there are hundreds of PIC types.
To their credit they try to get the compilers 'up to date' as fast as they can,but to try every function of every periperhal of could take them days, then there's all the CCS supplied functions and libraries(math,etc.).
It's a mind numbing task when you consider the challenge!
If you think it's simple, please, cut code to exercise and test all the hardware and software fuctions of say a PIC12F683.Might be interesting to log how many days( !) you spend on just that 'simple' PIC.

Whatever the problems are, it sure beats toggling in bootloaders on PDP-8Es !
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Wed Jan 26, 2011 8:31 am     Reply with quote

temtronic wrote:


Whatever the problems are, it sure beats toggling in bootloaders on PDP-8Es !


Yep !! Been there, done that ... That was why my first S-100 system used a "Morrow's Mircostuff" 8080 cpu/front panel that had an octal keypad. Still have my old "sliderule" for hand assembling octal code for the 8080 - still have the cpu and sliderule downstairs too Twisted Evil

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group