I found by accident a liitle oddity.
When you are using a unavailable Interrupt handler Great Cow BASIC will display a warning.
Let's asume you use the wrong chip in the setting#chip 18f25k20, 16 (in reality you use the Chip 18F25K20)
instead of #chip 18f25k22, 16
the 18F25K20 has no AN16 and no AN17 i.e.
But, when you using the unavailable AN17 Port Great Cow BASIC does it treat as normal Variable and do not complain.
It is possible to look into the chipdata.dat and find if the chip you used has this ANx Port or not.
You as the user have made the error, you should look always in the Datasheet :-)
But I think, the Compiler is your friend he has the knowledge of the Chip and available Ports and should complain and throw a Warning as like it does for the Interrupt handler.
Last edit: bed 2017-09-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hard to resolve this one. Just really hard - with AN0 you must be sure that you have the addressing correct. The ADC routines accept constants and variables to give the greatest flexible.
I am not sure of a way to resolve without a huge amount of work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, if one fell once over it, it's solved anyway. Sometimes making a Program foolprof is nce but I agree, this time the point goes to you. Leave it as it is, Take brain for other more important things :-)
I could make a FAQ Entry for that ... hmhm
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found by accident a liitle oddity.
When you are using a unavailable Interrupt handler Great Cow BASIC will display a warning.
Let's asume you use the wrong chip in the setting
#chip 18f25k20, 16(in reality you use the Chip 18F25K20)instead of
#chip 18f25k22, 16the 18F25K20 has no AN16 and no AN17 i.e.
But, when you using the unavailable AN17 Port Great Cow BASIC does it treat as normal Variable and do not complain.
It is possible to look into the chipdata.dat and find if the chip you used has this ANx Port or not.
You as the user have made the error, you should look always in the Datasheet :-)
But I think, the Compiler is your friend he has the knowledge of the Chip and available Ports and should complain and throw a Warning as like it does for the Interrupt handler.
Last edit: bed 2017-09-20
Hard to resolve this one. Just really hard - with AN0 you must be sure that you have the addressing correct. The ADC routines accept constants and variables to give the greatest flexible.
I am not sure of a way to resolve without a huge amount of work.
Ok, if one fell once over it, it's solved anyway. Sometimes making a Program foolprof is nce but I agree, this time the point goes to you. Leave it as it is, Take brain for other more important things :-)
I could make a FAQ Entry for that ... hmhm