The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Re: Rabbit 2000


  • Subject: RE: Re: Rabbit 2000
  • From: "Paul Smith" <ukha@xxxxxxxxxxxxx>
  • Date: Fri, 31 Mar 2006 11:21:53 +0100

>
> Pretty unlikely I think - much more likely to be caused by dirty/noisy
> power rails. Try decoupling the power rails around your pulse counting
> circuitry using 100nF caps. If you have access to a scope you make
> also want to look at the shape of the conditioned pulses that you are
> counting - you may need to add a schmidt trigger or similar to prevent
> false triggers if the leading or trailing edge is rising slowly (and
> you should be edge triggering, not level triggering, in this kind of
> application).
>
> Cheers
> Patrick

Hi Patrick,

Thanks for the heads up, I have two screen shots from before an after
fitting the caps'

http://www.ptu.biz/Before.jpg

http://www.ptu.biz/after.jpg

Which shows (C1) the pulse from the transistor and C2 the pulse going into
rabbit. The transistor is connected to a 555 monostable circuit.

The rabbit has a timerb isr running at
200uSec this is the code from it:

nodebug root void TimerBRoutine()
{
if (BitRdPortI(PBDR, 3))
{
vs1=0;
}
else
{
if (vs1==0)
{
c1++;
p1d=MS_TIMER - p1t;
p1t=MS_TIMER;

}
vs1=1;
}
if (BitRdPortI(PBDR, 2))
{
vs2=0;
}
else
{
if (vs2==0)
{
c2++;
}
vs2=1;
}
last_mstimer=MS_TIMER;
}


How do I tell rabbit to look for an edge rather than a level as I guess I
am doing that the mo.

Regards,

Paul



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.384 / Virus Database: 268.3.3/298 - Release Date: 30/03/2006




UKHA_D Main Index | UKHA_D Thread Index | UKHA_D Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.