Discussion forum for the BasicX family of microcontroller chips.
Re: Re: Code to count pulses for fuel dispenser - David Sousa Mendes - Jan 7 20:06:46 2008
I think you will need to use
WaitforInterrupt(bxPinRisingEdge)
and a variable that is incremented every time a rising edge is found
BR
David M.
----- Original Message -----
From: allynroe
To: b...@yahoogroups.com
Sent: Monday, January 07, 2008 8:18 PM
Subject: [BasicX] Re: Code to count pulses for fuel dispenser
Thanks for the reply. To simplify the user input portion I am going
to just have a two button (up/down) for the gallon input and have
this of increments of 10 gallons (works for us). I'll have a PCB
made for the -35 (and components), power supply, relays, and 2x20 LCD
connector. I have an understanding of the basics for the 24 and 35
but the pulse thing is new to me. Would I use inputcapture on this?
Thanks for your patience.
Allyn
--- In b...@yahoogroups.com, "njepsen@..."
wrote:
>
> The code to do this is trivial. 2000ppm is only 33pps, which is
well
> within the speed capabilities of the BX24. You should use a keypad
or
> some similar device to allow the customer to input the gallon
amount,
> and start the pump. If you use the LCDX unit which has an LCD, and
a
> keypad interface, you would be able to achieve this. You WILL need
to
> read and understand the sample code given.
> The veeder Root input pulses may need to be cleaned up and level
shifted
> to 5v pulses...i've not used one.... Simply use the pulse input to
> increment a software counter ( in a fast loop) and when the count
is
> equal to or greater than the [preset pulse count enterd by the
customer
> on the KB, multiplied by the number of pulses per gallon,] shut
off the
> relay ( and zero the count, ready for the next KB command). You
WILL
> need to read and understand the BX24/35 docs to write a loop,
handle
> software counters and do comparisons.
> neil
>
>
> allynroe wrote:
>
> > I have a private fuel dispenser that I plan on using a BX-24 or -
35 to
> > control. I plan on using the processor to allow a user to enter
in a
> > gallon amount of fuel they need and then have it shut off the
pump when
> > it reaches this amount. I'll be driving a relay to the pump
solenoid
> > to handle the shutoff task but I need help on counting the
gallons. We
> > have a Veeder Root pulser (connected to the dispenser analog
meter)
> > which sends 100 pulses for each revolution it makes. I need help
on
> > having the processor count these pulses since it can do up to 2000
> > pulses per minute. Anyone have some example code that could help
me
> > out?
> >
> > Best regards,
> > Allyn
> >
> >
> >
> >----------------------------------------------------------
-----
> >
> >No virus found in this incoming message.
> >Checked by AVG Free Edition.
> >Version: 7.5.516 / Virus Database: 269.17.13/1211 - Release Date:
6/01/2008 11:57 a.m.
> >
> >
>
[Non-text portions of this message have been removed]
______________________________
Have a look at the new TI MCU Center on EmbeddedRelated.com!

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: Code to count pulses for fuel dispenser - allynroe - Jan 8 7:26:33 2008
So I could loop this and then total gallons dispensed would
increase .01 every time a rise is detected. This is looking easier
for me. Thanks!
Allyn
--- In b...@yahoogroups.com, "David Sousa Mendes"
wrote:
>
> I think you will need to use
> WaitforInterrupt(bxPinRisingEdge)
> and a variable that is incremented every time a rising edge is found
>
> BR
>
> David M.
>
> ----- Original Message -----
> From: allynroe
> To: b...@yahoogroups.com
> Sent: Monday, January 07, 2008 8:18 PM
> Subject: [BasicX] Re: Code to count pulses for fuel dispenser
> Thanks for the reply. To simplify the user input portion I am
going
> to just have a two button (up/down) for the gallon input and have
> this of increments of 10 gallons (works for us). I'll have a PCB
> made for the -35 (and components), power supply, relays, and 2x20
LCD
> connector. I have an understanding of the basics for the 24 and
35
> but the pulse thing is new to me. Would I use inputcapture on
this?
> Thanks for your patience.
>
> Allyn
>
> --- In b...@yahoogroups.com, "njepsen@" wrote:
> >
> > The code to do this is trivial. 2000ppm is only 33pps, which is
> well
> > within the speed capabilities of the BX24. You should use a
keypad
> or
> > some similar device to allow the customer to input the gallon
> amount,
> > and start the pump. If you use the LCDX unit which has an LCD,
and
> a
> > keypad interface, you would be able to achieve this. You WILL
need
> to
> > read and understand the sample code given.
> > The veeder Root input pulses may need to be cleaned up and
level
> shifted
> > to 5v pulses...i've not used one.... Simply use the pulse input
to
> > increment a software counter ( in a fast loop) and when the
count
> is
> > equal to or greater than the [preset pulse count enterd by the
> customer
> > on the KB, multiplied by the number of pulses per gallon,] shut
> off the
> > relay ( and zero the count, ready for the next KB command). You
> WILL
> > need to read and understand the BX24/35 docs to write a loop,
> handle
> > software counters and do comparisons.
> > neil
> >
> >
> > allynroe wrote:
> >
> > > I have a private fuel dispenser that I plan on using a BX-24
or -
> 35 to
> > > control. I plan on using the processor to allow a user to
enter
> in a
> > > gallon amount of fuel they need and then have it shut off the
> pump when
> > > it reaches this amount. I'll be driving a relay to the pump
> solenoid
> > > to handle the shutoff task but I need help on counting the
> gallons. We
> > > have a Veeder Root pulser (connected to the dispenser analog
> meter)
> > > which sends 100 pulses for each revolution it makes. I need
help
> on
> > > having the processor count these pulses since it can do up to
2000
> > > pulses per minute. Anyone have some example code that could
help
> me
> > > out?
> > >
> > > Best regards,
> > > Allyn
> > >
> > >
> > >
> > >----------------------------------------------------------
> -----
> > >
> > >No virus found in this incoming message.
> > >Checked by AVG Free Edition.
> > >Version: 7.5.516 / Virus Database: 269.17.13/1211 - Release
Date:
> 6/01/2008 11:57 a.m.
> > >
> > >
> >
>
> [Non-text portions of this message have been removed]
>
______________________________
TI's C2000 microcontrollers controlSUITE Desktop gives you instant access to all supporting software libraries, training, collateral, and more!

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )Re: Re: Code to count pulses for fuel dispenser - "nje...@ihug.co.nz" - Jan 8 8:17:29 2008
Yes, provided the pulses from the Veeeder Root are clean. You will find
this out when you first run it, and there are various ways in HW and SW
to fix this...i.e clean up the pulses if reqd.
allynroe wrote:
> So I could loop this and then total gallons dispensed would
> increase .01 every time a rise is detected. This is looking easier
> for me. Thanks!
> Allyn
>
> --- In basicx@yahoogroups. com
,
> "David Sousa Mendes"
> wrote:
> >
> > I think you will need to use
> > WaitforInterrupt( bxPinRisingEdge)
> > and a variable that is incremented every time a rising edge is found
> >
> > BR
> >
> > David M.
> >
> >
> >
> > ----- Original Message -----
> > From: allynroe
> > To: basicx@yahoogroups. com
> > Sent: Monday, January 07, 2008 8:18 PM
> > Subject: [BasicX] Re: Code to count pulses for fuel dispenser
> >
> >
> > Thanks for the reply. To simplify the user input portion I am
> going
> > to just have a two button (up/down) for the gallon input and have
> > this of increments of 10 gallons (works for us). I'll have a PCB
> > made for the -35 (and components), power supply, relays, and 2x20
> LCD
> > connector. I have an understanding of the basics for the 24 and
> 35
> > but the pulse thing is new to me. Would I use inputcapture on
> this?
> > Thanks for your patience.
> >
> > Allyn
> >
> > --- In basicx@yahoogroups. com ,
> "njepsen@" wrote:
> > >
> > > The code to do this is trivial. 2000ppm is only 33pps, which is
> > well
> > > within the speed capabilities of the BX24. You should use a
> keypad
> > or
> > > some similar device to allow the customer to input the gallon
> > amount,
> > > and start the pump. If you use the LCDX unit which has an LCD,
> and
> > a
> > > keypad interface, you would be able to achieve this. You WILL
> need
> > to
> > > read and understand the sample code given.
> > > The veeder Root input pulses may need to be cleaned up and
> level
> > shifted
> > > to 5v pulses...i've not used one.... Simply use the pulse input
> to
> > > increment a software counter ( in a fast loop) and when the
> count
> > is
> > > equal to or greater than the [preset pulse count enterd by the
> > customer
> > > on the KB, multiplied by the number of pulses per gallon,] shut
> > off the
> > > relay ( and zero the count, ready for the next KB command). You
> > WILL
> > > need to read and understand the BX24/35 docs to write a loop,
> > handle
> > > software counters and do comparisons.
> > > neil
> > >
> > >
> > > allynroe wrote:
> > >
> > > > I have a private fuel dispenser that I plan on using a BX-24
> or -
> > 35 to
> > > > control. I plan on using the processor to allow a user to
> enter
> > in a
> > > > gallon amount of fuel they need and then have it shut off the
> > pump when
> > > > it reaches this amount. I'll be driving a relay to the pump
> > solenoid
> > > > to handle the shutoff task but I need help on counting the
> > gallons. We
> > > > have a Veeder Root pulser (connected to the dispenser analog
> > meter)
> > > > which sends 100 pulses for each revolution it makes. I need
> help
> > on
> > > > having the processor count these pulses since it can do up to
> 2000
> > > > pulses per minute. Anyone have some example code that could
> help
> > me
> > > > out?
> > > >
> > > > Best regards,
> > > > Allyn
> > > >
> > > >
> > > >
> > > >----------- --------- --------- --------- --------- --------- --
> > -----
> > > >
> > > >No virus found in this incoming message.
> > > >Checked by AVG Free Edition.
> > > >Version: 7.5.516 / Virus Database: 269.17.13/1211 - Release
> Date:
> > 6/01/2008 11:57 a.m.
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >------------------------------------------------------------------------
>
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.5.516 / Virus Database: 269.17.13/1213 - Release Date: 7/01/2008 9:14 a.m.
>
>
______________________________
TI's C2000 microcontrollers controlSUITE Desktop gives you instant access to all supporting software libraries, training, collateral, and more!

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )