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.

Sunday, June 8, 2008

Re: [oopic] Re: oopic oSPIL and a 74165 - I Got It To WORK!

Richard YOU ARE A GENIUS!  I added the full complement of signals for the oSPIL and THAT did the trick!  I also dropped the ClkInhibit line and tied that off to Ground. Now when I switch my data lines around I get a different reading (correct) every time. Thanks so much for hangin' in with me even when I gave up! I've gotta scrounge a 'scope from somewhere. WHOO_HOO I can move on. Thanks again man.
 
Dave W.

--- On Sun, 6/8/08, rtstofer <rstofer@pacbell.net> wrote:

From: rtstofer <rstofer@pacbell.net>
Subject: [oopic] Re: oopic oSPIL and a 74165 - I Got It To WORK!
To: oopic@yahoogroups.com
Date: Sunday, June 8, 2008, 4:15 PM


I didn't have a '165 so I built one from a CPLD and a little VHDL
code based on the logic diagram from TI. It works...

The thing is, you have to define IOLines for all of the oSPIL signals
whether you use them or not. In other words, you need to add in setup
():

C165.IOLineO = 11
C165.IOLineE = 12

I added a serial port to the code so I could see the result:

Dim C165 As oSPIL
Dim Load As oDIO1
Dim Info As oByte
Dim Serial As New oSerialPort

Sub main()
ooPIC.Delay = 5000
Call setup
Serial.String = "Hello"

Do
Load.Value = 0
Load.Value = 1

Info.Data = C165.Value
Serial.String = Str$(Info.Data)
Serial = 13
Serial = 10

Loop

End Sub

Sub setup()

C165.IOLineC = 9
C165.IOLineI = 10
C165.IOLineO = 11
C165.IOLineE = 12
C165.Rate = 0
C165.Width = cv8Bit
C165.Mode = 0
C165.Operate = cvOn

Load.IOLine = 14
Load.Direction = cvOutput
Load.Value = 1

Serial.Baud = cv9600
Serial.Operate = cvTrue

End Sub

I couldn't get the Comm window in V6 to work reliably. Then again,
Hyperterminal doesn't always connect either. I looked at the serial
transmit pin to verify I was sending stuff and them kept kicking at
Hyperterminal until it worked. What a piece of crap!

So, lesson learned: just because the 'scope makes it look like the
object is working doesn't mean it actually receives anything.
Sometimes you just have to connect to real hardware.

Lesson reinforced: CPLDs are a lot of fun.

Richard


[Non-text portions of this message have been removed]


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

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: