Searching \ for 'Resistance measurement progress' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=resistance+measurement
Search entire site for: 'Resistance measurement progress'.

Truncated match.
PICList Thread
'Resistance measurement progress'
1998\07\20@041032 by

flavicon
face
Thanks to all who replied to my plea for help.

No-one seemed to have a convincing answer as to why the code in AN512
configured the timer 0 as a counter and then polled the TMR0 regsister.

I decided just to poll RA4 as a normal input, and (this bit of) my code is
now working fine.  The schmitt trigger is still used so I can't see any
reason not to use this method, and it means timer 0 is free for other
purposes (as long as you don't want to use external clock)

Most of my headaches came from the Read Modify Write instructions on ports
that were driving a mosfet H-bridge, I guess the gate capacitance was
slowing things down a bit.  Nothing that a coupla NOPs didn't sort.

My last remaining bug is the PWM (CCP1) output latching up.  I can't set the
PWM output to maximum as the output is AC coupled to a diode pump so it
would stop working.  I limit the maximum value I send to the CCPRL1
register, but occaisionally the output gets stuck high.  When you do a RMW
instruction on port C with the PWM active, does the micro read back the
current state of the PWM output?  If it happens to be high I guess a 1 could
be written back to the output register? I can't believe this is the case as
it would make using the port a nightmare.

My employers decided that buying an ICEPIC2 emulator (with real time trace)
would speed things up on the development front, so I should have a new toy
to play with this week!  Anything I should watch out for when using this or
any problems that anyone knows of?

Regards

Mike Rigby-jones
spam_OUTmrjonesTakeThisOuTspamnortel.co.uk

1998\07\20@134634 by Mike Keitz

picon face
On Mon, 20 Jul 1998 09:04:53 +0100 "Rigby-Jones, Michael
[PAI01:4837:EXCH]" <.....michael.rigby-jones.mrjonesKILLspamspam@spam@NORTEL.CO.UK> writes:
>Thanks to all who replied to my plea for help.
>
>No-one seemed to have a convincing answer as to why the code in AN512
>configured the timer 0 as a counter and then polled the TMR0
>regsister.

Convincing answer:  The AN was developed for a PIC16C5X.  These PICs do
not have the timer pin connected to the PORTA register.  The only way to
determine the state of that pin is to examine its effect on the timer.

The 14-bit PICs have the pin connected to both the timer and to the PORTA
register.  The input signal passes through the same Schmitt-trigger
buffer no matter which way you read it.

>
>I decided just to poll RA4 as a normal input, and (this bit of) my
>code is
>now working fine.  The schmitt trigger is still used so I can't see
>any
>reason not to use this method, and it means timer 0 is free for other
>purposes (as long as you don't want to use external clock)

The reason to not use it is that with PIC16C5X's you can't.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\07\20@142141 by lilel

flavicon
face
> Thanks to all who replied to my plea for help.
>
> No-one seemed to have a convincing answer as to why the code in
> AN512 configured the timer 0 as a counter and then polled the TMR0
> regsister.
>

Let's see.  I believe that the idea was to zero out TMR0, then begin
chargeing the capacitor-rewsistor.  Count the time going by, and
periodically look at the TMR0 counter input.  if the input is
trpped, then the RC circuit has charged up to the schmidt trigger
voltage.  Does that address your question?





> My employers decided that buying an ICEPIC2 emulator (with real time
> trace) would speed things up on the development front, so I should
> have a new toy to play with this week!  Anything I should watch out
> for when using this or any problems that anyone knows of?
>

God for them!   You'll find that ICEPICs may be more finicky than
regular PICs about power supplies.  I had to put a special regulator
instead of the cheesy, sleazy zener diode that passes for a power
supply on my regular production boards.

ICEPICS also instoduce a little capacitance in the probe, and tend to
run a slightly different clock frequencies because of that.  Other
than that I've had good luck.
-- Lawrence Lile

    "An Engineer is simply a machine for
     turning coffee into assembler code."

Download AutoCad blocks for electrical drafting at:
http://home1.gte.net/llile/index.htm

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...