I am using CodeWarrior 5.1 Special Edition and am having trouble passing a value to a function.
The call from main()
setLEDDutyCycle(ATD1DR2L);
(Value of ATD1DR2L = 0xA0) as read from an external pot.
The function is as follows:
static void setLEDDutyCycle(uint8_t dc){
PWMCTY5 = dc;
PWMDTY4 = dc;
}
When stepping through the function in the Simulator/Debugger the value of the local variable dc in the DATA1 window shows as
dc <not allocated> unsigned char
Other functions that I have are working, but confused about this one.
Any ideas where I am off track?