I have an array that is 12 spaces long. I am trying to compare the second space of the array ( array[1] ) to a numerical value. The array contains ascii characters and numbers ( numbers in this case ). When array[1] is equal to or greater than 6, I want to make a pin go high. This is the code I am using:
if array[1] >= 6 then
high portb.7
endif
When I do this, it makes the pin high no matter what. I know for sure that array[1] is not greater than 6 because I can see what value it is on an lcd. Any ideas as to what I am doing wrong? Thanks for any help.
Bookmarks