At first, I am not familiar with assembler, PicBasic Pro I can work with.
It seems it's not complete yet.
I think it doesn't "see" 2 bits.
At portb I use a led to see if it works.
The led's intensity increases 4 times like a sawtooth, decreases the same way, 10-bits in 4 times 8 bits.
Would you be so kind to help me with the final part?
OSCCON = $60 ' 4 MHz
CCP1CON = %00111100
DEFINE CCP1_REG PORTB
DEFINE CCP1_BIT 3
ADCON1 = %00000111
TRISA = %11111111
TRISB = %00000000
PORTB = %00000000
n VAR WORD
Clear
BEGIN:
For n=1 TO 1023
HPwm 1,n,1000
Pause 4
Next
Pause 2000
For n=1023 TO 1 STEP -1
HPwm 1,n,1000
Pause 4
Next
Pause 2000
GoTo BEGIN
Bookmarks