Hi Lauren,
Forgot to point out the following in my last post -
Have a look at your Freq\n loops and see if you can spot a problem.
Freq1:
HIGH 0
Pauseus 3600
LOW 0
Pauseus 3600
If A2D_VALUE <> %00001111 Then Loop 'This line is not working!
Goto Freq1
If your code is getting here, then this is where it will stay, as it has strayed away from the 'main' loop where the A\D conversion was taking place. The 'result' register can never change from %00001111, consequently, the IF_THEN statement can never fail which will cause the program to cycle endlessly within this loop.
A technique I use to check program flow is to turn on\off an LED to signal when my code enters\exits various program paths. Invaluable to show where I've 'goofed'
If you are not already using 'Microcode Studio Plus' with PBPro I urge you to get it. There are some very clever people in this world and Mechanique are no exception.
Hope this helps.
Regards Mike B.
Bookmarks