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 1, 2008

[oopic] Re: iogroup nibble and odio1

--- In oopic@yahoogroups.com, David Warner <bimityedye@...> wrote:
>
>
>
> --- On Sun, 6/1/08, rtstofer rstofer@... wrote:
>
> From: rtstofer rstofer@...
> Subject: [oopic] Re: iogroup nibble and odio1
> To: oopic@yahoogroups.com
> Date: Sunday, June 1, 2008, 3:13 PM
>
>
>
>
>
>
> --- In oopic@yahoogroups. com, "bimityedye" &lt;bimityedye@ ...&gt;
wrote:
> &gt;
> &gt; Hi Guys (if your still out there)
> &gt;
> &gt; I've got a question about using an oDio4 object. I'm using
an 'R' board
> &gt; ver 2.2+ and Ver 5 compiler for this. I've dimmed an oDio4 to
use IO
> &gt; group =1 nibble 0 (io's 8-11) and I want to use io12 for a
oDio1
> &gt; control, but I can't get the oDio1 to change it's state. If I
use the
> &gt; lower nibble of IOGroup 1 does that lock me out from using
the 'unused'
> &gt; pins of that group for anything else? Anybody?
> &gt;
> &gt; Dave W
> &gt;
>
> Why don't you strip your code to the absolute minimum required to
> demonstrate the problem and post it with your query? There shouldn't
> be more than a dozen lines of code.
>
> It is easy to cut and paste the code to the IDE and test it. Writing
> a new program to demonstrate somebody else's problem is a waste of
> time. It won't be the same program.
>
> Richard
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

Here's my code Richard. What am I doing wrong?


'This program uses an
'8243 4-bit IO Expander with
'the OOPIC PIC microcontroller

'1. Put Control Nibble on Data Pack
'2. Bring Prog line low
'3. Put Data Nibble on line
'4. Bring Prog line High

'*****************************
'Declarations

Dim Data As New oDio4

Dim PROG As New oDIO1

'End Declarations
'*****************************
Sub Main()
prog.value=1
data.value=15


End Sub'Main
'******************************
Sub Setup()

data.iogroup=1 'lines 8-15
Data.nibble=0 'lines 8-11
Data.Direction=cvOutput
Data=0

PROG.IOLine=12
prog.direction=cvoutput
PROG.value=1

'INITIALIZE PORTS TO ALL OUTPUTS AND 'ZERO' THEM OUT

Data.value=&H4 'PUT 'WRITE TO PORT 4' COMMAND ON DATA LINES
PROG.value=0 'BRING PROG LOW TO ENTER COMMAND
Data.value=15 'PUT '0' ON DATA LINES
PROG.value=1 'BRING PROG HIGH TO WRITE '0' TO PORT

Data=&H5 'PUT 'WRITE TO PORT 5' COMMAND ON DATA LINES
PROG=0 'BRING PROG LOW TO ENTER COMMAND
Data=0 'PUT '0' ON DATA LINES
PROG=1 'BRING PROG HIGH TO WRITE '0' TO PORT

Data=&H6 'PUT 'WRITE TO PORT 6' ON DATA LINES
PROG=0 'BRING PROG LOW TO ENTER COMMAND
Data=0 'PUT '0' ON DATA LINES
PROG=1 'BRING PROG HIGH TO WRITE '0' TO PORT

Data=&H7 'PUT 'WRITE TO PORT 7' ON DATA LINES
PROG=0 'BRING PROG LOW TO ENTER COMMAND
Data=0 'PUT '0' ON DATA LINES
PROG=1 'BRING PROG HIGH TO WRITE '0' TO PORT

End Sub'Setup
'*****************************

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

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: