Hello All; I am trying to make a very simple ADC program with a PIC16F88 which reads only one input at AN4. The PIC has a 10bit output which I want to be shown on pins RB0-RB7, RA0 and RA1 by just sending a logic 1 or 0 to each pin. I am using MPLAB IDE and MPLAB SIM as the compilier. I notice there is an error which says ADC-W0008: No stimulus file attached to ADRESL for A/D. which I don't understand. I know the code is very close to what it needs to be but I am missing something subtle....Any suggestions or comments would be GREATLY appreciated here! Thanks in Advance....
And also, what would be the best way to test this? Im currently using a pot to vary a dc voltage at the input AN4 with a range between vdd and vss....will this suffice?
I changed the code so the output is only a 8bit resolution, and I would like to send these values to RB0-RB7 respectively and have them be held high or low so I can read the output with a voltmeter at the pins....Do you see any issue with how I am sending these values to PORTB so i can read them? Thanks again!
I changed the code so the output is only a 8bit resolution, and I would like to send these values to RB0-RB7 respectively and have them be held high or low so I can read the output with a voltmeter at the pins....Do you see any issue with how I am sending these values to PORTB so i can read them? Thanks again!
Hi Eric; Thank you very much for editing my code. I see everything working as planned now. I understand the changes you made and I see where I was going wrong. Knowledge is power!
Hi Eric, i am using the same PIC16f88 using RA0 as my input and RB0 as my output, then pin 5 and pin 14 for my power supply (+5v and -5v), then i am going to transmit it wirelessly, i have the code for the transmitter but i am really stuck on the A to D conversion.. please help.. many thanks!
When you are testing your program in MPLAB SIM, you can choose to simulate voltages on the A/D inputs to test your program properly.
These are called stimulus files. If you get that error that means there is no stimulus file. It's not a program error as such, but it's just letting you know that your A/D input will stay at 0v in the simulator and therefore can't be simulated properly.