I have a small problem. After installing version v.0.95.007 I recompile with new compiler the source files. The receive files that do not behave properly. If sources are compile in V 0.94 04/02/2015 files obtained are accurate.I uninstalled all traces v.0.95.007 cleaned and reinstalled. It still does not work. A little help please .
Attach files: two files with the same content and files generated by the two compilers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Port port C2 drive a transistor that is connected lcd screen. HPWM order 1, 40, 90 not determine the proper function PWM. The same file compiled with the older version works correctly
does not matter what value put in HPWM 1, 40, 90 if compiled with the new version, the fill factor is not changed and is very small. With the old version correct results are obtained. I checked with oscilloscope
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Fix 285 resolves this issue.
'#285 Fix pwm.h Fixed legacy PWM command. BIT tests were executing the incorrect ASM.
Testing shows that PWMON and HWPWM for this chip architecture is operating as expected. The screenshot below shows HPPWM on channel 1 and PWMON (using the defines) on channel two.
.
The code is changing the duty so the duty % is therefore correct.
The test program below was used. This is now part of the demo suite.
'''A demonstration program for GCGB and GCB.'''--------------------------------------------------------------------------------------------------------------------------------'''This program ia a demonstration of Hardare PWM, but, this also shows how to use PWMON.'''ThePWMissettobeonCCP1andCCP2.''':'''@authorEvanV'''@licence GPL'''@version1.0a'''@date 24.10.2016'''********************************************************************************;-----Configuration#chip 16f886,8#config LVP_OFF, BOR_OFF, MCLRE_Off,HS_OSC#option explicit'Define the ports#define CCP1Port portc.2#define CCP2Port portc.1'Ensure the ports are outputsdirCCP1PortoutdirCCP2Portout'Set two variables to the spefic values we wantDimFrequencyValue,DutyPercentValueasbyteDutyPercentValue=204'this equate to 80%. 204 is 80% of 255. 255 is 100%FrequencyValue=76'starting frequencyHPWM2,FrequencyValue,DutyPercentValue#define PWM_Freq 76 'Set frequency in KHz#define PWM_Duty 80 'Set duty cycle to 80 %PWMOn'Turn on the CCP1/PWM. This command only operated on CCP1/PWMwait5s'Show the signals for 5 seconds on an oscilliscopedoForeverforDutyPercentValue=0to250step10HPWM2,FrequencyValue,DutyPercentValue' cycle thru the dutywait100msNextPWMOff'stop CCP1/PWMwait1sPWMOn'star CCP1/PWM againLoop''' GCB Optimisations 'Optmise PWM.h #define USE_HPWMCCP1 false #define USE_HPWMCCP2 true 'we are only using PWM/CCP2 #define USE_HPWMCCP3 false #define USE_HPWMCCP4 false #define USE_HPWMCCP5 false
Last edit: Anobium 2016-10-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a small problem. After installing version v.0.95.007 I recompile with new compiler the source files. The receive files that do not behave properly. If sources are compile in V 0.94 04/02/2015 files obtained are accurate.I uninstalled all traces v.0.95.007 cleaned and reinstalled. It still does not work. A little help please .
Attach files: two files with the same content and files generated by the two compilers.
files
I have to ask what does not work?
I do not know what to look for. Compile error? LCD not working? sorry, we need more infomation.
And, may I strongly recommend we get you on the latest build as this has 100's of improvements over the older versions.
Port port C2 drive a transistor that is connected lcd screen. HPWM order 1, 40, 90 not determine the proper function PWM. The same file compiled with the older version works correctly
does not matter what value put in HPWM 1, 40, 90 if compiled with the new version, the fill factor is not changed and is very small. With the old version correct results are obtained. I checked with oscilloscope
Recommend we get you onto v0.95.010 code. PWM has been revised to provide better backwards compatibility support.
These issues are resolved in v0.95.010.
Fix 285 resolves this issue.
'#285 Fix pwm.h Fixed legacy PWM command. BIT tests were executing the incorrect ASM.
Testing shows that PWMON and HWPWM for this chip architecture is operating as expected. The screenshot below shows HPPWM on channel 1 and PWMON (using the defines) on channel two.
The code is changing the duty so the duty % is therefore correct.
The test program below was used. This is now part of the demo suite.
Last edit: Anobium 2016-10-25