what does this compound operator do ?? " &= " ampersand,equal
" & " is the string concatenator operator
you used it in the HWPWM8 file ; but not the other HWPWMxx files
'
(line 89) select (channel) //**** code snippet
case 0 ///also the other cases
SWM_PINASSIGN6 &= &H00FFFFFF ' Select pin for CTOUT_0
SWM_PINASSIGN6 = SWM_PINASSIGN6 or (pin << 24)
'
*********
line 186) SCT_OUTPUT = SCT_OUTPUT or (1 << channel) 'Enable CTOUT_x
SCT_CTRL_L &= &HFFFFFFFB ' unhalt it: - clearing bit 2 of the CTRL register
'
LPC8xx.bas has this #define SWM_PINASSIGN6 *&H4000C018 [ a pointer, right? ]
[ it almost looks like some "C" crept in]
its not flagged as an error -- ?!
I'm getting a signal out on my pin 7 (I used channel 1(case 1)
.....I have used these to stop it
'#define SCT_STOP_L *&H50004010 ' 0x010 stop register for counter L
SCT_STOP_L = SCT_STOP_L or (5) 'bit 2 and bit 0 for event 2 & 0
'#define SCT_HALT_L *&H5000400C ' 0x00C halt register for counter L
SCT_HALT_L = SCT_HALT_L OR (5) 'bit 2 and bit 0 for event 2 & 0
'
seems to work - - olzeke51
compound operator
Re: compound operator
Those should be AND=
I've updated HWPWM8
I've updated HWPWM8