bs2e-ic problem help!!!!!....everyone look!
Archiver
Posts: 46,084
Ok everyone,
I have 2 stamps a bs2sx-ic and a bs2e-ic....
i have a stopwatch program and in order to create a delay between
incrementing the milliseconds portion i used the pulsout command. So
on my bs2sx-ic the pulse out command was set to 360 (pulsout
1,360) i compared this to a clock frequency of a known source of 1HZ
and the stamp told me 1 second (the clock would trip the start stop
portion of the stamp to start the stopwatch) So everything was
running perfect i used a 1 Hz clock and the stamp said...1 second.
So i took the same exact code and ran it on the bs2e-ic and the
stopwatch is running WAY slower if say the clock pulse was 1 second --
the stamp would say like .345! is there something i need to do to
adjust the code between the bs2sx and the bs2e? please help.....i
used to have a very accurate stopwatch now i have garbage with this
new bs2e-ic.
Please help
steve
I have 2 stamps a bs2sx-ic and a bs2e-ic....
i have a stopwatch program and in order to create a delay between
incrementing the milliseconds portion i used the pulsout command. So
on my bs2sx-ic the pulse out command was set to 360 (pulsout
1,360) i compared this to a clock frequency of a known source of 1HZ
and the stamp told me 1 second (the clock would trip the start stop
portion of the stamp to start the stopwatch) So everything was
running perfect i used a 1 Hz clock and the stamp said...1 second.
So i took the same exact code and ran it on the bs2e-ic and the
stopwatch is running WAY slower if say the clock pulse was 1 second --
the stamp would say like .345! is there something i need to do to
adjust the code between the bs2sx and the bs2e? please help.....i
used to have a very accurate stopwatch now i have garbage with this
new bs2e-ic.
Please help
steve
Comments
>Ok everyone,
>I have 2 stamps a bs2sx-ic and a bs2e-ic....
>i have a stopwatch program and in order to create a delay between
>incrementing the milliseconds portion i used the pulsout command. So
>on my bs2sx-ic the pulse out command was set to 360 (pulsout
>1,360) i compared this to a clock frequency of a known source of 1HZ
>and the stamp told me 1 second (the clock would trip the start stop
>portion of the stamp to start the stopwatch) So everything was
>running perfect i used a 1 Hz clock and the stamp said...1 second.
>
>So i took the same exact code and ran it on the bs2e-ic and the
>stopwatch is running WAY slower if say the clock pulse was 1 second --
>the stamp would say like .345! is there something i need to do to
>adjust the code between the bs2sx and the bs2e? please help.....i
>used to have a very accurate stopwatch now i have garbage with this
>new bs2e-ic.
>Please help
>
>steve
Steve -
I must be missing something here -
The BS-2e operates at 20 MHz
The BS-2SX operates at 50 MHz
Why would you expect them to be the same ?
Pulsout 1, 360 is interpreted as -
Send pulses to Pin 1 of N time constants duration
N carries the following time unit values:
(N= 2.0µs ) (360 * 2.0 = 720 µs) in duration for BS-2 (BS-2e)
(N= 0.8 µs ) (360 * 0.8 = 288 µs) in duration for BS-2 SX
You may want to obtain the latest BS-2SX v1.5 document from the Parallax
website.
It lists all the processors and the differences therein. References to the
BS-2e regarding
operators which contain the timer unit considerations are the same as those
for the BS-2.
Just a a passing thought timers which are constructed such as this are
quite dependent on many factors, temperature is quite high among them.
Thus, if the ambient temperature between two otherwise equivalent
processors differs by more than a few degrees, the results may show that
difference. Errors such as this are not only hard to detect, but even more
difficult to overcome and correct. Solutions which use stable, temperature
compensated, crystal oscillators are often used for higher accuracy, if
that is deemed appropriate.
Hope that gets you ticking again : ).
Regards,
Bruce Bates