ADC Stimulus file with MPLAB SIM (Simulation with MPLAB SIM)

adcmplabsimulation

I'm trying to simulate my project using MPLAB SIM but I get the following message:

ADC-W0008: No stimulus file attached to ADRESL for A/D.

How do I create an ADC Stimulus file?

Info that might be useful:

  • MPLAB 8.30.00.00
  • PIC18F4520
  • PicKit2 programmer.

Best Answer

Simulating input in MPLAB is way more complicated than it should be. Making a A/D stimulus file is easy. Just put the sequential numbers you want the A/D to read on sequential lines of a text file. The tricky part is getting MPLAB to understand to use that to take simulated A/D readings from. In the DEBUG menu (I think), there should be a entry called STIMULUS, or something like that. That opens up a little window with a bunch of tabs accross the top.

If I remember right, what you want is on demand register injection into ADRES, but I may not remember right. I usually have to read the help each time I use this, as the procedure is rather arcane. You have to stand on one foot while bowing twice in the direction of Chandler AZ, or something like that. It is in the docs though. That's how I figure it out each time.