Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing Interval Timer To Basic Stamp — Parallax Forums

Interfacing Interval Timer To Basic Stamp

ArchiverArchiver Posts: 46,084
edited 2000-04-17 16:07 in General Discussion
Does any one know how to do this?

I would like to send a value to the timer.

and then Trigger it to start counting down to zero.

Does any one have a PDF data sheet for this timer?

Fernando.

______________________________________________________

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-03-31 03:12
    check 'Dallas' www.dalsemi.com


    Original Message
    From: fernando hood <hoodey@h...>
    To: <basicstamps@egroups.com>
    Sent: Friday, March 31, 2000 3:26 AM
    Subject: [noparse][[/noparse]basicstamps] Interfacing Interval Timer To Basic Stamp


    > Does any one know how to do this?
    >
    > I would like to send a value to the timer.
    >
    > and then Trigger it to start counting down to zero.
    >
    > Does any one have a PDF data sheet for this timer?
    >
    > Fernando.
    >
    > ______________________________________________________
    >
    >
    > -- Easily schedule meetings and events using the group calendar!
    > -- http://www.egroups.com/cal?listname=basicstamps&m=1
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-04 17:46
    I HAVE TO INTERFACE THE bASIC STAMP TWO TO A DEVICE
    WHIch HAS A DATA BUS. 8254 Interval Timer.
    The stamp does not have a parrallel interface. How do a put
    a Word from the Stamp to a Data Bus which accepts Data in
    Parallel?



    ______________________________________________________
    Get Your Private, Free Email at http://www.hotmail.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-04 17:55
    If you have the pins to spare this is fairly simple. Assuming an 8 bit bus
    just use OUTH or OUTL to write to P15-P8 or P7-P0 respectively. You can also
    access 4 bits at a time OUTA OUTB OUTC OUTD.

    So let's say you have 8 pins hooked up to P15 to P8 and you want to write
    $AA to the device. Further, say you have the chip select hooked up to P0 and
    set in the idle state (I'm talking general here, I don't have the details of
    the 8254 off hand).

    OUTH=$AA
    PULSOUT 0,xxx ' xxx is the time you want to strobe chip select

    You can use INH to read the port, too. You might need 2 or 3 lines to
    simulate things like chip select/enable and R/W.

    By the way, if you just need to time or count input pulses, check out our
    PAK-VII. It times 8 channels with 5uS resolution. You get the time of the
    high part of the pulse, the low part of the pulse, and you also get a count
    of both edges. www.al-williams.com/awce/pak7.htm

    Regards,

    Al Williams
    AWC
    * Microcontroller Projects with Basic Stamps:
    http://www.al-williams.com/awce/sbook.htm.

    >
    Original Message
    > From: fernando hood [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=FaxH_FO5bn1_1EOTAclCyBZtTx7sKwxrHHWUGh6wwSIgTiE62wyDtVyHdA5bbZJ70vzXuhIoUV_XNZOkZA]hoodey@h...[/url
    > Sent: Tuesday, April 04, 2000 11:46 AM
    > To: basicstamps@egroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Re: Interfacing Interval Timer To Basic Stamp
    >
    >
    >
    >
    > I HAVE TO INTERFACE THE bASIC STAMP TWO TO A DEVICE
    > WHIch HAS A DATA BUS. 8254 Interval Timer.
    > The stamp does not have a parrallel interface. How do a put
    > a Word from the Stamp to a Data Bus which accepts Data in
    > Parallel?
    >
    >
    >
    > ______________________________________________________
    > Get Your Private, Free Email at http://www.hotmail.com
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-04 21:44
    I have an electronics degree but have done mostly software programming.
    What is the part number for such a device?


    >From: <dlc@v...>
    >Reply-To: basicstamps@egroups.com
    >To: basicstamps@egroups.com
    >Subject: Re: [noparse][[/noparse]basicstamps] Re: Interfacing Interval Timer To Basic Stamp
    >Date: Tue, 4 Apr 2000 17:10:34 GMT
    >
    >
    > >
    > > I HAVE TO INTERFACE THE bASIC STAMP TWO TO A DEVICE
    > > WHIch HAS A DATA BUS. 8254 Interval Timer.
    > > The stamp does not have a parrallel interface. How do a put
    > > a Word from the Stamp to a Data Bus which accepts Data in
    > > Parallel?
    >
    > The simplest way would be to use a couple of serial in/parallel out
    >shift registers and the Stamp II command "shiftout".
    >
    >have fun,
    >DLC
    >
    >
    >
    >
    >
    >

    ______________________________________________________
    Get Your Private, Free Email at http://www.hotmail.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-05 01:10
    >
    > I HAVE TO INTERFACE THE bASIC STAMP TWO TO A DEVICE
    > WHIch HAS A DATA BUS. 8254 Interval Timer.
    > The stamp does not have a parrallel interface. How do a put
    > a Word from the Stamp to a Data Bus which accepts Data in
    > Parallel?

    The simplest way would be to use a couple of serial in/parallel out
    shift registers and the Stamp II command "shiftout".

    have fun,
    DLC
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-05 05:06
    >
    > I have an electronics degree but have done mostly software programming.
    > What is the part number for such a device?
    about...
    > > The simplest way would be to use a couple of serial in/parallel out
    > >shift registers and the Stamp II command "shiftout".

    Serial to Parallel converters are common TTL chips, or, they used to be
    anyway. I don't have any part numbers in front of me but I know that they
    have come up on this list several times for just the reasons in which you
    are interested. Try searching the archives for the list (ouch, I know) or
    try a web search, you may get lucky early. Sorry, I don't have any more
    accurate response, its not one of the things I have done with a Stamp (yet).

    regards,
    DLC
    ============================================================================
    * Dennis Clark Aristocrat at heart dlc@v... www.verinet.com/~dlc *
    * Be well, do good work, and stay in touch -- Garrison Keillor *
    ============================================================================
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-05 10:01
    74hc595 for one 165 also ??

    fernando hood wrote:
    >
    > I have an electronics degree but have done mostly software programming.
    > What is the part number for such a device?
    >
    > >From: <dlc@v...>
    > >Reply-To: basicstamps@egroups.com
    > >To: basicstamps@egroups.com
    > >Subject: Re: [noparse][[/noparse]basicstamps] Re: Interfacing Interval Timer To Basic Stamp
    > >Date: Tue, 4 Apr 2000 17:10:34 GMT
    > >
    > >
    > > >
    > > > I HAVE TO INTERFACE THE bASIC STAMP TWO TO A DEVICE
    > > > WHIch HAS A DATA BUS. 8254 Interval Timer.
    > > > The stamp does not have a parrallel interface. How do a put
    > > > a Word from the Stamp to a Data Bus which accepts Data in
    > > > Parallel?
    > >
    > > The simplest way would be to use a couple of serial in/parallel out
    > >shift registers and the Stamp II command "shiftout".
    > >
    > >have fun,
    > >DLC
    > >
    > >
    > >
    > >
    > >
    > >
    >
    > ______________________________________________________
    > Get Your Private, Free Email at http://www.hotmail.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-05 14:08
    Has any one used the stamp to control the injection of
    fuel. This device is a fifth injector adds extra fuel for
    Normally aspirated engines which were subsequently turbocharged.
    The additional air supplied by the turbocharger will require extra fuel.

    The injection of fuel is accomplished by reading
    RPM and Boost pressure looking up a table and sending that
    value to an interval timer. the interval timer counts down to zero
    and then brings it output to zero. The output is connected to
    an injector dirver.

    There 8 rpm tables each one indexed by pressure.
    There is a pressure table which return an index value this is then used to
    lookup the appropiate RPM tables.


    This is the reason I am using the interval timer.
    I am currently using P0, P1, AND P2 TO CONTROL THE A/D CONVERTER
    SO i SHOULD HAVE MORE THAN ENOUGH PINS TO USE FOR DATA.

    On the data bus I have to put a control word to tell the timer what I
    am about to do. After that I have to put a count to the databus . The
    counter will then be triggered and it will start counting down to zero.

    If my control word is 00010011
    What would my outstament look like?


    The values in the RPM table are 100, 50, 200, are returned into
    a decimal variable PULSVAL
    I am assuming that OUTH PULSVAL will return a BCD value to the
    Databus.

    Can the interval timer work on the clock from the Basic controller?



    I took a quick peep at the BS@ manual and I don't see the OUTH command

    >From: "Al Williams" <alw@a...>
    >Reply-To: basicstamps@egroups.com
    >To: <basicstamps@egroups.com>
    >Subject: RE: [noparse][[/noparse]basicstamps] Re: Interfacing Interval Timer To Basic Stamp
    >Date: Tue, 4 Apr 2000 11:55:21 -0500
    >
    >If you have the pins to spare this is fairly simple. Assuming an 8 bit bus
    >just use OUTH or OUTL to write to P15-P8 or P7-P0 respectively. You can
    >also
    >access 4 bits at a time OUTA OUTB OUTC OUTD.
    >
    >So let's say you have 8 pins hooked up to P15 to P8 and you want to write
    >$AA to the device. Further, say you have the chip select hooked up to P0
    >and
    >set in the idle state (I'm talking general here, I don't have the details
    >of
    >the 8254 off hand).
    >
    >OUTH=$AA
    >PULSOUT 0,xxx ' xxx is the time you want to strobe chip select
    >
    >You can use INH to read the port, too. You might need 2 or 3 lines to
    >simulate things like chip select/enable and R/W.
    >
    >By the way, if you just need to time or count input pulses, check out our
    >PAK-VII. It times 8 channels with 5uS resolution. You get the time of the
    >high part of the pulse, the low part of the pulse, and you also get a count
    >of both edges. www.al-williams.com/awce/pak7.htm
    >
    >Regards,
    >
    >Al Williams
    >AWC
    >* Microcontroller Projects with Basic Stamps:
    >http://www.al-williams.com/awce/sbook.htm.
    >
    > >
    Original Message
    > > From: fernando hood [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=3vIfaIExJjOqitTpXFvBbNdycqD5RU79R7VQC3z_VvnIwRhyIHAsTW_wOz57bBXyQs26YRqaexsFlkw]hoodey@h...[/url
    > > Sent: Tuesday, April 04, 2000 11:46 AM
    > > To: basicstamps@egroups.com
    > > Subject: Re: [noparse][[/noparse]basicstamps] Re: Interfacing Interval Timer To Basic Stamp
    > >
    > >
    > >
    > >
    > > I HAVE TO INTERFACE THE bASIC STAMP TWO TO A DEVICE
    > > WHIch HAS A DATA BUS. 8254 Interval Timer.
    > > The stamp does not have a parrallel interface. How do a put
    > > a Word from the Stamp to a Data Bus which accepts Data in
    > > Parallel?
    > >
    > >
    > >
    > > ______________________________________________________
    > > Get Your Private, Free Email at http://www.hotmail.com
    > >
    > >
    > >
    >
    >
    >
    >

    ______________________________________________________
    Get Your Private, Free Email at http://www.hotmail.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-17 13:37
    I finally have the interval time. However, it seems to be getting
    warm. I am only using one of the three counters.

    I thought I hooked it up incorrectly so I disconnected everthing except the
    power and the ground and it still is getting hot.


    Any ideas?

    ______________________________________________________
    Get Your Private, Free Email at http://www.hotmail.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-17 13:54
    You should tie unused inputs to ground either directly or through some value
    of resistance.

    This is always a good idea. Here's why:

    CMOS gates are like two switches. Imagine:

    +5V
    Switch A
    output
    Switch B ---- Ground.

    For simplicity's sake, suppose this gate is an inverter.
    When the input level is at 0V, switch A is on and switch B is off. When the
    input level is 5V, the reverse is true.

    So far, so good. But what happens if the voltage is at 2.5V? It is possible
    that both switch A and switch B will be ON. This makes a direct path between
    5V and ground. Large currents may flow. This is why CMOS consumes more power
    at faster switching speeds.

    If you leave inputs floating, the transistors may see an odd voltage. You
    might not think that seems right, but remember that the transistor gates
    have extremely high input resistance (after all, they are just a bit of
    polysilicon not connected to anything and surrounded by glass).

    A good trick with the Stamp is to set unused pins to outputs. Many chips
    including the SX and the PIC have programmable pull up resistors. If you
    turn those on you can leave the pin floating too.

    The other thing that can cause heat like this is latch up. But then I don't
    think the chip would work. Latch up almost always burns the chip (and your
    finger). It is caused by the substrate becomeing an SCR and you get a direct
    connect between 5V and ground. This usually occurs when you present voltages
    above Vdd on an input although there are some other modes that cause latch
    up. Again, I think this would destroy your chip, however.

    Regards,

    Al Williams
    AWC
    *Floating point math for the Stamp, SX, PIC, or any microcontroller at
    http://www.al-williams.com/awce (check out our new document library)



    >
    Original Message
    > From: fernando hood [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=A_sLvQVjR3COhzbP5Tsrz8JwdVkIvPPSUcsCKtLmy1bT4R7Wa67jTKVMCIlW2dFrmFPzny4mIdgwkjI]hoodey@h...[/url
    > Sent: Monday, April 17, 2000 7:38 AM
    > To: basicstamps@egroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Re: Interfacing Interval Timer To Basic Stamp
    >
    >
    >
    > I finally have the interval time. However, it seems to be getting
    > warm. I am only using one of the three counters.
    >
    > I thought I hooked it up incorrectly so I disconnected everthing
    > except the
    > power and the ground and it still is getting hot.
    >
    >
    > Any ideas?
    >
    > ______________________________________________________
    > Get Your Private, Free Email at http://www.hotmail.com
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-04-17 16:07
    Thanks Al.

    ______________________________________________________
    Get Your Private, Free Email at http://www.hotmail.com
Sign In or Register to comment.