freq=4000 'test frequency
hpwm 1,duty,freq 'Start PWM
HPWM 2,duty,1000 ' Send duty cycle PWM signal at 1kHz
I know one thing that's not right. You can not have two different frequency on...
serout2 serpin,N9600,[DEC (temperature/100)] if possible
might need to be
yes your correct hendrick have removed the if/else statements
I don't think you need the IF/ELSE/ENDIF block in there. SDC_Byte = ((Menu_Subtxt-1)//6) * Data_Length should work fine even when Menu_Subtxt - 1 equals 0.
In trying to get a 16887 PWM running I am using the following code. When I run the code the LED's don't change in intensity at all and in fact the PWM does not appear to run. I can't decide if the...
- it is used to put 42 bytes into flash per page of 256 bytes of data
Data_Length = 42 ' 38chrs + 4 byte setting - required varable for spi...
Yes, that's true, but if you add dec to the serout command it doesn't compile
OMG - gee i been playing with hours and i have variations of this same code but it did not work , THANKYOU hendrick , sometime you cant see the wood for the trees
EndValue = ((Count - 1) // 6) * 42
Is that what you want?
count in the table is Menu_subtxt varable
end code in the table is the value of SDC_Byte
byte code in table the intrum caculation prior to mulitply data length
There is no content in this section