View previous topic :: View next topic |
Author |
Message |
skyforme
Joined: 18 Jul 2005 Posts: 14
|
Where can I see PDCxL/H register? |
Posted: Wed Aug 24, 2005 3:30 pm |
|
|
Hello.
I am trying to use pwm.
However, there is no signal.
I was trying to use both of assm and c but no result...
now, I am trying to see PDCxL/H, but I do not find where it is.
(I am using ICD-U)
because when I use assm
If I do like this
movf SPEED_REF,W;
movwf PDC0H
movwf PDC1H
movwf PDC2H
movwf PDC3H
PDCOH=0 and PDC1H=0 even if W=0x30
Is there any idea about this problem? |
|
|
skyforme
Joined: 18 Jul 2005 Posts: 14
|
|
Posted: Wed Aug 24, 2005 3:47 pm |
|
|
OOPS
I forgot to say this one..My chip is 18f4431 and I am trying to use power pwm. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Aug 24, 2005 4:04 pm |
|
|
Quote: | movwf PDC0H
I am trying to see PDCxL/H, but I do not find where it is. |
See my post about declaring register addresses with the #byte statement
in this previous thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=24116 |
|
|
skyforme
Joined: 18 Jul 2005 Posts: 14
|
|
Posted: Wed Aug 24, 2005 4:48 pm |
|
|
Hello
Thank you for your reply first.
However, I double checked about the command and even the example say like this.
int find_parity (int data) {
int count;
#asm
movlw 0x8
movwf count
movlw 0
loop:
xorwf data,w
rrf data,f
decfsz count,f
goto loop
movwf _return_
#endasm
}
and I declared w and others in the *.h file.
so I don't think that it is not parameter problem.
(however, I used #locate not #byte,
can it be problem?)
Thank you |
|
|
skyforme
Joined: 18 Jul 2005 Posts: 14
|
|
Posted: Wed Aug 24, 2005 4:54 pm |
|
|
Hello
Thank you for your reply first.
However, I double checked about the command and even the example say like this.
int find_parity (int data) {
int count;
#asm
movlw 0x8
movwf count
movlw 0
loop:
xorwf data,w
rrf data,f
decfsz count,f
goto loop
movwf _return_
#endasm
}
and I declared w and others in the *.h file.
so I don't think that it is not parameter problem.
(however, I used #locate not #byte,
can it be problem?)
Thank you |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
skyforme
Joined: 18 Jul 2005 Posts: 14
|
|
Posted: Wed Aug 24, 2005 7:18 pm |
|
|
Hello
Thank you very much about your link.
However, I know the mplab and I like it.
and thank you for your code, too.
maybe, some interrupt or other things corrupt my code
I will look up it again.
Anyway, I just double checked because the power pwm command didn't work for me, I feel more comfortable with c code.
and my question was
I could not fine some sfrs related to pwm in the Peripheral tab
in side menu of thd ICD debugger mode.
and ICD is quite slow if I try to read Peripherals - is it ok?
anyway, so I tried to see some sfrs by using assembler..
so where can I see them? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Aug 24, 2005 7:52 pm |
|
|
Quote: | I just double checked because the power pwm command didn't work for me |
Do you have the latest version of the compiler ? (PCH vs. 3.232)
It has this example file: EX_POWER_PWM.C
It shows a basic example of how to use the CCS power pwm functions.
Look for it in this folder: c:\Program Files\Picc\Examples |
|
|
skyforme
Joined: 18 Jul 2005 Posts: 14
|
|
Posted: Wed Aug 24, 2005 8:06 pm |
|
|
Unfortunately, my version is 3.228.
I was wondering why there was no example..
yes that's the reason..
anyway, when did it come out? I upgraded june 14th.. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Aug 24, 2005 8:25 pm |
|
|
I think it came out today.
If you can't download the latest version, then email CCS support
and ask them if they will email that example file to you. |
|
|
skyforme
Joined: 18 Jul 2005 Posts: 14
|
|
Posted: Wed Aug 24, 2005 8:39 pm |
|
|
wow
thank you very much. |
|
|
|