Sign in

username:

password:



Not a member?

Search oopic



Search tips

Subscribe to oopic



Ads

Discussion Groups

Discussion Groups | | iogroup nibble and odio1

iogroup nibble and odio1 - bimityedye - Jun 1 2:59:35 2008

Hi Guys (if your still out there)

I've got a question about using an oDio4 object. I'm using an 'R' board
ver 2.2+ and Ver 5 compiler for this. I've dimmed an oDio4 to use IO
group =1 nibble 0 (io's 8-11) and I want to use io12 for a oDio1
control, but I can't get the oDio1 to change it's state. If I use the
lower nibble of IOGroup 1 does that lock me out from using the 'unused'
pins of that group for anything else? Anybody?

Dave W
------------------------------------



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


Re: iogroup nibble and odio1 - rtstofer - Jun 1 11:13:55 2008

--- In o...@yahoogroups.com, "bimityedye" wrote:
>
> Hi Guys (if your still out there)
>
> I've got a question about using an oDio4 object. I'm using an 'R' board
> ver 2.2+ and Ver 5 compiler for this. I've dimmed an oDio4 to use IO
> group =1 nibble 0 (io's 8-11) and I want to use io12 for a oDio1
> control, but I can't get the oDio1 to change it's state. If I use the
> lower nibble of IOGroup 1 does that lock me out from using the 'unused'
> pins of that group for anything else? Anybody?
>
> Dave W
>

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

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



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

Re: Re: iogroup nibble and odio1 - David Warner - Jun 1 11:51:06 2008



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

From: rtstofer <r...@pacbell.net>
Subject: [oopic] Re: iogroup nibble and odio1
To: o...@yahoogroups.com
Date: Sunday, June 1, 2008, 3:13 PM

--- In oopic@yahoogroups. com, "bimityedye" <bimityedye@ ...> wrote:
>
> Hi Guys (if your still out there)
>
> I've got a question about using an oDio4 object. I'm using an 'R' board
> ver 2.2+ and Ver 5 compiler for this. I've dimmed an oDio4 to use IO
> group =1 nibble 0 (io's 8-11) and I want to use io12 for a oDio1
> control, but I can't get the oDio1 to change it's state. If I use the
> lower nibble of IOGroup 1 does that lock me out from using the 'unused'
> pins of that group for anything else? Anybody?
>
> Dave W
>

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]
------------------------------------



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

Re: iogroup nibble and odio1 - bimityedye - Jun 1 11:56:06 2008

--- In o...@yahoogroups.com, David Warner wrote:
>
> --- On Sun, 6/1/08, rtstofer rstofer@... wrote:
>
> From: rtstofer rstofer@...
> Subject: [oopic] Re: iogroup nibble and odio1
> To: o...@yahoogroups.com
> Date: Sunday, June 1, 2008, 3:13 PM
> --- In oopic@yahoogroups. com, "bimityedye" <bimityedye@ ...>
wrote:
> >
> > Hi Guys (if your still out there)
> >
> > I've got a question about using an oDio4 object. I'm using
an 'R' board
> > ver 2.2+ and Ver 5 compiler for this. I've dimmed an oDio4 to
use IO
> > group =1 nibble 0 (io's 8-11) and I want to use io12 for a
oDio1
> > control, but I can't get the oDio1 to change it's state. If I
use the
> > lower nibble of IOGroup 1 does that lock me out from using
the 'unused'
> > pins of that group for anything else? Anybody?
> >
> > Dave W
> >
>
> 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
'*****************************

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



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

Re: iogroup nibble and odio1 - rtstofer - Jun 1 12:57:40 2008

Maybe the part where sub main() didn't call sub setup()?

Richard

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



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

Re: iogroup nibble and odio1 - bimityedye - Jun 1 13:34:07 2008

--- In o...@yahoogroups.com, "rtstofer" wrote:
>
> Maybe the part where sub main() didn't call sub setup()?
>
> Richard
>
OOOOOOH You are SOOOOO good!!! I get focused on the hard parts and
forget the easy ones! Thanks man for catchin' that.

Dave W.
------------------------------------



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