Re: ocounter2h - ooPIC Tech Support - Mar 5 23:20:06 2008
I didn't think so, but I can check. Can you post a code sample?
DLC
Kevin Nickels wrote:
> Does this impact the ocounter2h object? I've verified the square wave
> going in, but am getting consistent counts (regardless of the input
> frequency).
>
> --kn
>
> On Mar 4, 2008, at 11:58 PM, ooPIC Tech Support wrote:
>
>
>> Brian,
>>
>> Events are broken in the compiler for C1.1+. The firmware is fine,
>> but the compiler needs rev'd. The developer is working on it now.
>>
>> DLC
>>
>> Brian Lloyd wrote:
>>
>>> So, do we know what the status is on using events in C.1.1+? Turns
>>> out
>>> I need to use an event right now and don't want to tear my hair out
>>> trying to debug the un-debuggable. Did someone determine that
>>> behavior
>>> was always anomalous or only under certain conditions? I need to use
>>> oSerialPort and want to use an event based on the arrival of a
>>> character.
>>>
>
> --
> Kevin Nickels
>
>

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
Re: ocounter2h - Kevin Nickels - Mar 6 11:58:24 2008
On Mar 5, 2008, at 10:00 PM, ooPIC Tech Support wrote:
> I didn't think so, but I can check. Can you post a code sample?
>
Sure, here it is. I've done it with and without the delay, doesn't
seem to matter. The output is a conditioned hall-effect sensor, at
about -0.5VDC and 5VDC.
The A2D and motor run just fine. BTW, this is on an OOBOT-40
controller.
--kn
Dim LCD As New oLCDSE
Dim A2D As New oA2D
Dim A As New oDCMotor2
Dim T As New oCounter2H
Dim Ynm1 As New oWord
Dim speed As New oWord
Sub Main()
' set up lcd and A2D
LCD.IOLine = 8
LCD.Operate = cvTrue
LCD.Clear
A2D.IOLine = 1
A2D.Operate = cvTrue
' set up motor A.
A.IOLineP = 18 ' PWM1 to U3 enable 1.
A.IOLine1 = 24 ' U3 In1.
A.IOLine2 = 25 ' U3 In2.
A.Operate = 1
A.Brake = cvOff
' set up timer
T.Operate = 1
T.PreScale = 0
T.Operate = cvTrue
Do
LCD.Locate(0,0)
' LCD.String = "Pot = " + Str$(A2D.Value) + " "
A = A2D.Value - 127
LCD.String = Str$(T.Count) + " - " + Str$(Ynm2)
speed = T.Count - Ynm1
Ynm1 = T.Count
LCD.Locate(1,0)
LCD.String = "Speed = " + Str$(speed)
' ooPIC.Delay = 2
Loop
End Sub
--
Kevin Nickels
[Non-text portions of this message have been removed]

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