I want to have full control of a timer that can do pulse width measurement.
Such as the timer 1/3/5 in 28X2 / 40X2
See http://ww1.microchip.com/downloads/en/DeviceDoc/41412F.pdf
page 163 : " 12.0 TIMER1/3/5 MODULE WITH GATE CONTROL "
I guess PICAXE timer 3 is PIC timer 3, right?
Is any other PICAXE functionality dependant on timer3?
Generally it would be interesting to know what timers are available!
There are 3 more timers in PIC used for 28X2 and 40X2 than in 20x2.
So i guess timer 4,5,6 are not used by PICAXE.
Can i freely set them up or are they blocked by something?
Is there some other hardware in 28X2, 40X2 not controlled by PICAXE that we can utilise if needed?
I am guessing CAPTURE/COMPARE/PWM MODULES for timer 3 and 5 ?
Anything else?
There are quite a lot onboard the PICs - let us use it
(Trying to use PICAXE for a lot of projects hoping not needing to switch language)
______ What I want to do right now:
Decode a standard radio control pulse stream;
One long pulse for sync, then eight pulses one for each servo 1..2 ms long, with a quarter ms or so between, total cycle time about 20ms.
Given: The PIC chips timer 1/3/5 have hardware to measure pulsewidth standalone
I hope PICAXE do not get in the way.
Requirement: I want to use a PICAXE 40X2, and at the same time have servo outputs enabled thus timer 1 is reserved for servo.
I already have a program framework (in development) to execute a bunch of small routines in round robin coopreative multitasking loops of different speed and priority.
Idea, course algorithm:
1) Configure timer, stop it, clear.
2) wait *a) for low level *c), then enables timer to count while input is high.
3) wait *a) for timer to stop *c) (TMR3GIF bit)
4) read timer, evaluate *b),
go to 1
*a) some frequently executed task, or loop in place, or PICAXE interrupt
*b) is it within range? is it a sync pulse?
*c) optionally also check sanity against a timeout timer to detect noise and missing signal conditions
Such as the timer 1/3/5 in 28X2 / 40X2
See http://ww1.microchip.com/downloads/en/DeviceDoc/41412F.pdf
page 163 : " 12.0 TIMER1/3/5 MODULE WITH GATE CONTROL "
I guess PICAXE timer 3 is PIC timer 3, right?
Is any other PICAXE functionality dependant on timer3?
Generally it would be interesting to know what timers are available!
There are 3 more timers in PIC used for 28X2 and 40X2 than in 20x2.
So i guess timer 4,5,6 are not used by PICAXE.
Can i freely set them up or are they blocked by something?
Is there some other hardware in 28X2, 40X2 not controlled by PICAXE that we can utilise if needed?
I am guessing CAPTURE/COMPARE/PWM MODULES for timer 3 and 5 ?
Anything else?
There are quite a lot onboard the PICs - let us use it
(Trying to use PICAXE for a lot of projects hoping not needing to switch language)
______ What I want to do right now:
Decode a standard radio control pulse stream;
One long pulse for sync, then eight pulses one for each servo 1..2 ms long, with a quarter ms or so between, total cycle time about 20ms.
Given: The PIC chips timer 1/3/5 have hardware to measure pulsewidth standalone
I hope PICAXE do not get in the way.
Requirement: I want to use a PICAXE 40X2, and at the same time have servo outputs enabled thus timer 1 is reserved for servo.
I already have a program framework (in development) to execute a bunch of small routines in round robin coopreative multitasking loops of different speed and priority.
Idea, course algorithm:
1) Configure timer, stop it, clear.
2) wait *a) for low level *c), then enables timer to count while input is high.
3) wait *a) for timer to stop *c) (TMR3GIF bit)
4) read timer, evaluate *b),
go to 1
*a) some frequently executed task, or loop in place, or PICAXE interrupt
*b) is it within range? is it a sync pulse?
*c) optionally also check sanity against a timeout timer to detect noise and missing signal conditions