Exact match. Not showing close matches.
'[PIC]: A wierd emulator problem...'
OK here's a fun one for all you ICE2000 users....
Debugging a 16F818 based RFID reader. Very simple hardware - using the PWM peripheral to generate
125KHz carrier, and a moderate gain (about 10) amplifier + data slicer to demodulate the data.
All was going fine, until at an apparently arbitary time, the amplifier output started producing a
spike for no apparent reason, but in a very consistent place time-wise.
Twiddling some delays in the code showed that the spike coincided with when the code execution
reached a certain routine.
Now the wierd part is that this routine was doing NO output of any kind, just polling for input
So how did the amplifier 'know' that the code had got to where it had...?
There was a definite consistent correlation between when the amp spiked and when the code reached a
certain place. Scoping the pins showed no obvious PIC pins changing immediately prior to the amp
Tried a real chip, which worked fine.
I just figured it out after several hours intense head-scratching - before I reveal what it was, I
wonder if anyone else can guess what was causing it...?
Just to give a slight clue, it was not a software problem, and not the RFID coil picking up
Mike Harrison <mike <at> whitewing.co.uk> writes:
> I just figured it out after several hours intense head-scratching - before I
> reveal what it was, I
> wonder if anyone else can guess what was causing it...?
Read-modify-write due to ICD pins ?
Computer-produced specific electronic noise when simulating that code copling
into circuit ?
On Sun, 25 Feb 2007 11:24:39 +0000 (UTC), you wrote:
>Mike Harrison <mike <at> whitewing.co.uk> writes:
>> I just figured it out after several hours intense head-scratching - before I
>> reveal what it was, I
>> wonder if anyone else can guess what was causing it...?
>Read-modify-write due to ICD pins ?
>Computer-produced specific electronic noise when simulating that code copling
>into circuit ?
Almost there with the last one...
I needed to run at 3.3v, and so had to use the ICE2000 'power from target' option.
The amp was fairly sensitive to steps in the power supply due to using a resistive divder to
establish a mid-supply reference, and there wasn't much capacitance on the rails (there are reasons
for both of these, and is not a problem normally as it is battery powered and nothing else happens
during a read).
The emulator was taking a small but very fast current spike when the code reached the 'problem'
area. Still not sure why it did it at that particular point - wasn't at anything like an address
where a lot of address bits would have been changing. The only obvious thing is it was accessing
timer 1 - as the ICE2000 header has a 'T1 Osc' link, I suspect timer 1 may be implemented in ( or at
least somehow connected to ) one of the chips on the header, which might explain the sudden current
Applying an external 3.3v supply to the emulator power pin fixed it instantly...
Alan B. Pearce
>I just figured it out after several hours intense head-scratching
> - before I reveal what it was, I wonder if anyone else can
>guess what was causing it...?
>Just to give a slight clue, it was not a software problem,
>and not the RFID coil picking up anything.
Reading the port containing the PWM output did strange things? I remember
having strange things happen on an I2C port when doing RMW things on the
port, then found that having the MSSP on did not lock out those bits from
More... (looser matching)
- Last day of these posts
- In 2007
, 2008 only
- New search...