Thursday, June 5, 2008

[oopic] oopic oSPIL and a 74165

AAAAARRRRGGGG!!! I'm pulling my hair out!! I'm trying to access a
74hc165 using an oSPIL object, but to no avail. Nothing I do seems to
work. Does anyone have the magic code to make this work? I can bit
bang it well enough, but I should be able to do this with an oSPIL.
Anybody? A mind is a terrible thing. Help! oopic III+ ver 6 compiler
curent code -

Dim C165 As oSPIL
Dim Load As oDIO1
Dim Data As oByte
Dim Screen As oLCDSE


'*******************
Sub main()

Call setup

Screen.Clear

Load = 0 'Pulse Load line to input parallel
Load = 1 'data
ooPIC.Delay = 5000

Data.Value = C165.Value 'Read 74165

Screen.VString = "***********"
ooPIC.Delay = 5000
Screen.Locate(1,0)
Screen.Value = Data.Value

End Sub'Main
'********************
Sub setup()

C165.IOLineC = 8 'Use as Clock input to '165 pin 2
C165.IOLineI = 10 'Use as Data line from '165 pin 9
C165.IOLineE = 12 'Use as Clock Inhibit to '165 pin 15
C165.InvertE = cvTrue
C165.Rate = 0
C165.Width = 0
C165.Mode = 0
C165.Direction = 0
C165.Operate = cvTrue

Load.IOLine = 14 'Use as Load line to '165 pin 1
Load.High

Screen.IOLine = 16
Screen.Clear
Screen.Locate(0,0)


Dave W.


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

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:

Post a Comment