Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | max timer value?

Discussion forum for the BasicX family of microcontroller chips.

max timer value? - petervanlievenoogen - Nov 15 9:16:00 2002

This routine locks after a few day's
so Pinker stay's 1! If Timer>TimerTempB+1.0 then
If Pinker=0 then
Pinker=1
ElseIf Pinker=1 then
Pinker=0
End If
TimertempB=Timer
End If

I use this to blink a output.





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


Re: max timer value? - Ian Casey - Nov 15 12:16:00 2002

You need to catch the timer overflow / reset at midnight

add

ElseIf TimerTempB > Timer then
TimerTempB = Timer + 1.0
End If
Ian

petervanlievenoogen wrote:

> This routine locks after a few day's
> so Pinker stay's 1! > If Timer>TimerTempB+1.0 then
> If Pinker=0 then
> Pinker=1
> ElseIf Pinker=1 then
> Pinker=0
> End If
> TimertempB=Timer
> End If
>
> I use this to blink a output. >
> >.
> .

[Non-text portions of this message have been removed]


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


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

Re: max timer value? - Frank Manning - Nov 15 12:24:00 2002

From: "petervanlievenoogen" <>

> This routine locks after a few day's
> so Pinker stay's 1!
>
> If Timer>TimerTempB+1.0 then
> If Pinker=0 then
> Pinker=1
> ElseIf Pinker=1 then
> Pinker=0
> End If
> TimertempB=Timer
> End If
>
> I use this to blink a output.

This could easily be a Cinderella problem. If the code runs within
one second of midnight, it's possible TimerTempB doesn't get reset
during the next cycle because Timer wraps to zero.

Once that happens, Timer may never get to be greater than
TimerTempB + 1.0, so Pinker stays constant.

-- Frank Manning
-- NetMedia, Inc.




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