Hello.
I would like to ask for some help regarding the ADC. In my project, I'm using the 10-bit ADC. It has 1024 counts(0-1023).
I have a pressure sensor connected to pin RA0 of the PIC18F2620. I have to set an offset value of 1V where this value must correspond with count 310 of the ADC. It must also corresponds to 0mmHg.
What i have to do is to pump air into the cuff uintil it reaches 200mmHg. This 200mmHg has to correspond with count 510 of the ADC.
I did some ADC codes but it does not seem to work. I could not figure out the problem. The program will skip the codes in BOLD. It will continue at "BP is taken at...".
I have attached the ADC codes.
Thanks for any help. It's greatly appreciated
ADC Program:
http://www.programmingforums.org/thread16306.htmlhttp://www.programmingforums.org/thread16306.html
I would like to ask for some help regarding the ADC. In my project, I'm using the 10-bit ADC. It has 1024 counts(0-1023).
I have a pressure sensor connected to pin RA0 of the PIC18F2620. I have to set an offset value of 1V where this value must correspond with count 310 of the ADC. It must also corresponds to 0mmHg.
What i have to do is to pump air into the cuff uintil it reaches 200mmHg. This 200mmHg has to correspond with count 510 of the ADC.
I did some ADC codes but it does not seem to work. I could not figure out the problem. The program will skip the codes in BOLD. It will continue at "BP is taken at...".
I have attached the ADC codes.
Thanks for any help. It's greatly appreciated
ADC Program:
http://www.programmingforums.org/thread16306.htmlhttp://www.programmingforums.org/thread16306.html
Last edited: