Precision Timing with SMt
Archiver
Posts: 46,084
Wahoo, I've got the little beast (8-pins, 4 components,
and 6 wires) installed. It does give a very nice
square wave -- 50 mSec high, 50 mSec low -- which the
BS2 can read and keep up with quite nicely.
However -- it does use a Resonator, and so a clock
based on this (which I did in BS2 code, BTW) is only
as accurate as the Resonator. Mine runs fast by
about 1 second every 5 minutes. Note if I had
an accurate crystal, I could get time-stamps
accurate to .050 sec.
Having said that, there's ways of getting a more
accurate oscillator frequency I'll be pursuing.
Overall, I still think this is a very clever way
of providing the BS2 with a 'tick', so its actions
can be synchronized to wall time.
I simply have a short 'idle' loop, which waits
for the 50 mSec 'tick' state to change. It remembers
this state, then goes off to execute some code.
Having executed a little, it then calls the
'idle' loop again, and waits for the next 'tick'.
Currently my code simply increments some time
variables by 50 mSec each time. (Hr, Min, Sec, mSec).
and displays the resulting time. This is a very
nice way to demonstrate multi-tasking on an
introductory level.
--- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
wrote:
> DOH, that's 'Simple Multi-task' (SMt) solution.
>
> --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> wrote:
> > David has a very nice 8-pin 'SMt'
> > 'Simple Real-Time' solution. I'm
> > currently evaluating these for use.
> >
> > More later.
> >
> > --- In basicstamps@yahoogroups.com, "Allan Lane"
<allan.lane@h...>
> > wrote:
> > > Wow, very impressive.
> > > A selectable, accurate 'tick' generator
> > > in an 8-pin package, WITH a receive-only
> > > UART, no MAX232 needed. With this,
> > > a BS2 can time-stamp its own readings
> > > just by waiting for the 'tick'.
> > >
> > > However, I couldn't find the link for
> > > ordering your AVR package.
> > >
> > > --- In basicstamps@yahoogroups.com, "David Lawrence"
<david@r...>
> > > wrote:
> > > > Yes!
> > > >
> > > > This will give your Stamp 'ticks' at intervals ranging from
5mS
> > up
> > > to 1+
> > > > secs in 5mS increments - use Stamp 'Shiftout' to setup the 8
> pin
> > > device - it
> > > > also buffers 57k baud in parallel, and costs <$12.
> > > > http://www.rhombus-tek.com/co-processors.html
> > > > http://www.rhombus-tek.com/SMt.htm
> > > >
> > > > If that does not meet your speed needs, this definitely will:
> > > > http://www.rhombus-tek.com/avr-starter.html
> > > > and without the complexities of a BasicX 'RTOS'.
> > > >
> > > > David Lawrence
> > > > Rhombus
> > > >
> > > >
> > > >
> > > >
> > > >
Original Message
> > > > From: Allan Lane <allan.lane@h...>
> > > > To: <basicstamps@yahoogroups.com>
> > > > Sent: Wednesday, July 30, 2003 2:41 PM
> > > > Subject: [noparse][[/noparse]basicstamps] Re: precision timer and the bs2p
> > > >
> > > >
> > > > > I believe the BasicX processor has its own
> > > > > real-time clock in it -- but you should ask
> > > > > on their Forum.
> > > > >
> > > > > --- In basicstamps@yahoogroups.com, "Christian Wentz"
> > > <cwentz86@h...>
> > > > > wrote:
> > > > > > my setup is running a BS2P (12,000 instructions/sec) with
> an
> > > array
> > > > > of
> > > > > > relatively fast ADC's (200,000sps), but i'm considering
> > running
> > > a
> > > > > basicx-01
> > > > > > chip from netmedia at 60,000 instructions/sec. Given those
> > > > > constraints, is
> > > > > > there an IC that can give .01-.001 resolution?
and 6 wires) installed. It does give a very nice
square wave -- 50 mSec high, 50 mSec low -- which the
BS2 can read and keep up with quite nicely.
However -- it does use a Resonator, and so a clock
based on this (which I did in BS2 code, BTW) is only
as accurate as the Resonator. Mine runs fast by
about 1 second every 5 minutes. Note if I had
an accurate crystal, I could get time-stamps
accurate to .050 sec.
Having said that, there's ways of getting a more
accurate oscillator frequency I'll be pursuing.
Overall, I still think this is a very clever way
of providing the BS2 with a 'tick', so its actions
can be synchronized to wall time.
I simply have a short 'idle' loop, which waits
for the 50 mSec 'tick' state to change. It remembers
this state, then goes off to execute some code.
Having executed a little, it then calls the
'idle' loop again, and waits for the next 'tick'.
Currently my code simply increments some time
variables by 50 mSec each time. (Hr, Min, Sec, mSec).
and displays the resulting time. This is a very
nice way to demonstrate multi-tasking on an
introductory level.
--- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
wrote:
> DOH, that's 'Simple Multi-task' (SMt) solution.
>
> --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> wrote:
> > David has a very nice 8-pin 'SMt'
> > 'Simple Real-Time' solution. I'm
> > currently evaluating these for use.
> >
> > More later.
> >
> > --- In basicstamps@yahoogroups.com, "Allan Lane"
<allan.lane@h...>
> > wrote:
> > > Wow, very impressive.
> > > A selectable, accurate 'tick' generator
> > > in an 8-pin package, WITH a receive-only
> > > UART, no MAX232 needed. With this,
> > > a BS2 can time-stamp its own readings
> > > just by waiting for the 'tick'.
> > >
> > > However, I couldn't find the link for
> > > ordering your AVR package.
> > >
> > > --- In basicstamps@yahoogroups.com, "David Lawrence"
<david@r...>
> > > wrote:
> > > > Yes!
> > > >
> > > > This will give your Stamp 'ticks' at intervals ranging from
5mS
> > up
> > > to 1+
> > > > secs in 5mS increments - use Stamp 'Shiftout' to setup the 8
> pin
> > > device - it
> > > > also buffers 57k baud in parallel, and costs <$12.
> > > > http://www.rhombus-tek.com/co-processors.html
> > > > http://www.rhombus-tek.com/SMt.htm
> > > >
> > > > If that does not meet your speed needs, this definitely will:
> > > > http://www.rhombus-tek.com/avr-starter.html
> > > > and without the complexities of a BasicX 'RTOS'.
> > > >
> > > > David Lawrence
> > > > Rhombus
> > > >
> > > >
> > > >
> > > >
> > > >
Original Message
> > > > From: Allan Lane <allan.lane@h...>
> > > > To: <basicstamps@yahoogroups.com>
> > > > Sent: Wednesday, July 30, 2003 2:41 PM
> > > > Subject: [noparse][[/noparse]basicstamps] Re: precision timer and the bs2p
> > > >
> > > >
> > > > > I believe the BasicX processor has its own
> > > > > real-time clock in it -- but you should ask
> > > > > on their Forum.
> > > > >
> > > > > --- In basicstamps@yahoogroups.com, "Christian Wentz"
> > > <cwentz86@h...>
> > > > > wrote:
> > > > > > my setup is running a BS2P (12,000 instructions/sec) with
> an
> > > array
> > > > > of
> > > > > > relatively fast ADC's (200,000sps), but i'm considering
> > running
> > > a
> > > > > basicx-01
> > > > > > chip from netmedia at 60,000 instructions/sec. Given those
> > > > > constraints, is
> > > > > > there an IC that can give .01-.001 resolution?
Comments
very accurately to 60 Hz. Just sample it and generate a timing pulse 60
times a second and there is your accurate clock which require only a
capacitor and two resistors.
jim
http://www.geocities.com/jimforkin2003/
Original Message
From: Allan Lane [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=WqCxYpyqteUukAZxJW8qupdM-ZDC04C_WFrlbFoM_x4cwQ7SuUbsdmNMW3KmYXieNs_tUdLUzamzje8QqgddCkqf6z0]allan.lane@h...[/url
Sent: Wednesday, August 06, 2003 4:05 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Precision Timing with SMt
Wahoo, I've got the little beast (8-pins, 4 components,
and 6 wires) installed. It does give a very nice
square wave -- 50 mSec high, 50 mSec low -- which the
BS2 can read and keep up with quite nicely.
However -- it does use a Resonator, and so a clock
based on this (which I did in BS2 code, BTW) is only
as accurate as the Resonator. Mine runs fast by
about 1 second every 5 minutes. Note if I had
an accurate crystal, I could get time-stamps
accurate to .050 sec.
Having said that, there's ways of getting a more
accurate oscillator frequency I'll be pursuing.
Overall, I still think this is a very clever way
of providing the BS2 with a 'tick', so its actions
can be synchronized to wall time.
I simply have a short 'idle' loop, which waits
for the 50 mSec 'tick' state to change. It remembers
this state, then goes off to execute some code.
Having executed a little, it then calls the
'idle' loop again, and waits for the next 'tick'.
Currently my code simply increments some time
variables by 50 mSec each time. (Hr, Min, Sec, mSec).
and displays the resulting time. This is a very
nice way to demonstrate multi-tasking on an
introductory level.
--- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
wrote:
> DOH, that's 'Simple Multi-task' (SMt) solution.
>
> --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> wrote:
> > David has a very nice 8-pin 'SMt'
> > 'Simple Real-Time' solution. I'm
> > currently evaluating these for use.
> >
> > More later.
> >
> > --- In basicstamps@yahoogroups.com, "Allan Lane"
<allan.lane@h...>
> > wrote:
> > > Wow, very impressive.
> > > A selectable, accurate 'tick' generator
> > > in an 8-pin package, WITH a receive-only
> > > UART, no MAX232 needed. With this,
> > > a BS2 can time-stamp its own readings
> > > just by waiting for the 'tick'.
> > >
> > > However, I couldn't find the link for
> > > ordering your AVR package.
> > >
> > > --- In basicstamps@yahoogroups.com, "David Lawrence"
<david@r...>
> > > wrote:
> > > > Yes!
> > > >
> > > > This will give your Stamp 'ticks' at intervals ranging from
5mS
> > up
> > > to 1+
> > > > secs in 5mS increments - use Stamp 'Shiftout' to setup the 8
> pin
> > > device - it
> > > > also buffers 57k baud in parallel, and costs <$12.
> > > > http://www.rhombus-tek.com/co-processors.html
> > > > http://www.rhombus-tek.com/SMt.htm
> > > >
> > > > If that does not meet your speed needs, this definitely will:
> > > > http://www.rhombus-tek.com/avr-starter.html
> > > > and without the complexities of a BasicX 'RTOS'.
> > > >
> > > > David Lawrence
> > > > Rhombus
> > > >
> > > >
> > > >
> > > >
> > > >
Original Message
> > > > From: Allan Lane <allan.lane@h...>
> > > > To: <basicstamps@yahoogroups.com>
> > > > Sent: Wednesday, July 30, 2003 2:41 PM
> > > > Subject: [noparse][[/noparse]basicstamps] Re: precision timer and the bs2p
> > > >
> > > >
> > > > > I believe the BasicX processor has its own
> > > > > real-time clock in it -- but you should ask
> > > > > on their Forum.
> > > > >
> > > > > --- In basicstamps@yahoogroups.com, "Christian Wentz"
> > > <cwentz86@h...>
> > > > > wrote:
> > > > > > my setup is running a BS2P (12,000 instructions/sec) with
> an
> > > array
> > > > > of
> > > > > > relatively fast ADC's (200,000sps), but i'm considering
> > running
> > > a
> > > > > basicx-01
> > > > > > chip from netmedia at 60,000 instructions/sec. Given those
> > > > > constraints, is
> > > > > > there an IC that can give .01-.001 resolution?
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
connecting directly to 120 volts AC. Or did
you forget to mention the voltage drop-down
transformer?
Oh, wait, I've never looked at the ripple coming
out of my 'unregulated' DC adapters -- will that
give me 60 Hz?
I've now done more work with the SMt. It's a
really good idea -- but I think perhaps the
serial port needs some work. I'm unable to
figure out how to get 232 data out of it once
it's sent into it. I also havn't been able
to figure out (yet) how to ask it if it has
232 data, without waiting for it to get 232
data.
Later, AllanL.
--- In basicstamps@yahoogroups.com, "Jim Forkin" <jjf@p...> wrote:
> Don't forget that, in the USA anyway, the power line frequency is
regulated
> very accurately to 60 Hz. Just sample it and generate a timing
pulse 60
> times a second and there is your accurate clock which require only a
> capacitor and two resistors.
> jim
> http://www.geocities.com/jimforkin2003/
>
>
>
Original Message
> From: Allan Lane [noparse][[/noparse]mailto:allan.lane@h...]
> Sent: Wednesday, August 06, 2003 4:05 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Precision Timing with SMt
>
>
> Wahoo, I've got the little beast (8-pins, 4 components,
> and 6 wires) installed. It does give a very nice
> square wave -- 50 mSec high, 50 mSec low -- which the
> BS2 can read and keep up with quite nicely.
>
> However -- it does use a Resonator, and so a clock
> based on this (which I did in BS2 code, BTW) is only
> as accurate as the Resonator. Mine runs fast by
> about 1 second every 5 minutes. Note if I had
> an accurate crystal, I could get time-stamps
> accurate to .050 sec.
>
> Having said that, there's ways of getting a more
> accurate oscillator frequency I'll be pursuing.
> Overall, I still think this is a very clever way
> of providing the BS2 with a 'tick', so its actions
> can be synchronized to wall time.
>
> I simply have a short 'idle' loop, which waits
> for the 50 mSec 'tick' state to change. It remembers
> this state, then goes off to execute some code.
> Having executed a little, it then calls the
> 'idle' loop again, and waits for the next 'tick'.
>
> Currently my code simply increments some time
> variables by 50 mSec each time. (Hr, Min, Sec, mSec).
> and displays the resulting time. This is a very
> nice way to demonstrate multi-tasking on an
> introductory level.
>
> --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> wrote:
> > DOH, that's 'Simple Multi-task' (SMt) solution.
> >
> > --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> > wrote:
> > > David has a very nice 8-pin 'SMt'
> > > 'Simple Real-Time' solution. I'm
> > > currently evaluating these for use.
> > >
> > > More later.
> > >
> > > --- In basicstamps@yahoogroups.com, "Allan Lane"
> <allan.lane@h...>
> > > wrote:
> > > > Wow, very impressive.
> > > > A selectable, accurate 'tick' generator
> > > > in an 8-pin package, WITH a receive-only
> > > > UART, no MAX232 needed. With this,
> > > > a BS2 can time-stamp its own readings
> > > > just by waiting for the 'tick'.
> > > >
> > > > However, I couldn't find the link for
> > > > ordering your AVR package.
> > > >
> > > > --- In basicstamps@yahoogroups.com, "David Lawrence"
> <david@r...>
> > > > wrote:
> > > > > Yes!
> > > > >
> > > > > This will give your Stamp 'ticks' at intervals ranging from
> 5mS
> > > up
> > > > to 1+
> > > > > secs in 5mS increments - use Stamp 'Shiftout' to setup the 8
> > pin
> > > > device - it
> > > > > also buffers 57k baud in parallel, and costs <$12.
> > > > > http://www.rhombus-tek.com/co-processors.html
> > > > > http://www.rhombus-tek.com/SMt.htm
> > > > >
> > > > > If that does not meet your speed needs, this definitely
will:
> > > > > http://www.rhombus-tek.com/avr-starter.html
> > > > > and without the complexities of a BasicX 'RTOS'.
> > > > >
> > > > > David Lawrence
> > > > > Rhombus
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
Original Message
> > > > > From: Allan Lane <allan.lane@h...>
> > > > > To: <basicstamps@yahoogroups.com>
> > > > > Sent: Wednesday, July 30, 2003 2:41 PM
> > > > > Subject: [noparse][[/noparse]basicstamps] Re: precision timer and the bs2p
> > > > >
> > > > >
> > > > > > I believe the BasicX processor has its own
> > > > > > real-time clock in it -- but you should ask
> > > > > > on their Forum.
> > > > > >
> > > > > > --- In basicstamps@yahoogroups.com, "Christian Wentz"
> > > > <cwentz86@h...>
> > > > > > wrote:
> > > > > > > my setup is running a BS2P (12,000 instructions/sec)
with
> > an
> > > > array
> > > > > > of
> > > > > > > relatively fast ADC's (200,000sps), but i'm considering
> > > running
> > > > a
> > > > > > basicx-01
> > > > > > > chip from netmedia at 60,000 instructions/sec. Given
those
> > > > > > constraints, is
> > > > > > > there an IC that can give .01-.001 resolution?
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject and
> Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
--- In basicstamps@yahoogroups.com, "David Lawrence" <david@r...>
wrote:
> Hi Allan:
>
> The Examples below were taken directly from the CD supplied with
your Simple
> Multi-tasking Co-Processor.
>
> '--- Robotics Template (& PLC Template & PLC/Robotics Demos)
>
> If NotRdy = 1 Then SkipShift
> ShiftIn DPin, C1Pin, MsbPost, [noparse][[/noparse]L_Servo,R_Servo,DBugSws]
> PulsOut C1Pin, EOXfer
> SkipShift:
>
> Answer 1 - If the data is not ready then Skip as above example
> Answer 2 - ShiftIn as above
>
> I counted a total of 9 examples that cover everything from
receiving with,
> without Qualifiers, Checksums, Header Length etc.. Even templates
for both
> Robotics and PLC type applications. So that should get you started
for
> virtually anything you wish to tackle.
>
> I stripped out all the code for this post and here are some Example
> headings:
>
> 'RECEIVING A PRE-DETERMINDED PACKET LENGTH
>
> 'RECEIVING A VARIABLE PACKET LENGTH
>
> 'USING A QUALIFIER, FIXED LENGTH PACKETS & BYPASSING ALL OTHER DATA
>
> 'VALIDATING FIXED LENGTH PACKETS WITH A CHECKSUM
>
> 'USING A QUALIFIER, FIXED LENGTH PACKETS & VALIDATING WITH A
CHECKSUM
>
> All on the existing CD - now that is comprehensive!
>
> An enormous amount of time has been spent in preparing examples not
just for
> the Simple Multi-tasking chip
> http://www.rhombus-tek.com/SMt_PLC.htm
> http://www.rhombus-tek.com/SMt_Rob.htm
>
> but also for:
> http://www.rhombus-tek.com/FP.htm
> (Floating Point with Calculator style stored programs)
> http://www.rhombus-tek.com/OneWire.htm
> (1-Wire interface for the BS2)
>
> The thinking is the User starts with an example that is close to
what is
> needed, 'And It Works', then starts adjusting and re-testing at
each stage -
> easy to backtrack and learn from any errors. Much faster than
trying to
> start from scratch.
>
>
> David Lawrence
>
> http://www.rhombus-tek.com/co-processors.html
>
>
> > I've now done more work with the SMt. It's a
> > really good idea -- but I think perhaps the
> > serial port needs some work. I'm unable to
> > figure out how to get 232 data out of it once
> > it's sent into it. I also havn't been able
> > to figure out (yet) how to ask it if it has
> > 232 data, without waiting for it to get 232
> > data.
> >
> > Later, AllanL.
The Examples below were taken directly from the CD supplied with your Simple
Multi-tasking Co-Processor.
'--- Robotics Template (& PLC Template & PLC/Robotics Demos)
If NotRdy = 1 Then SkipShift
ShiftIn DPin, C1Pin, MsbPost, [noparse][[/noparse]L_Servo,R_Servo,DBugSws]
PulsOut C1Pin, EOXfer
SkipShift:
Answer 1 - If the data is not ready then Skip as above example
Answer 2 - ShiftIn as above
I counted a total of 9 examples that cover everything from receiving with,
without Qualifiers, Checksums, Header Length etc.. Even templates for both
Robotics and PLC type applications. So that should get you started for
virtually anything you wish to tackle.
I stripped out all the code for this post and here are some Example
headings:
'RECEIVING A PRE-DETERMINDED PACKET LENGTH
'RECEIVING A VARIABLE PACKET LENGTH
'USING A QUALIFIER, FIXED LENGTH PACKETS & BYPASSING ALL OTHER DATA
'VALIDATING FIXED LENGTH PACKETS WITH A CHECKSUM
'USING A QUALIFIER, FIXED LENGTH PACKETS & VALIDATING WITH A CHECKSUM
All on the existing CD - now that is comprehensive!
An enormous amount of time has been spent in preparing examples not just for
the Simple Multi-tasking chip
http://www.rhombus-tek.com/SMt_PLC.htm
http://www.rhombus-tek.com/SMt_Rob.htm
but also for:
http://www.rhombus-tek.com/FP.htm
(Floating Point with Calculator style stored programs)
http://www.rhombus-tek.com/OneWire.htm
(1-Wire interface for the BS2)
The thinking is the User starts with an example that is close to what is
needed, 'And It Works', then starts adjusting and re-testing at each stage -
easy to backtrack and learn from any errors. Much faster than trying to
start from scratch.
David Lawrence
http://www.rhombus-tek.com/co-processors.html
> I've now done more work with the SMt. It's a
> really good idea -- but I think perhaps the
> serial port needs some work. I'm unable to
> figure out how to get 232 data out of it once
> it's sent into it. I also havn't been able
> to figure out (yet) how to ask it if it has
> 232 data, without waiting for it to get 232
> data.
>
> Later, AllanL.
circuit will make 120 Hz ripple (100 Hz in Europe at 50 Hz) and a single
diode rectifier will make 60 Hz ripple. If you can guarantee the line cord
never gets flipped, then you can certainly use a series resistor with a
diode to make a poor-man's 60 Hz square wave generator with a .6 volt peak.
Remember this diode will need to block the full peak of the reverse sine wav
of the line voltage, so it needs to be a 200 Volt minimum diode, or 400
volts if it's seeing a full 170 volts from a full charged cap on the
positive side. I always used 600 volt PIV diodes for safety in my own
experiments. Again, transformer isolation is a good thing since it will
lower the voltage and limit the peak currents involved in a wiring mishap.
Mike Sokol
www.modernrecording.com
mikes@m...
Original Message
From: "Jim Forkin" <jjf@p...>
To: <basicstamps@yahoogroups.com>
Sent: Monday, August 11, 2003 10:52 AM
Subject: RE: [noparse][[/noparse]basicstamps] Re: Precision Timing with SMt
> The resistors are wired as a voltage divider to drop the AC down to a safe
> level and the capacitor couples the low level AC to your circuitry. You
> could then rectify it to product a dc level which follows the 60 hz and
> square it up with a one-shot or even ttl circuitry (sn7404) and you then
> have a precision 60 hz time base.
>
> jim
> http://www.geocities.com/jimforkin2003/
>
>
>
Original Message
> From: Allan Lane [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=qif0EaCxq7hUetR8Wl2615DKc6TPDdBBjY0reS0m0ROCQdIewJI2_RdBkxn1OX-jSme63Rgd_h8LCOazjGtz_cBx15XS]allan.lane@h...[/url
> Sent: Friday, August 08, 2003 7:50 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: Precision Timing with SMt
>
>
> Well, yes, a capacitor and two resistors, and
> connecting directly to 120 volts AC. Or did
> you forget to mention the voltage drop-down
> transformer?
>
> Oh, wait, I've never looked at the ripple coming
> out of my 'unregulated' DC adapters -- will that
> give me 60 Hz?
>
> I've now done more work with the SMt. It's a
> really good idea -- but I think perhaps the
> serial port needs some work. I'm unable to
> figure out how to get 232 data out of it once
> it's sent into it. I also havn't been able
> to figure out (yet) how to ask it if it has
> 232 data, without waiting for it to get 232
> data.
>
> Later, AllanL.
>
> --- In basicstamps@yahoogroups.com, "Jim Forkin" <jjf@p...> wrote:
> > Don't forget that, in the USA anyway, the power line frequency is
> regulated
> > very accurately to 60 Hz. Just sample it and generate a timing
> pulse 60
> > times a second and there is your accurate clock which require only a
> > capacitor and two resistors.
> > jim
> > http://www.geocities.com/jimforkin2003/
> >
> >
> >
Original Message
> > From: Allan Lane [noparse][[/noparse]mailto:allan.lane@h...]
> > Sent: Wednesday, August 06, 2003 4:05 PM
> > To: basicstamps@yahoogroups.com
> > Subject: [noparse][[/noparse]basicstamps] Precision Timing with SMt
> >
> >
> > Wahoo, I've got the little beast (8-pins, 4 components,
> > and 6 wires) installed. It does give a very nice
> > square wave -- 50 mSec high, 50 mSec low -- which the
> > BS2 can read and keep up with quite nicely.
> >
> > However -- it does use a Resonator, and so a clock
> > based on this (which I did in BS2 code, BTW) is only
> > as accurate as the Resonator. Mine runs fast by
> > about 1 second every 5 minutes. Note if I had
> > an accurate crystal, I could get time-stamps
> > accurate to .050 sec.
> >
> > Having said that, there's ways of getting a more
> > accurate oscillator frequency I'll be pursuing.
> > Overall, I still think this is a very clever way
> > of providing the BS2 with a 'tick', so its actions
> > can be synchronized to wall time.
> >
> > I simply have a short 'idle' loop, which waits
> > for the 50 mSec 'tick' state to change. It remembers
> > this state, then goes off to execute some code.
> > Having executed a little, it then calls the
> > 'idle' loop again, and waits for the next 'tick'.
> >
> > Currently my code simply increments some time
> > variables by 50 mSec each time. (Hr, Min, Sec, mSec).
> > and displays the resulting time. This is a very
> > nice way to demonstrate multi-tasking on an
> > introductory level.
> >
> > --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> > wrote:
> > > DOH, that's 'Simple Multi-task' (SMt) solution.
> > >
> > > --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> > > wrote:
> > > > David has a very nice 8-pin 'SMt'
> > > > 'Simple Real-Time' solution. I'm
> > > > currently evaluating these for use.
> > > >
> > > > More later.
> > > >
> > > > --- In basicstamps@yahoogroups.com, "Allan Lane"
> > <allan.lane@h...>
> > > > wrote:
> > > > > Wow, very impressive.
> > > > > A selectable, accurate 'tick' generator
> > > > > in an 8-pin package, WITH a receive-only
> > > > > UART, no MAX232 needed. With this,
> > > > > a BS2 can time-stamp its own readings
> > > > > just by waiting for the 'tick'.
> > > > >
> > > > > However, I couldn't find the link for
> > > > > ordering your AVR package.
> > > > >
> > > > > --- In basicstamps@yahoogroups.com, "David Lawrence"
> > <david@r...>
> > > > > wrote:
> > > > > > Yes!
> > > > > >
> > > > > > This will give your Stamp 'ticks' at intervals ranging from
> > 5mS
> > > > up
> > > > > to 1+
> > > > > > secs in 5mS increments - use Stamp 'Shiftout' to setup the 8
> > > pin
> > > > > device - it
> > > > > > also buffers 57k baud in parallel, and costs <$12.
> > > > > > http://www.rhombus-tek.com/co-processors.html
> > > > > > http://www.rhombus-tek.com/SMt.htm
> > > > > >
> > > > > > If that does not meet your speed needs, this definitely
> will:
> > > > > > http://www.rhombus-tek.com/avr-starter.html
> > > > > > and without the complexities of a BasicX 'RTOS'.
> > > > > >
> > > > > > David Lawrence
> > > > > > Rhombus
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
Original Message
> > > > > > From: Allan Lane <allan.lane@h...>
> > > > > > To: <basicstamps@yahoogroups.com>
> > > > > > Sent: Wednesday, July 30, 2003 2:41 PM
> > > > > > Subject: [noparse][[/noparse]basicstamps] Re: precision timer and the bs2p
> > > > > >
> > > > > >
> > > > > > > I believe the BasicX processor has its own
> > > > > > > real-time clock in it -- but you should ask
> > > > > > > on their Forum.
> > > > > > >
> > > > > > > --- In basicstamps@yahoogroups.com, "Christian Wentz"
> > > > > <cwentz86@h...>
> > > > > > > wrote:
> > > > > > > > my setup is running a BS2P (12,000 instructions/sec)
> with
> > > an
> > > > > array
> > > > > > > of
> > > > > > > > relatively fast ADC's (200,000sps), but i'm considering
> > > > running
> > > > > a
> > > > > > > basicx-01
> > > > > > > > chip from netmedia at 60,000 instructions/sec. Given
> those
> > > > > > > constraints, is
> > > > > > > > there an IC that can give .01-.001 resolution?
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
> Subject and
> > Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
> Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
forgot to mention that you can put a 5-volt Zener in series with the
rectifier resistor to make this circuit do a 5 V square wave. You can't use
a Zener diode to block the reverse part of the sine wave since they're
already in reverse biased avalanche mode when doing their job.
Mike Sokol
www.modernrecording.com
mikes@m...
Original Message
From: "Mike Sokol - ModernRecording" <mikes@m...>
To: <basicstamps@yahoogroups.com>
Sent: Monday, August 11, 2003 10:17 AM
Subject: Re: [noparse][[/noparse]basicstamps] Re: Precision Timing with SMt
> Also remember that full-wave bridge rectifiers hooked on an American wall
> circuit will make 120 Hz ripple (100 Hz in Europe at 50 Hz) and a single
> diode rectifier will make 60 Hz ripple. If you can guarantee the line cord
> never gets flipped, then you can certainly use a series resistor with a
> diode to make a poor-man's 60 Hz square wave generator with a .6 volt
peak.
> Remember this diode will need to block the full peak of the reverse sine
wav
> of the line voltage, so it needs to be a 200 Volt minimum diode, or 400
> volts if it's seeing a full 170 volts from a full charged cap on the
> positive side. I always used 600 volt PIV diodes for safety in my own
> experiments. Again, transformer isolation is a good thing since it will
> lower the voltage and limit the peak currents involved in a wiring mishap.
>
> Mike Sokol
> www.modernrecording.com
> mikes@m...
>
>
>
Original Message
> From: "Jim Forkin" <jjf@p...>
> To: <basicstamps@yahoogroups.com>
> Sent: Monday, August 11, 2003 10:52 AM
> Subject: RE: [noparse][[/noparse]basicstamps] Re: Precision Timing with SMt
>
>
> > The resistors are wired as a voltage divider to drop the AC down to a
safe
> > level and the capacitor couples the low level AC to your circuitry. You
> > could then rectify it to product a dc level which follows the 60 hz and
> > square it up with a one-shot or even ttl circuitry (sn7404) and you then
> > have a precision 60 hz time base.
> >
> > jim
> > http://www.geocities.com/jimforkin2003/
> >
> >
> >
Original Message
> > From: Allan Lane [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=3atyIm5paNjyiDqmxVeMSYJg_fhDQZm1mxjDhlykdrrPz5Nq7Y-x50bGrVAcYsOshH7fSufGQkVrrdVtt0648g1nZxwG0A]allan.lane@h...[/url
> > Sent: Friday, August 08, 2003 7:50 PM
> > To: basicstamps@yahoogroups.com
> > Subject: [noparse][[/noparse]basicstamps] Re: Precision Timing with SMt
> >
> >
> > Well, yes, a capacitor and two resistors, and
> > connecting directly to 120 volts AC. Or did
> > you forget to mention the voltage drop-down
> > transformer?
> >
> > Oh, wait, I've never looked at the ripple coming
> > out of my 'unregulated' DC adapters -- will that
> > give me 60 Hz?
> >
> > I've now done more work with the SMt. It's a
> > really good idea -- but I think perhaps the
> > serial port needs some work. I'm unable to
> > figure out how to get 232 data out of it once
> > it's sent into it. I also havn't been able
> > to figure out (yet) how to ask it if it has
> > 232 data, without waiting for it to get 232
> > data.
> >
> > Later, AllanL.
> >
> > --- In basicstamps@yahoogroups.com, "Jim Forkin" <jjf@p...> wrote:
> > > Don't forget that, in the USA anyway, the power line frequency is
> > regulated
> > > very accurately to 60 Hz. Just sample it and generate a timing
> > pulse 60
> > > times a second and there is your accurate clock which require only a
> > > capacitor and two resistors.
> > > jim
> > > http://www.geocities.com/jimforkin2003/
> > >
> > >
> > >
Original Message
> > > From: Allan Lane [noparse][[/noparse]mailto:allan.lane@h...]
> > > Sent: Wednesday, August 06, 2003 4:05 PM
> > > To: basicstamps@yahoogroups.com
> > > Subject: [noparse][[/noparse]basicstamps] Precision Timing with SMt
> > >
> > >
> > > Wahoo, I've got the little beast (8-pins, 4 components,
> > > and 6 wires) installed. It does give a very nice
> > > square wave -- 50 mSec high, 50 mSec low -- which the
> > > BS2 can read and keep up with quite nicely.
> > >
> > > However -- it does use a Resonator, and so a clock
> > > based on this (which I did in BS2 code, BTW) is only
> > > as accurate as the Resonator. Mine runs fast by
> > > about 1 second every 5 minutes. Note if I had
> > > an accurate crystal, I could get time-stamps
> > > accurate to .050 sec.
> > >
> > > Having said that, there's ways of getting a more
> > > accurate oscillator frequency I'll be pursuing.
> > > Overall, I still think this is a very clever way
> > > of providing the BS2 with a 'tick', so its actions
> > > can be synchronized to wall time.
> > >
> > > I simply have a short 'idle' loop, which waits
> > > for the 50 mSec 'tick' state to change. It remembers
> > > this state, then goes off to execute some code.
> > > Having executed a little, it then calls the
> > > 'idle' loop again, and waits for the next 'tick'.
> > >
> > > Currently my code simply increments some time
> > > variables by 50 mSec each time. (Hr, Min, Sec, mSec).
> > > and displays the resulting time. This is a very
> > > nice way to demonstrate multi-tasking on an
> > > introductory level.
> > >
> > > --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> > > wrote:
> > > > DOH, that's 'Simple Multi-task' (SMt) solution.
> > > >
> > > > --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> > > > wrote:
> > > > > David has a very nice 8-pin 'SMt'
> > > > > 'Simple Real-Time' solution. I'm
> > > > > currently evaluating these for use.
> > > > >
> > > > > More later.
> > > > >
> > > > > --- In basicstamps@yahoogroups.com, "Allan Lane"
> > > <allan.lane@h...>
> > > > > wrote:
> > > > > > Wow, very impressive.
> > > > > > A selectable, accurate 'tick' generator
> > > > > > in an 8-pin package, WITH a receive-only
> > > > > > UART, no MAX232 needed. With this,
> > > > > > a BS2 can time-stamp its own readings
> > > > > > just by waiting for the 'tick'.
> > > > > >
> > > > > > However, I couldn't find the link for
> > > > > > ordering your AVR package.
> > > > > >
> > > > > > --- In basicstamps@yahoogroups.com, "David Lawrence"
> > > <david@r...>
> > > > > > wrote:
> > > > > > > Yes!
> > > > > > >
> > > > > > > This will give your Stamp 'ticks' at intervals ranging from
> > > 5mS
> > > > > up
> > > > > > to 1+
> > > > > > > secs in 5mS increments - use Stamp 'Shiftout' to setup the 8
> > > > pin
> > > > > > device - it
> > > > > > > also buffers 57k baud in parallel, and costs <$12.
> > > > > > > http://www.rhombus-tek.com/co-processors.html
> > > > > > > http://www.rhombus-tek.com/SMt.htm
> > > > > > >
> > > > > > > If that does not meet your speed needs, this definitely
> > will:
> > > > > > > http://www.rhombus-tek.com/avr-starter.html
> > > > > > > and without the complexities of a BasicX 'RTOS'.
> > > > > > >
> > > > > > > David Lawrence
> > > > > > > Rhombus
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
Original Message
> > > > > > > From: Allan Lane <allan.lane@h...>
> > > > > > > To: <basicstamps@yahoogroups.com>
> > > > > > > Sent: Wednesday, July 30, 2003 2:41 PM
> > > > > > > Subject: [noparse][[/noparse]basicstamps] Re: precision timer and the bs2p
> > > > > > >
> > > > > > >
> > > > > > > > I believe the BasicX processor has its own
> > > > > > > > real-time clock in it -- but you should ask
> > > > > > > > on their Forum.
> > > > > > > >
> > > > > > > > --- In basicstamps@yahoogroups.com, "Christian Wentz"
> > > > > > <cwentz86@h...>
> > > > > > > > wrote:
> > > > > > > > > my setup is running a BS2P (12,000 instructions/sec)
> > with
> > > > an
> > > > > > array
> > > > > > > > of
> > > > > > > > > relatively fast ADC's (200,000sps), but i'm considering
> > > > > running
> > > > > > a
> > > > > > > > basicx-01
> > > > > > > > > chip from netmedia at 60,000 instructions/sec. Given
> > those
> > > > > > > > constraints, is
> > > > > > > > > there an IC that can give .01-.001 resolution?
> > >
> > >
> > > To UNSUBSCRIBE, just send mail to:
> > > basicstamps-unsubscribe@yahoogroups.com
> > > from the same email address that you subscribed. Text in the
> > Subject and
> > > Body of the message will be ignored.
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject
and
> > Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject
and
> Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
level and the capacitor couples the low level AC to your circuitry. You
could then rectify it to product a dc level which follows the 60 hz and
square it up with a one-shot or even ttl circuitry (sn7404) and you then
have a precision 60 hz time base.
jim
http://www.geocities.com/jimforkin2003/
Original Message
From: Allan Lane [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=iMulhLeOv-nKb1tOvVhXPLqfRTExSKPvBbnocD9CbEQWwANYRLshQncuxUD--3IT7dkyMnvRdZoHdnVM0JhM3S5msIOs]allan.lane@h...[/url
Sent: Friday, August 08, 2003 7:50 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: Precision Timing with SMt
Well, yes, a capacitor and two resistors, and
connecting directly to 120 volts AC. Or did
you forget to mention the voltage drop-down
transformer?
Oh, wait, I've never looked at the ripple coming
out of my 'unregulated' DC adapters -- will that
give me 60 Hz?
I've now done more work with the SMt. It's a
really good idea -- but I think perhaps the
serial port needs some work. I'm unable to
figure out how to get 232 data out of it once
it's sent into it. I also havn't been able
to figure out (yet) how to ask it if it has
232 data, without waiting for it to get 232
data.
Later, AllanL.
--- In basicstamps@yahoogroups.com, "Jim Forkin" <jjf@p...> wrote:
> Don't forget that, in the USA anyway, the power line frequency is
regulated
> very accurately to 60 Hz. Just sample it and generate a timing
pulse 60
> times a second and there is your accurate clock which require only a
> capacitor and two resistors.
> jim
> http://www.geocities.com/jimforkin2003/
>
>
>
Original Message
> From: Allan Lane [noparse][[/noparse]mailto:allan.lane@h...]
> Sent: Wednesday, August 06, 2003 4:05 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Precision Timing with SMt
>
>
> Wahoo, I've got the little beast (8-pins, 4 components,
> and 6 wires) installed. It does give a very nice
> square wave -- 50 mSec high, 50 mSec low -- which the
> BS2 can read and keep up with quite nicely.
>
> However -- it does use a Resonator, and so a clock
> based on this (which I did in BS2 code, BTW) is only
> as accurate as the Resonator. Mine runs fast by
> about 1 second every 5 minutes. Note if I had
> an accurate crystal, I could get time-stamps
> accurate to .050 sec.
>
> Having said that, there's ways of getting a more
> accurate oscillator frequency I'll be pursuing.
> Overall, I still think this is a very clever way
> of providing the BS2 with a 'tick', so its actions
> can be synchronized to wall time.
>
> I simply have a short 'idle' loop, which waits
> for the 50 mSec 'tick' state to change. It remembers
> this state, then goes off to execute some code.
> Having executed a little, it then calls the
> 'idle' loop again, and waits for the next 'tick'.
>
> Currently my code simply increments some time
> variables by 50 mSec each time. (Hr, Min, Sec, mSec).
> and displays the resulting time. This is a very
> nice way to demonstrate multi-tasking on an
> introductory level.
>
> --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> wrote:
> > DOH, that's 'Simple Multi-task' (SMt) solution.
> >
> > --- In basicstamps@yahoogroups.com, "Allan Lane" <allan.lane@h...>
> > wrote:
> > > David has a very nice 8-pin 'SMt'
> > > 'Simple Real-Time' solution. I'm
> > > currently evaluating these for use.
> > >
> > > More later.
> > >
> > > --- In basicstamps@yahoogroups.com, "Allan Lane"
> <allan.lane@h...>
> > > wrote:
> > > > Wow, very impressive.
> > > > A selectable, accurate 'tick' generator
> > > > in an 8-pin package, WITH a receive-only
> > > > UART, no MAX232 needed. With this,
> > > > a BS2 can time-stamp its own readings
> > > > just by waiting for the 'tick'.
> > > >
> > > > However, I couldn't find the link for
> > > > ordering your AVR package.
> > > >
> > > > --- In basicstamps@yahoogroups.com, "David Lawrence"
> <david@r...>
> > > > wrote:
> > > > > Yes!
> > > > >
> > > > > This will give your Stamp 'ticks' at intervals ranging from
> 5mS
> > > up
> > > > to 1+
> > > > > secs in 5mS increments - use Stamp 'Shiftout' to setup the 8
> > pin
> > > > device - it
> > > > > also buffers 57k baud in parallel, and costs <$12.
> > > > > http://www.rhombus-tek.com/co-processors.html
> > > > > http://www.rhombus-tek.com/SMt.htm
> > > > >
> > > > > If that does not meet your speed needs, this definitely
will:
> > > > > http://www.rhombus-tek.com/avr-starter.html
> > > > > and without the complexities of a BasicX 'RTOS'.
> > > > >
> > > > > David Lawrence
> > > > > Rhombus
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
Original Message
> > > > > From: Allan Lane <allan.lane@h...>
> > > > > To: <basicstamps@yahoogroups.com>
> > > > > Sent: Wednesday, July 30, 2003 2:41 PM
> > > > > Subject: [noparse][[/noparse]basicstamps] Re: precision timer and the bs2p
> > > > >
> > > > >
> > > > > > I believe the BasicX processor has its own
> > > > > > real-time clock in it -- but you should ask
> > > > > > on their Forum.
> > > > > >
> > > > > > --- In basicstamps@yahoogroups.com, "Christian Wentz"
> > > > <cwentz86@h...>
> > > > > > wrote:
> > > > > > > my setup is running a BS2P (12,000 instructions/sec)
with
> > an
> > > > array
> > > > > > of
> > > > > > > relatively fast ADC's (200,000sps), but i'm considering
> > > running
> > > > a
> > > > > > basicx-01
> > > > > > > chip from netmedia at 60,000 instructions/sec. Given
those
> > > > > > constraints, is
> > > > > > > there an IC that can give .01-.001 resolution?
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject and
> Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/