On 21/11/2010 01:23, Jan-Erik Soderholm wrote: > I think like this... > > Right, you can setup the pot to give 2.5V at the input > using a voltmeter. But then what ? Will you always > use a voltmeter when setting the pot ? > > What does it matter if the motor stands still with 2.4V > or 2.6V at the ADC input ? The visual difference in the > setting of the pot would probably be very small. What kind > of pot is it ? A regular 1-turn or some 10-turn pot ? > > I'd also guess that the differense between the ADC value > with Vpp/2 (5V/2, right?) will be quite small compared with > the theoretical half-range value (according to the datasheet). > Probably just +/- a few bits, after all, that is what the > datasheet specifies. And probably smaller then any visable > difference from the mid-position setting of the pot. > > *Or* I must seriously be missing something here. :-) > > Jan-Erik. > > > Yes, I see it similarly - a bit of adjusting and gathering empirical=20 data will often suffice for this kind of thing, where the tolerances are=20 reasonable. However, I can understand the desire to get the hardware debug working=20 as it is undoubtedly a useful tool to have available in general. For instance, I used to get along without my ICD3 just fine, using=20 things like LEDs or bit banged UART for debugging, but it's certainly=20 more convenient (IMHO) to use the ICD3 and have it all contained within=20 MPLAB. If I understand where James is coming from, it's not so much the fact=20 that he needs it to make things "possible", just maybe a bit easier. Plus, there's the frustration when something is meant to work but=20 doesn't, most engineers (me included) find it hard to leave a problem=20 "unsolved", even if it doesn't actually matter much to the whole=20 project... :-) > > > > On 2010-11-21 01:38, James Newton wrote: >> Think about that for just a second? >> >> If I /knew/ the value of ADRES to inject, why would I be trying to find = it? >> >> -- >> James Newton >> 1-970-462-7764 >> >> -----Original Message----- >> From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf= Of >> John Temples >> Sent: Saturday, November 20, 2010 16:24 >> To: Microcontroller discussion list - Public. >> Subject: RE: [PIC] pickit2 unreliable debug 12F675 >> >> On Sat, 20 Nov 2010, James Newton wrote: >> >>> In this specific case: I have a pot connected to AN0 and set so that 2.= 5v >> is >>> on the pin. Now I want to know exactly what ADC count the chip is readi= ng >> so >>> I can set that as the midpoint in my code and turn the motors one >> direction >>> when the voltage is lower and the other when it is higher. >>> >>> With a debugger, I simply read the ADC output register and I'm done. >>> >>> How would you get that value without the debugger? >> The simulator has a register injection feature that reads hex values >> from a file that are injected into ADRES over time. >> >> -- >> John W. Temples, III --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .