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

USB CDC Not working?

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



Joined: 23 Oct 2006
Posts: 33
Location: South Africa

View user's profile Send private message Visit poster's website

USB CDC Not working?
PostPosted: Tue Aug 31, 2010 12:53 am     Reply with quote

I compiled with V4.112 and the USB does not enumerate any more. All worked fine in V4.109 Do you guys know of any changes that I should know of in the newer version of the compiler? It was on a Pic18f87j50.

Also the fuse HS_PLL changed to HSPLL. What is your guys experience? Do you have to retest your complete project again with every compiler upgrade? I almost send out 50 new units with the USB not working luckily I quickly demonstrated the product to the new client and the USB did not work. This caused egg in my face when I had to do fault finding in front of the customer and discovered its the new compiler version.

I guess I will not trust upgrades any more I will test before I use it.

I did send it to the support. Thought I put it here to let the guys on the forum know of the fault.

Is there any place where all possible faults with upgraded versions of the software are logged so that we can quickly see if there is anything that might apply to your code?
_________________
Johan Pretorius
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 31, 2010 4:05 pm     Reply with quote

Quote:
Do you have to retest your complete project again with every compiler upgrade?

Absolutely yes ! You should do this with any tool upgrade. A new
version should be treated with caution, and requires a complete test
of the product, including a review of the .LST file. Ideally, the .LST
files for the old and new versions should be compared in ExamDiff
(or a similar program) to see what changes were made. Then you will
know what changed.

In fact, a lot of people (including me), won't upgrade the compiler after
the project is complete. Any time I work on that project in the future,
I re-install the same version that was used to originally create it.
It's much safer that way.

When I download a new compiler version, I save it with a unique name
and save it in a special directory for compiler versions. Example of
archived installation programs for various compiler versions:
Quote:

pch3249.exe
.
.
.
pch4100.exe
.
.
.
pch4112.exe
equack



Joined: 21 Sep 2009
Posts: 21

View user's profile Send private message

PostPosted: Wed Sep 01, 2010 2:20 pm     Reply with quote

Try adding setting the specific CPUDIV and PLL fuses that you need instead of relying on the compiler defaults which may have changed between versions.

Example: My code used to work like this:

Code:
        #fuses HS


but now I have to do this:

Code:
         #fuses HS, CPUDIV1


You might need something like this if you're using the PLL:

Code:
         #fuses HSPLL, CPUDIV1, PLL4


-Erik
johanpret



Joined: 23 Oct 2006
Posts: 33
Location: South Africa

View user's profile Send private message Visit poster's website

PostPosted: Wed Sep 01, 2010 2:36 pm     Reply with quote

Thanks Erik but I do have that defined. I isolated the problem to the sense pin which is on PIN_H7. Somehow the pin operates as an input in V4.109 but in version 4.112 it return false all the time. I think there is some other fuse or setting that causes this pin not to be used as an input in V4.112

Johan
_________________
Johan Pretorius
johanpret



Joined: 23 Oct 2006
Posts: 33
Location: South Africa

View user's profile Send private message Visit poster's website

PostPosted: Sat Sep 04, 2010 2:28 am     Reply with quote

Just an update. The problem was with the setup on the analogs (setup_adc_ports(sAN0|sAN1|VSS_VDD)) on the PIC18f87j50. The ccs compiler have some error in setting up the analogs and PIN_H7 (AN15) was defined as an analog that is why the sense pin was not reading properly causing the USB not to work any more.

If u are using analogs on the PIC18F87J50 be aware of the problem in V 4.112

What do u guys think of the idea that error reporting become visible to CCS compliers users on active maintenance? That will help a lot in identifying possible problems and the real changes in bug fixes and upgrades between versions. I for one would like to have a better understanding on what changed between version upgrades and not just a cryptic "Corrected some problems with register names in the device database"

If we have a proper understanding of what problems exactly changed maybe we can help identifying other problems as well or we could learn how to avoid some problems. I have used CCS for a long time I think is an excelent product but I would like to see the upgrades between versions handled better. Understanding changes between versions better might help towards achieving that goal. What do u guys think?

Johan
_________________
Johan Pretorius
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Sat Sep 04, 2010 3:06 am     Reply with quote

Quote:
I have used CCS for a long time I think is an excelent product but I would like to see the upgrades between versions handled better. Understanding changes between versions better might help towards achieving that goal. What do u guys think?


I feel somewhat helpless in this regard. Meanswhile I'm used to stumble over arbitrary changes to the CCS compilers and unexpected bugs in new versions.

There are basically two deficits: sparse documentation of changes and (apparently) only casual testing. Old-established CCS users convey the impression, that complains don't help much, it's been said a hundred times. Seems like a part of CCS corporate identity.

Frank
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