Re: Timer() loses time

Started by Frank Manning in BasicX13 years ago

From: Neil Jepsen <> > [...]as soon as I realised that timer was not losing > time, my "game_time" was incorrect.. I've repeated ...

From: Neil Jepsen <> > [...]as soon as I realised that timer was not losing > time, my "game_time" was incorrect.. I've repeated > the offending code below, and the fix. [...] > > if (timer>=p) then > p = timer + 1.0 >


PWM & Timer

Started by soso soso in BasicX12 years ago 2 replies

Hi~ I have a question about timer. In my applicaiton, PWM is always used to control a DC motor, but I also want to use the command...

Hi~ I have a question about timer. In my applicaiton, PWM is always used to control a DC motor, but I also want to use the command "timer" to calcuate the time interval of a function. for example: main() CallTask "PWM_Task", PWM_STACK 'a PWM task that always run do A = timer call function() 'just a example function B = t


Watchdog Vs Timer?

Started by novice055 in BasicX15 years ago 2 replies

Hi guy, I understand that the Watchdog is capable of reseting the processor after a maximum of 2048ms. However, my application...

Hi guy, I understand that the Watchdog is capable of reseting the processor after a maximum of 2048ms. However, my application require this timing to be approximately 10sec. Hence, I am trying to use Timer to accomplish this task, as follow: T1 = Timer C


Run time timer

Started by nuepatrick in BasicX11 years ago 2 replies

I have a project that I am designing and I need a simple accurate timer that starts when power is applied to the circuit. I need to display...

I have a project that I am designing and I need a simple accurate timer that starts when power is applied to the circuit. I need to display this on a bpi-216. Any ideas would be appericated. Thanks Patrick


Re: RTC

Started by Art Church in BasicX13 years ago

Thanks. Made those changes. Based on your comments I am now looking at where I use timer and perhaps could use RTCtick instead as I...

Thanks. Made those changes. Based on your comments I am now looking at where I use timer and perhaps could use RTCtick instead as I basically take timer back to to a integer of milliseconds for my purposes.The same should apply there too I would think. Art -----Original Message--


Using Timer 1

Started by p_dubinsky in BasicX13 years ago 4 replies

Howdy folks, I'm experimenting with an app that measures pulse widths. I'm using the Pulsein command but the drawback is the...

Howdy folks, I'm experimenting with an app that measures pulse widths. I'm using the Pulsein command but the drawback is the interference with the basicx real time clock. I'd like to use the processor's timer1 as a 16 bit timer but I have a few questions. 1. Do I


Timer/Sample rate

Started by Francisco Lobo in BasicX14 years ago 1 reply

Is there a way to determine a sample rate (how many times per second i have been runing this sub). or is there a way to set...

Is there a way to determine a sample rate (how many times per second i have been runing this sub). or is there a way to set watchdog/interrupt timer to go to a specific routine at certain intervals? --------------------------------------------- Francisco Lobo d


DeltaTime

Started by Francisco Lobo in BasicX14 years ago 1 reply

I am trying to determine DT every time i sample an ADC from an analog input.... This is what i am doing... TimerTemp =...

I am trying to determine DT every time i sample an ADC from an analog input.... This is what i am doing... TimerTemp = Timer ' We store the timer value in TimerTemp to not get fluctations in the following lines. DT = TimerTemp - LastTime ' We determine DT


Re: Timer() loses time

Started by Chris in BasicX13 years ago 8 replies

Neil, Frank is correct, I misspoke. Com3 will not interfere with the RTC. I was thinking of something else. Are you...

Neil, Frank is correct, I misspoke. Com3 will not interfere with the RTC. I was thinking of something else. Are you perhaps incrementing your Time variable with a "rounded" Timer result? Doing so would cause the loss of time you are seeing. Chris


how pass ADC contents to Timer/Counter

Started by antoniod_arienzo in BasicX10 years ago 1 reply

Hello, my new group!!! I write from Italy, so excuse my grammar mistake... I' ve already a nice question for you... How can I pass the contents...

Hello, my new group!!! I write from Italy, so excuse my grammar mistake... I' ve already a nice question for you... How can I pass the contents of ADC's registers (ADCH and ADCL in particular) to Timer/Counters' OCRs (Output Compare Registers) directly (not using RAM storage)?


Low Power Mode using timer1 interrupt On LCDX (BX-34)

Started by ssonderhoff in BasicX9 years ago

Does anyone know how this is done? I want to put the cpu into idle mode using an interrupt from the the compare function on timer 1. According to...

Does anyone know how this is done? I want to put the cpu into idle mode using an interrupt from the the compare function on timer 1. According to the Atmel documentation this should be possible and they specifically mention using the timer interrupt to wake up the processor. I can put the system to sleep having, as best as I can tell, set the appropriate registers, however the system fails to wake...


Bx-24 Remote control cars and a drag race timer

Started by hightechhousecall in BasicX10 years ago 1 reply

Hello world (sorry had to do that) The last time I used my bx24 was in 2003 I set up a program to read MPH with 2 phototransistors set 10'...

Hello world (sorry had to do that) The last time I used my bx24 was in 2003 I set up a program to read MPH with 2 phototransistors set 10' apart. worked fine we had fun, life goes on..... OK now I have been asked to make a Drag Race timer. So I have dusted off the old proto board and here we go. Standard 2 lane race 1/10th scale track is 132' long Cars are at around 60mph at the...


Extended Timer() function

Started by Tom Becker in BasicX8 years ago 1 reply

Here is an exploit of the Basic-X register.RTCTick implementation which permits using Timer(), usually limited to a 24-hour period, to measure...

Here is an exploit of the Basic-X register.RTCTick implementation which permits using Timer(), usually limited to a 24-hour period, to measure beyond 48-day periods. Basic-X keeps the time as a 512Hz tick count in a system Long, register.RTCTick. It normally resets the register.RTCTick count to zero when it detects a count representing 24 hours since boot (or midnight if the Basic-X clock is s...


timer

Started by jose_hinestrosa in BasicX13 years ago 11 replies

Hi, Im trying to turn on a fan every three minutes using the BX. Can somebody give an idea how to accomplish this? Thank...

Hi, Im trying to turn on a fan every three minutes using the BX. Can somebody give an idea how to accomplish this? Thank you.


Watchdog

Started by iprobertson in BasicX15 years ago 10 replies

Hi, Is there a way to detect that the watchdog timer has expired and the cpu has been reset? I'd like to be able to detect...

Hi, Is there a way to detect that the watchdog timer has expired and the cpu has been reset? I'd like to be able to detect that there has been a problem so that I can notify the user. Thanks


High resolution timers?

Started by arhodes19044 in BasicX12 years ago 11 replies

Is there an external timer commercially available and relatively inexpensive that is easy to interface to a BX-24? I am hoping to...

Is there an external timer commercially available and relatively inexpensive that is easy to interface to a BX-24? I am hoping to find something accurate to a few seconds a year and with better granularity than 1/512 of a second. Temperature compensation would be a great thing as well. Lithium watch battery backup would be great too!


Interrupts.

Started by Francisco Lobo in BasicX14 years ago 4 replies

Are there any plans to support or way's to do a software/timer interrupt calls? Like forcing a sub to run at a specified interval? ...

Are there any plans to support or way's to do a software/timer interrupt calls? Like forcing a sub to run at a specified interval? THanks Bye -- Este mensaje ha sido analizado con MailScanner y se considera que est? limpio.


9600 hz oscillator with the bx-24?

Started by spillikinaerospace in BasicX11 years ago 4 replies

Hello can anyone tell me what's the simplest way to make a 9600 hz oscillator with the bx24? the built-in timer apparently can't do it. maybe...

Hello can anyone tell me what's the simplest way to make a 9600 hz oscillator with the bx24? the built-in timer apparently can't do it. maybe i can manipulate com3 into doing it if i set it at 19200. but does the com3 protocol include a start bit? hmmmm.... thanx anyone, louie


Question about WaitForInterrupt()

Started by Don Kinzer in BasicX13 years ago 7 replies

When a task executes WaitForInterrupt() and then the interrupt occurs, the waiting task is activated next according to the docs. ...

When a task executes WaitForInterrupt() and then the interrupt occurs, the waiting task is activated next according to the docs. I'm guessing that it is possible for that task to be superseded on the very next timer tick (which could be immediately). If this is so, it seems


handling multiple interrupt sources?

Started by arhodes19044 in BasicX12 years ago 50 replies

I have gotten the basics done on the rally computer. I would like to have the timer generate an interrupt. I COULD do this the...

I have gotten the basics done on the rally computer. I would like to have the timer generate an interrupt. I COULD do this the crude way and have the PWM generator make something that ticks at about one Hz, or a simple multiple thereof. I could route the output of that to Pin 11 and trigger an interrupt. However, I am already using Pin 1