View previous topic :: View next topic |
Author |
Message |
serching
Joined: 06 Apr 2004 Posts: 9
|
compile problem |
Posted: Thu Jun 24, 2004 2:20 am |
|
|
I found one problem when i wrote the program for ADC at 18LF6720. When i compile the program and check the assembly for the program i found that the compiler only write the register according to 18CXX2 type PIC which only has ADCON0 and ADCON1 but the 18LF6720 has ADCON0, ADCON1 and ADCON2. Because of this problem i can't run my program correctly. Does anyone know how to solve this problem? Thanks! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jun 24, 2004 1:53 pm |
|
|
If a built-in function doesn't work correctly, you have several options:
1. Email CCS support and wait for a new version of the compiler
to come out, which hopefully fixes your problem.
2. If you have PCW or PCWH, try to use the Device Editor to edit
the device data, and possibly fix the problem.
3. Read the PIC data sheet in the section on the peripheral that you
want to use. Study how to use the peripheral with regard to
register settings. Also compile a sample program and look at
the .LST file, to see how CCS programs the registers.
Then use the CCS directives, #byte and #bit, to declare the PIC
register addresses of the PIC's peripheral registers. Then write
code which will read/write directly to the PIC registers, so you
perform the same function as the CCS library code.
Or, to be short: You have to do some work. |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Thu Jun 24, 2004 4:03 pm |
|
|
GAH!!!! WORK! |
|
|
serching
Joined: 06 Apr 2004 Posts: 9
|
|
Posted: Thu Jun 24, 2004 7:51 pm |
|
|
rnielsen,
Do u means u can work well with this program? Can u tell me how u can do that?
Thanks for ur suggestion PCM programmer! |
|
|
|