System Variables Not Updated In Modules
Posted: 10 Feb 2011 04:24
I Have a Module That adjusts the Actual Clock & timer values Based on the Set System Clock
This will Only Reflect a Change after a compile in TMR3_100uS_Reload , If I Modify The Module Or Delete the MCL
Code: Select all
module Interrupt_C8051
Include "Global"
'#define TMR3_Div12
#IFDEF TMR3_Div12 Then
const TMR3_100uS_Reload as word = 0xFFFF - ((Clock_Khz *1000) / 12 / 10000) ' TMR3CN.T3M = 0
#ELSE
const TMR3_100uS_Reload as word = 0xFFFF - ( Clock_Khz / 10) ' TMR3CN.T3M = 1 22118400
#ENDIF
..... etc