Hey guys,
I've been working on an assembly assignment program for some time now and am having a few issues nearing the completion of the program. Basically it reads values from the ADC and checks if they are correct. It needs to check 4 values.
The program is for a PICF690 microcontroller is MPLAB v8.
Here is my code atm:
http://pastebin.com/3CNBfRsg
So my problem is this, I read the value from the potentiometer and parse it to the LED's just fine, this is working as it should (thankfully).
I now need to record the value from the ADC when the switch is high and check if this value is correct and this is where I am having issues. I understand that I want to subtract the value from a number and determine if it is 0 (if it is than the number was correct), but I'm having issues implementing this, you can see my pseduo attempt within.
If this should be posted elsewhere I apologise,
I would appreciate any help at all, I'm desperate.
Regards.
I've been working on an assembly assignment program for some time now and am having a few issues nearing the completion of the program. Basically it reads values from the ADC and checks if they are correct. It needs to check 4 values.
The program is for a PICF690 microcontroller is MPLAB v8.
Here is my code atm:
http://pastebin.com/3CNBfRsg
So my problem is this, I read the value from the potentiometer and parse it to the LED's just fine, this is working as it should (thankfully).
I now need to record the value from the ADC when the switch is high and check if this value is correct and this is where I am having issues. I understand that I want to subtract the value from a number and determine if it is 0 (if it is than the number was correct), but I'm having issues implementing this, you can see my pseduo attempt within.
If this should be posted elsewhere I apologise,
I would appreciate any help at all, I'm desperate.
Regards.