All about Time -
Archiver
Posts: 46,084
I have a BS2 reading a value from a thermistor through a 8/1 ADC MUX.
All is going well, now I just need to find out just how fast this
happens so I can meet my time requirements for this project (near
real time) SO here are a few questions.
What is the best way to find out how long it takes for the BS2 to
request and receive a value from my thermistor?
Then I would like to determine if the BS2 is fast enough for my
project. I have over 400 thermistors to poll, and I would like to
request and receive and store that data, most likely to a PC as fast
as possible. The data packet profile is LocationNum,ThermNum,RValue.
Any thoughts to size the stamp(lines per sec), limits on Serin/Serout
(how fast can I get the data to the PC) Where the bottlenecks will be
and workarounds?
Thanks
RT
All is going well, now I just need to find out just how fast this
happens so I can meet my time requirements for this project (near
real time) SO here are a few questions.
What is the best way to find out how long it takes for the BS2 to
request and receive a value from my thermistor?
Then I would like to determine if the BS2 is fast enough for my
project. I have over 400 thermistors to poll, and I would like to
request and receive and store that data, most likely to a PC as fast
as possible. The data packet profile is LocationNum,ThermNum,RValue.
Any thoughts to size the stamp(lines per sec), limits on Serin/Serout
(how fast can I get the data to the PC) Where the bottlenecks will be
and workarounds?
Thanks
RT
Comments
This is a $200 USB-port 8-line logic analyzer,
samples at 400 Mhz to 100 Hz, which you can
attach to the pins of the BS2.
You can then run your code, sample the
execution time, and see exactly how long
things take.
You might want to upgrade your BS2
to the BS2sx, as it's faster than
the plain BS2.
--- In basicstamps@yahoogroups.com, "rltaylor001" <rltaylor001@h...>
wrote:
> I have a BS2 reading a value from a thermistor through a 8/1 ADC
MUX.
> All is going well, now I just need to find out just how fast this
> happens so I can meet my time requirements for this project (near
> real time) SO here are a few questions.
>
> What is the best way to find out how long it takes for the BS2 to
> request and receive a value from my thermistor?
>
> Then I would like to determine if the BS2 is fast enough for my
> project. I have over 400 thermistors to poll, and I would like to
> request and receive and store that data, most likely to a PC as
fast
> as possible. The data packet profile is LocationNum,ThermNum,RValue.
>
> Any thoughts to size the stamp(lines per sec), limits on
Serin/Serout
> (how fast can I get the data to the PC) Where the bottlenecks will
be
> and workarounds?
>
> Thanks
> RT
second I did a dual digital vacuum meter that sends the data to the
serial port. I was able to send about 25 samples a second through the
serial port on a BS2p40.
This involved getting a reading from channel 1 of a MAX186 12 bit
A/D, formatting the data to inHg, getting another sample from channel
2 of the A/D, formatting the data and then sending both samples out
the serial port at 56Kbps and then repeating the whole thing ofer
again. I could have saved time by not formatting the data in the
stamp but I was using StampDAC to capture data.
The stamp worked fine for that application but I needed more samples
per second for another application using the same pressure
transducers. I bought PICBasic Pro from meLabs and easily ported my
stamp code to a PIC16F877-20. I used the internal 10 bit A/D on the
PIC and used the same data formatting. I used the built in USART on
the PIC to send out the data. I was able to get 350 samples a second.
A pretty good improvement.
Jason
--- In basicstamps@yahoogroups.com, "rltaylor001" <rltaylor001@h...>
wrote:
> I have a BS2 reading a value from a thermistor through a 8/1 ADC
MUX.
> All is going well, now I just need to find out just how fast this
> happens so I can meet my time requirements for this project (near
> real time) SO here are a few questions.
>
> What is the best way to find out how long it takes for the BS2 to
> request and receive a value from my thermistor?
>
> Then I would like to determine if the BS2 is fast enough for my
> project. I have over 400 thermistors to poll, and I would like to
> request and receive and store that data, most likely to a PC as
fast
> as possible. The data packet profile is LocationNum,ThermNum,RValue.
>
> Any thoughts to size the stamp(lines per sec), limits on
Serin/Serout
> (how fast can I get the data to the PC) Where the bottlenecks will
be
> and workarounds?
>
> Thanks
> RT
shot for a project is a bit high when you can get a PIC for $7 bucks!
Is it more costly to get started? Compiler does cost money.....hum.
Anyone else do both?
Thanks,
Tim
>>> jbirnsch@v... 07/18/03 11:04AM >>>
400 thermisters is a tall order for a stamp!!! As far as samples a
second I did a dual digital vacuum meter that sends the data to the
serial port. I was able to send about 25 samples a second through the
serial port on a BS2p40.
This involved getting a reading from channel 1 of a MAX186 12 bit
A/D, formatting the data to inHg, getting another sample from channel
2 of the A/D, formatting the data and then sending both samples out
the serial port at 56Kbps and then repeating the whole thing ofer
again. I could have saved time by not formatting the data in the
stamp but I was using StampDAC to capture data.
The stamp worked fine for that application but I needed more samples
per second for another application using the same pressure
transducers. I bought PICBasic Pro from meLabs and easily ported my
stamp code to a PIC16F877-20. I used the internal 10 bit A/D on the
PIC and used the same data formatting. I used the built in USART on
the PIC to send out the data. I was able to get 350 samples a second.
A pretty good improvement.
Jason
the stamp a lot for trying out new stuff, since it's a lot quicker for
prototyping and is considerably easier to get working right the first time.
For permanent stuff or production stuff, though, I always convert it over to
the SX or AVR, since I don't mind having <$5 tied up in a mcu in a permanent
app. whereas >$50 is a little much for my budget. Besides which, the AVRs
are considerably more capable than the Stamp, so they often make a better
finished product, just it's a royal PITA to get a prototype going and
working without heavy reliance on the Stamp. The debug function, simple
coding, and on-board EEPROM and clock make it indispensable for prototyping.
- Robert
Original Message
From: "Tim Hart" <tim.hart@h...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, July 18, 2003 10:59 AM
Subject: [noparse][[/noparse]basicstamps] Re: All about Time -
> Do many people start out on the Stamp and move over to PICs? Seems $50
bucks a shot for a project is a bit high when you can get a PIC for $7
bucks!
>
> Is it more costly to get started? Compiler does cost money.....hum.
>
> Anyone else do both?
>
> Thanks,
> Tim
>
> >>> jbirnsch@v... 07/18/03 11:04AM >>>
> 400 thermisters is a tall order for a stamp!!! As far as samples a
> second I did a dual digital vacuum meter that sends the data to the
> serial port. I was able to send about 25 samples a second through the
> serial port on a BS2p40.
>
> This involved getting a reading from channel 1 of a MAX186 12 bit
> A/D, formatting the data to inHg, getting another sample from channel
> 2 of the A/D, formatting the data and then sending both samples out
> the serial port at 56Kbps and then repeating the whole thing ofer
> again. I could have saved time by not formatting the data in the
> stamp but I was using StampDAC to capture data.
>
> The stamp worked fine for that application but I needed more samples
> per second for another application using the same pressure
> transducers. I bought PICBasic Pro from meLabs and easily ported my
> stamp code to a PIC16F877-20. I used the internal 10 bit A/D on the
> PIC and used the same data formatting. I used the built in USART on
> the PIC to send out the data. I was able to get 350 samples a second.
> A pretty good improvement.
>
> Jason
>
>
>
> 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/
>
>
If you have an oscilloscope, you can have the stamp blip a pin at
critical points in your loop, so you can read the time off the
screen. Or, have your program run the loop a certain rather large
number of times, and time it on the second hand of your watch, and
then divide.
I have some timing information that might be useful to you posted at
<http://www.emesystems.com/BS2speed.htm>
The speed that the interpreter reads the instructions is the main
Stamp bottleneck. Although, any time you use the SEROUT commands,
those intrinsically eat up time. Use the highest reliable baud rate.
The article above also links to information about the relative speed
of the different serial modifiers, for example, using the DEC
modifier is very slow both for interpretation and for sending all of
the bytes, so you are much better off sending binary values, byte
values instead of words if you can reduce your thermistor data to
that. Linearization of a thermistor on the Stamp will be very slow,
so it is best if you can do that on the PC. For 400 thermistors,
wow!, I'd estimate an absolute minimum full loop time of 5
milliseconds each or 2 seconds for all, on the fastest Stamp, the
BS2p. Realistically, I'd agree with others at 25 samples per second
which would be 16 seconds to get through all 400. You'd need a good
mux scheme!
-- Tracy
>I have a BS2 reading a value from a thermistor through a 8/1 ADC MUX.
>All is going well, now I just need to find out just how fast this
>happens so I can meet my time requirements for this project (near
>real time) SO here are a few questions.
>
>What is the best way to find out how long it takes for the BS2 to
>request and receive a value from my thermistor?
>
>Then I would like to determine if the BS2 is fast enough for my
>project. I have over 400 thermistors to poll, and I would like to
>request and receive and store that data, most likely to a PC as fast
>as possible. The data packet profile is LocationNum,ThermNum,RValue.
>
>Any thoughts to size the stamp(lines per sec), limits on Serin/Serout
>(how fast can I get the data to the PC) Where the bottlenecks will be
>and workarounds?
>
>Thanks
>RT
worked out you can move it over to the less expensive chips. Seems logical!
Can you point me to some info one AVR and SX?
Thanks,
Tim
>>> uavscience@f... 07/18/03 12:12PM >>>
Yep, except that I've moved on to the SX and then to the AVR's. I still use
the stamp a lot for trying out new stuff, since it's a lot quicker for
prototyping and is considerably easier to get working right the first time.
For permanent stuff or production stuff, though, I always convert it over to
the SX or AVR, since I don't mind having <$5 tied up in a mcu in a permanent
app. whereas >$50 is a little much for my budget. Besides which, the AVRs
are considerably more capable than the Stamp, so they often make a better
finished product, just it's a royal PITA to get a prototype going and
working without heavy reliance on the Stamp. The debug function, simple
coding, and on-board EEPROM and clock make it indispensable for prototyping.
- Robert
Original Message
From: "Tim Hart" <tim.hart@h...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, July 18, 2003 10:59 AM
Subject: [noparse][[/noparse]basicstamps] Re: All about Time -
> Do many people start out on the Stamp and move over to PICs? Seems $50
bucks a shot for a project is a bit high when you can get a PIC for $7
bucks!
>
> Is it more costly to get started? Compiler does cost money.....hum.
>
> Anyone else do both?
>
> Thanks,
> Tim
>
> >>> jbirnsch@v... 07/18/03 11:04AM >>>
> 400 thermisters is a tall order for a stamp!!! As far as samples a
> second I did a dual digital vacuum meter that sends the data to the
> serial port. I was able to send about 25 samples a second through the
> serial port on a BS2p40.
>
> This involved getting a reading from channel 1 of a MAX186 12 bit
> A/D, formatting the data to inHg, getting another sample from channel
> 2 of the A/D, formatting the data and then sending both samples out
> the serial port at 56Kbps and then repeating the whole thing ofer
> again. I could have saved time by not formatting the data in the
> stamp but I was using StampDAC to capture data.
>
> The stamp worked fine for that application but I needed more samples
> per second for another application using the same pressure
> transducers. I bought PICBasic Pro from meLabs and easily ported my
> stamp code to a PIC16F877-20. I used the internal 10 bit A/D on the
> PIC and used the same data formatting. I used the built in USART on
> the PIC to send out the data. I was able to get 350 samples a second.
> A pretty good improvement.
>
> Jason
>
>
>
> 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 another micro -- unless there is another issue that predicates
changing to an SX or AVR, etc. Prior to working for Parallax, I
developed a product for my employer that I was able to prototype very
rapidly with the Stamp. Then, we were able to get it to market quickly
by using EOM parts. Sure, I could have saved a couple of bucks by
porting the code to a PIC, SX or AVR, but that would have cost my
employer time we didn't have. I didn't have to port code -- it worked
first time because I was still using a *real* BASIC Stamp.
Our OEM parts are a very viable option that many professional engineers
take advantage of. It's worth considering before you invest in learning
something new.
-- Jon Williams
-- Parallax
Original Message
From: Tim Hart [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=f5ADLQfhf7pXrDRFe4lJ43Mxpbk5cUluKrZO16wTo__p-SZrRRhgI1HYuzzwzatZe8gkhO_A_1iibs7Zbbw]tim.hart@h...[/url
Sent: Friday, July 18, 2003 12:00 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Re: All about Time -
Do many people start out on the Stamp and move over to PICs? Seems $50
bucks a shot for a project is a bit high when you can get a PIC for $7
bucks!
Is it more costly to get started? Compiler does cost money.....hum.
Anyone else do both?
Thanks,
Tim
>>> jbirnsch@v... 07/18/03 11:04AM >>>
400 thermisters is a tall order for a stamp!!! As far as samples a
second I did a dual digital vacuum meter that sends the data to the
serial port. I was able to send about 25 samples a second through the
serial port on a BS2p40.
This involved getting a reading from channel 1 of a MAX186 12 bit
A/D, formatting the data to inHg, getting another sample from channel
2 of the A/D, formatting the data and then sending both samples out
the serial port at 56Kbps and then repeating the whole thing ofer
again. I could have saved time by not formatting the data in the
stamp but I was using StampDAC to capture data.
The stamp worked fine for that application but I needed more samples
per second for another application using the same pressure
transducers. I bought PICBasic Pro from meLabs and easily ported my
stamp code to a PIC16F877-20. I used the internal 10 bit A/D on the
PIC and used the same data formatting. I used the built in USART on
the PIC to send out the data. I was able to get 350 samples a second.
A pretty good improvement.
Jason
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/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
Original Message
From: "Tim Hart" <tim.hart@h...>
> I see....the stamp is your playground....a "Sandbox". Once you get
everything worked out you can move it over to the less expensive chips.
Seems logical!
Right on, brother!
> Can you point me to some info one AVR and SX?
Well, your best bet is to start plowing through the datasheets. Get the SX
ds from www.parallax.com, and you can find whatever AVR datasheet you want
on www.atmel.com. My favorite AVR is the ATMEGA8, so I'd suggest you look at
its datasheet first. After you've memorized those, sell some stocks and go
buy yourself an SX Tech board and an AVR STK500 protoboard and start
programming. Free compilers and assemblers for both of these are available -
I don't use one for the SX, since the whole idea of the SX architecture is
to use assembler, but I use AVR GCC for the AVR, available from
www.avrfreaks.com. (<-- really good AVR resource BTW.)
- Robert
I have all the time in the world and like some of the advantages of the AVR
and SX --> higher speed, flexible coding. The stamps are great for debugging
new stuff, though, and I don't think I'd have the patience to get the AVR or
SX working on a new design.
- Robert
Original Message
From: "Jon Williams" <jwilliams@p...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, July 18, 2003 12:15 PM
Subject: RE: [noparse][[/noparse]basicstamps] Re: All about Time -
> The reason we make OEM parts available is so that you don't have to move
> to another micro -- unless there is another issue that predicates
> changing to an SX or AVR, etc. Prior to working for Parallax, I
> developed a product for my employer that I was able to prototype very
> rapidly with the Stamp. Then, we were able to get it to market quickly
> by using EOM parts. Sure, I could have saved a couple of bucks by
> porting the code to a PIC, SX or AVR, but that would have cost my
> employer time we didn't have. I didn't have to port code -- it worked
> first time because I was still using a *real* BASIC Stamp.
>
> Our OEM parts are a very viable option that many professional engineers
> take advantage of. It's worth considering before you invest in learning
> something new.
>
> -- Jon Williams
> -- Parallax
>
>
>
Original Message
> From: Tim Hart [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=lv5XziSxYBZtrXE0MO_7s5XEM2bzrcCo3yqWUSN0JG0fXrlBt1PUHWo3GroudZiLhYztPoMm98XjVSvGJg]tim.hart@h...[/url
> Sent: Friday, July 18, 2003 12:00 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: All about Time -
>
>
> Do many people start out on the Stamp and move over to PICs? Seems $50
> bucks a shot for a project is a bit high when you can get a PIC for $7
> bucks!
>
> Is it more costly to get started? Compiler does cost money.....hum.
>
> Anyone else do both?
>
> Thanks,
> Tim
>
> >>> jbirnsch@v... 07/18/03 11:04AM >>>
> 400 thermisters is a tall order for a stamp!!! As far as samples a
> second I did a dual digital vacuum meter that sends the data to the
> serial port. I was able to send about 25 samples a second through the
> serial port on a BS2p40.
>
> This involved getting a reading from channel 1 of a MAX186 12 bit
> A/D, formatting the data to inHg, getting another sample from channel
> 2 of the A/D, formatting the data and then sending both samples out
> the serial port at 56Kbps and then repeating the whole thing ofer
> again. I could have saved time by not formatting the data in the
> stamp but I was using StampDAC to capture data.
>
> The stamp worked fine for that application but I needed more samples
> per second for another application using the same pressure
> transducers. I bought PICBasic Pro from meLabs and easily ported my
> stamp code to a PIC16F877-20. I used the internal 10 bit A/D on the
> PIC and used the same data formatting. I used the built in USART on
> the PIC to send out the data. I was able to get 350 samples a second.
> A pretty good improvement.
>
> Jason
>
>
>
> 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/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p....
>
>
>
>
> 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/
>
>
projects and kept the Stamp in each I'd be at $500! But if I could move over to
something cheaper...say a $10 chip then I'm only out $100.
Right now I move the stamp around to each project and reprogram it. Time
consuming....but cheap. [noparse]:)[/noparse]
If this was my job (I'm currently a Network Tech) I'd have a different view on
this... It's different when it's someone else's money. [noparse]:)[/noparse]
Thanks for the info!
Tim
>>> uavscience@f... 07/18/03 01:20PM >>>
Never done it, but it does seem a good idea where time is money. In my case,
I have all the time in the world and like some of the advantages of the AVR
and SX --> higher speed, flexible coding. The stamps are great for debugging
new stuff, though, and I don't think I'd have the patience to get the AVR or
SX working on a new design.
- Robert
Original Message
From: "Jon Williams" <jwilliams@p...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, July 18, 2003 12:15 PM
Subject: RE: [noparse][[/noparse]basicstamps] Re: All about Time -
> The reason we make OEM parts available is so that you don't have to move
> to another micro -- unless there is another issue that predicates
> changing to an SX or AVR, etc. Prior to working for Parallax, I
> developed a product for my employer that I was able to prototype very
> rapidly with the Stamp. Then, we were able to get it to market quickly
> by using EOM parts. Sure, I could have saved a couple of bucks by
> porting the code to a PIC, SX or AVR, but that would have cost my
> employer time we didn't have. I didn't have to port code -- it worked
> first time because I was still using a *real* BASIC Stamp.
>
> Our OEM parts are a very viable option that many professional engineers
> take advantage of. It's worth considering before you invest in learning
> something new.
>
> -- Jon Williams
> -- Parallax
>
>
>
Original Message
> From: Tim Hart [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=voiW4HZ2MiY1vZ9nbb1qZ8xAwPLDB5KNUL1KKu2P49mDpArgBaFHrNtWpSNKspY01SscvRMRtk6TjcvZvw]tim.hart@h...[/url
> Sent: Friday, July 18, 2003 12:00 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Re: All about Time -
>
>
> Do many people start out on the Stamp and move over to PICs? Seems $50
> bucks a shot for a project is a bit high when you can get a PIC for $7
> bucks!
>
> Is it more costly to get started? Compiler does cost money.....hum.
>
> Anyone else do both?
>
> Thanks,
> Tim
>
> >>> jbirnsch@v... 07/18/03 11:04AM >>>
> 400 thermisters is a tall order for a stamp!!! As far as samples a
> second I did a dual digital vacuum meter that sends the data to the
> serial port. I was able to send about 25 samples a second through the
> serial port on a BS2p40.
>
> This involved getting a reading from channel 1 of a MAX186 12 bit
> A/D, formatting the data to inHg, getting another sample from channel
> 2 of the A/D, formatting the data and then sending both samples out
> the serial port at 56Kbps and then repeating the whole thing ofer
> again. I could have saved time by not formatting the data in the
> stamp but I was using StampDAC to capture data.
>
> The stamp worked fine for that application but I needed more samples
> per second for another application using the same pressure
> transducers. I bought PICBasic Pro from meLabs and easily ported my
> stamp code to a PIC16F877-20. I used the internal 10 bit A/D on the
> PIC and used the same data formatting. I used the built in USART on
> the PIC to send out the data. I was able to get 350 samples a second.
> A pretty good improvement.
>
> Jason
>
>
>
> 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/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p....
>
>
>
>
> 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/