This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Saturday, June 7, 2008

[oopic] Re: oopic oSPIL and a 74165

--- In oopic@yahoogroups.com, "rtstofer" <rstofer@...> wrote:
>
> --- In oopic@yahoogroups.com, David Warner <bimityedye@> wrote:
> >
> > Richard
> > Here's my current code - I've got good signals for Load and
> ClkInhibit but absolutely 0 for Clk&nbsp;coming from the OOPIC and
0
> info from the 74165 (probably because no CLK from OOPIC). Now I've
> loaded some oSPIL programs from the Examples directory and they all
> have good signals for the CLK from the OOPIC. Am I using the wrong
> syntax for reading the oSPIL object? What&nbsp;could be my
stumbling
> block?
> > Regards
> > Dave W
>
> This code works for me! The clock pulses are a little over 20 uS
> wide repeating every 80 uS. It takes a little over 600 uS to shift
a
> byte. Bytes are being shifted every 15 mS, more or less.
>
> Dim C165 As oSPIL
> Dim Load As oDIO1
> Dim Info As oByte
> Dim ClkInhibit As oDIO1
>
> Sub main()
>
> ooPIC.Delay = 5000
> Call setup
> Do
> Load.Value = 0
> Load.Value = 1
>
> ClkInhibit.Value = 0
> Info.Data = C165.Value
> ClkInhibit = 1
>
> Loop
>
> End Sub
>
> Sub setup()
>
> C165.IOLineC = 9
> C165.IOLineI = 10
> C165.Rate = 0
> C165.Width = cv8Bit
> C165.Mode = 0
> C165.Operate = cvOn
>
> ClkInhibit.IOLine = 12
> ClkInhibit.Direction = cvOutput
> ClkInhibit.Value = 1
>
> Load.IOLine = 14
> Load.Direction = cvOutput
> Load.Value = 1
>
> End Sub
>
> Richard
>

I should have said the code works on a scope. It don't have a '165
and I am using a B.2.2+ chip.

Richard

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/oopic/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/oopic/join

(Yahoo! ID required)

<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/

No comments: