dsPIC30F5013 Switch ReadState Bug
Posted: Thu May 16, 2013 4:25 pm
Hi guys,
Using Flowcode dsPIC 5.5.2.1.
Simples I get the following when compiling my little project (SWICTH0 on PORTG_H_0 and LED0 on PORTB_H_1), anmd the program doesn't run on hardware.
test.c: In function 'FCD_SWITCH0_WaitUntilHigh':
test.c:304: warning: comparison is always true due to limited range of data type
test.c: In function 'FCD_SWITCH0_WaitUntilLow':
test.c:333: warning: large integer implicitly truncated to unsigned type
test.c:342: warning: comparison is always false due to limited range of data type
test.c: At top level:
test.c:293: warning: 'FCD_SWITCH0_WaitUntilHigh' defined but not used
test.c:331: warning: 'FCD_SWITCH0_WaitUntilLow' defined but not used
Compilation successful!
Return code = 0
Seems like a bug to me... and Flowcode won't read the status of PORTG_H_0 on hardware, I have chcked with the Flowcode debugger).
If I use an "Input" component in Flowcode to read PORTG_H_0, the program works fine.
Below the little program working and the one not working at all.
Thanks for looking into this!
Ronald
Using Flowcode dsPIC 5.5.2.1.
Simples I get the following when compiling my little project (SWICTH0 on PORTG_H_0 and LED0 on PORTB_H_1), anmd the program doesn't run on hardware.
test.c: In function 'FCD_SWITCH0_WaitUntilHigh':
test.c:304: warning: comparison is always true due to limited range of data type
test.c: In function 'FCD_SWITCH0_WaitUntilLow':
test.c:333: warning: large integer implicitly truncated to unsigned type
test.c:342: warning: comparison is always false due to limited range of data type
test.c: At top level:
test.c:293: warning: 'FCD_SWITCH0_WaitUntilHigh' defined but not used
test.c:331: warning: 'FCD_SWITCH0_WaitUntilLow' defined but not used
Compilation successful!
Return code = 0
Seems like a bug to me... and Flowcode won't read the status of PORTG_H_0 on hardware, I have chcked with the Flowcode debugger).
If I use an "Input" component in Flowcode to read PORTG_H_0, the program works fine.
Below the little program working and the one not working at all.
Thanks for looking into this!
Ronald