It looks from your code you are not setting the bit you want to toggle. the statement should be HIGH GPIO.2 or LOW GPIO.2. By saying just GPIO you are trying to set the entire port. Also if you are trying to use port pin 2 you are not setting it for output mode. That should be TRISIO.2 = 0 to set the port pin 2 to output. I hope this helps....