View previous topic :: View next topic |
Author |
Message |
johanpret
Joined: 23 Oct 2006 Posts: 33 Location: South Africa
|
USB CDC Not working? |
Posted: Tue Aug 31, 2010 12:53 am |
|
|
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
|
|
Posted: Tue Aug 31, 2010 4:05 pm |
|
|
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
|
|
Posted: Wed Sep 01, 2010 2:20 pm |
|
|
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:
but now I have to do this:
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
|
|
Posted: Wed Sep 01, 2010 2:36 pm |
|
|
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
|
|
Posted: Sat Sep 04, 2010 2:28 am |
|
|
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
|
|
Posted: Sat Sep 04, 2010 3:06 am |
|
|
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 |
|
|
|