From owner-tigers-beastsign@router.xnet2.com Wed Jun 14 08:34:59 2006
Received: from router.xnet2.com (localhost.localdomain [127.0.0.1])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5EDYxLd012453;
	Wed, 14 Jun 2006 08:34:59 -0500
Received: (from majordom@localhost)
	by router.xnet2.com (8.13.4/8.13.4/Submit) id k5EDYxaN012452;
	Wed, 14 Jun 2006 08:34:59 -0500
X-Authentication-Warning: router.xnet2.com: majordom set sender to owner-tigers@xnet2.com using -f
Received: from mail10.atl.registeredsite.com (mail10.atl.registeredsite.com [64.224.219.84])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5EDYqWU012436
	for <tigers@xnet2.com>; Wed, 14 Jun 2006 08:34:52 -0500
Received: from kgsystems.net ([66.223.126.72])
	by mail10.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id k5EDYnQ0030373
	for <tigers@xnet2.com>; Wed, 14 Jun 2006 09:34:49 -0400
Received: from pickering.cc.nd.edu (pickering.cc.nd.edu [129.74.250.225])
	by kgsystems.net (8.11.6/8.11.0) with ESMTP id k5EDYmo41575
	for <tigers@industrialcontroller.com>; Wed, 14 Jun 2006 13:34:49 GMT
	(envelope-from jkaiser@nd.edu)
Received: from [129.74.142.161] (emperor.phys.nd.edu [129.74.142.161])
	(authenticated bits=0)
	by pickering.cc.nd.edu (Switch-3.1.7/Switch-3.1.7) with ESMTP id k5EDYkf1024443
	(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO)
	for <tigers@industrialcontroller.com>; Wed, 14 Jun 2006 09:34:46 -0400 (EDT)
Message-ID: <44901070.50404@nd.edu>
Date: Wed, 14 Jun 2006 09:34:40 -0400
From: James Kaiser <jkaiser@nd.edu>
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
MIME-Version: 1.0
To: tigers@industrialcontroller.com
Subject: How to get DIP switches and EP2-64SDA to work together?
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-ND-MTA-Date: Wed, 14 Jun 2006 09:34:48 EDT
X-ND-Virus-Scan: engine v4.4.00; dat v4783
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Status: Clean
Sender: owner-tigers@xnet2.com
Precedence: bulk
Reply-To: tigers@industrialcontroller.com

Hello Tiger-Tamers,
   I have a Basic-Tiger running on a Basic-Tiger prototyping board. The 
board is connected to another board with an EP2-64SDA module. I am using 
the keyboard inputs to scan discrete switches and want to use the EP2 to 
set parameters into my system. I can get the switch scans to work. I can 
also get the EP2 to work. I can't get them to work together.
  The program I'm using as a test is shown below. It's a simple program 
that reads 4 rows of "DIP switches" and shows the results on the LCD 
display and also puts the results into the first 4 ports of the EP2. By 
trial and error, I've found that if I remove the "USER_EPORT PHYSOFFS, 
0F0h" statement, the switches are read and displayed correctly. As soon 
as I insert the statement back, the switches are not correctly read any 
more. Somehow, this statement is affecting the reading of the switches 
through the LCD1.TDD driver. I need this statement to make the EP2 work 
correctly. The starting hardware address of the EP2 is 0. (The "OUT" 
commands are temporarily commented out below but they do work if I 
forceably set the DIP parameter just prior to the "OUT" command as a 
test.) Can anyone please help? I've been digging through manuals and 
trying all combinations I can think of for two days and I've gotten 
nowhere. What am I missing?

Thanks a lot,

Jim Kaiser
University of Notre Dame
-------------------------------------------------------------------------------------------------------------------- 


'---------------------------------------------------------------------
' Name: DIPITYDO.TIG
'---------------------------------------------------------------------
#INCLUDE DEFINE_A.INC            'general defines
USER_EPORT PHYSOFFS, 0F0h        'offset to physical address. -10h (-16dec)
USER_EPORT NROFOUT, 8            ' 8 expanded output ports
USER_EPORT LASTLADR, 017h        ' 17h is last output port
USER_EPORT INITIAL, 0, "&        ' initialize all ports to all 0's
00 00 00 00 00 00 00 00"%

TASK MAIN                               ' begin task MAIN
 BYTE DIP                              ' var of type BYTE
' install LCD-driver (BASIC-Tiger)
 INSTALL DEVICE #1, "LCD1.TDD"
' install LCD-driver (TINY-Tiger)
' INSTALL DEVICE #1, "LCD1.TDD", 0, 0, 0, 0, 0, 0, 80h, 8

 PUT #1,&
 "<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"


 LOOP 9999999                          ' many loops

   GET #1, #1, 1, DIP                  ' read DIP-switch in row 0
   PRINT #1, "<1>DIP-switch 1:"; DIP   ' output to LC-display
 '  OUT 10h,255,DIP            ' output DIP to port

 '  GET #25, #2, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 2:"; DIP      ' output to LC-display
'  OUT 11h,255,DIP            ' output DIP to port

 '  GET #26, #3, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 3:"; DIP      ' output to LC-display
'   OUT 12h,255,DIP            ' output DIP to port

 '  GET #27, #4, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 4:"; DIP      ' output to LC-display
'   OUT 13h,255,DIP            ' output DIP to port

    WAIT DURATION 300                   ' wait 300 ms
ENDLOOP                               '
END                                     ' end task MAIN

-- 
James W. Kaiser
University of Notre Dame
Physics Department
225 Nieuwland Science Center
Notre Dame, IN 46556
(574)631-6808


===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com

From owner-tigers-beastsign@router.xnet2.com Wed Jun 14 12:31:59 2006
Received: from router.xnet2.com (localhost.localdomain [127.0.0.1])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5EHVxMA007790;
	Wed, 14 Jun 2006 12:31:59 -0500
Received: (from majordom@localhost)
	by router.xnet2.com (8.13.4/8.13.4/Submit) id k5EHVxXt007789;
	Wed, 14 Jun 2006 12:31:59 -0500
X-Authentication-Warning: router.xnet2.com: majordom set sender to owner-tigers@xnet2.com using -f
Received: from mail8.atl.registeredsite.com (mail8.atl.registeredsite.com [64.224.219.82])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5EHVsPu007781
	for <tigers@xnet2.com>; Wed, 14 Jun 2006 12:31:58 -0500
Received: from kgsystems.net ([66.223.126.72])
	by mail8.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id k5EHVnmc015514
	for <tigers@xnet2.com>; Wed, 14 Jun 2006 13:31:49 -0400
Received: from smtp.sinfonika.si (smtp.sinfonika.si [212.93.226.7])
	by kgsystems.net (8.11.6/8.11.0) with ESMTP id k5EHVlo13023
	for <tigers@industrialcontroller.com>; Wed, 14 Jun 2006 17:31:48 GMT
	(envelope-from tevz.grogl@genera-lynx.com)
Received: from kasimdzanov (home.genera-lynx.com [212.93.231.130])
	by smtp.sinfonika.si (Postfix) with ESMTP id A32C61C8A8
	for <tigers@industrialcontroller.com>; Wed, 14 Jun 2006 19:35:49 +0200 (CEST)
From: =?iso-8859-2?B?VGV2viBHcvZnbA==?= <tevz.grogl@genera-lynx.com>
To: <tigers@industrialcontroller.com>
Subject: RE: How to get DIP switches and EP2-64SDA to work together?
Date: Wed, 14 Jun 2006 19:31:44 +0200
Message-ID: <000001c68fd8$67f42800$0600a8c0@kasimdzanov>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-2"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6626
Importance: Normal
In-Reply-To: <44901070.50404@nd.edu>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Status: Clean
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by router.xnet2.com id k5EHVwPu007787
Sender: owner-tigers@xnet2.com
Precedence: bulk
Reply-To: tigers@industrialcontroller.com

Hi Jim,
First of all sorry for my pour English since I come from Slovenia and I
don't practice speaking it every day :)
During my programming I also ran into some problems with the drivers. I
think the important thing is to separate ALL your devices. If you use
"DEFINE_A.INC" it is advisable to use the constants defined in that file. So
instead of:
INSTALL_DEVICE #1, "LCD1.TDD"
It would be much better to use
INSTALL_DEVICE #LCD, "LCD1.TDD"
And also 
PRINT #LCD, "<1>DIP-switch 1:"
Instead of
PRINT #1, "<1>DIP-switch 1:"
That way you can't confuse the devices.

If you don't like those constants you can of course create your own:
#DEFINE MY_DEVICE    111  'Some device
INSTALL_DEVICE #MY_DEVICE, "...."

In my example I have the keyboard separated from the LCD.
install_device #LCD,"LCD-6963.TDD",0,0,0EEH,1,100,18H
install_device #KEYB, "LCD1.tdd", 0, 0, 0, 0, 0, 0, 80h, 8'0eeh
(I'm using TINY-Tiger)

I also noticed that you don't have the underline in the "install_device"
command. Compiler doesn't care obviously. But I'm not sure if it actually
installs that device.

And the last thing - parameters for your devices. You have to set them
properly in order to get your devices work right.

Well for now that's all I can think of. Feel free to contact me If you will
run into some more problems. And if you find the cause for your problem let
me know!

Best regards!

Tevz Grögl

GENERA LYNX
Trzaska cesta 132
1000 Ljubljana
Slovenia
tel: 00386 1 24 25 766 
www.genera-lynx.com 
  



-----Original Message-----
From: owner-tigers@xnet2.com [mailto:owner-tigers@xnet2.com] On Behalf Of
James Kaiser
Sent: Wednesday, June 14, 2006 3:35 PM
To: tigers@industrialcontroller.com
Subject: How to get DIP switches and EP2-64SDA to work together?

Hello Tiger-Tamers,
   I have a Basic-Tiger running on a Basic-Tiger prototyping board. The 
board is connected to another board with an EP2-64SDA module. I am using 
the keyboard inputs to scan discrete switches and want to use the EP2 to 
set parameters into my system. I can get the switch scans to work. I can 
also get the EP2 to work. I can't get them to work together.
  The program I'm using as a test is shown below. It's a simple program 
that reads 4 rows of "DIP switches" and shows the results on the LCD 
display and also puts the results into the first 4 ports of the EP2. By 
trial and error, I've found that if I remove the "USER_EPORT PHYSOFFS, 
0F0h" statement, the switches are read and displayed correctly. As soon 
as I insert the statement back, the switches are not correctly read any 
more. Somehow, this statement is affecting the reading of the switches 
through the LCD1.TDD driver. I need this statement to make the EP2 work 
correctly. The starting hardware address of the EP2 is 0. (The "OUT" 
commands are temporarily commented out below but they do work if I 
forceably set the DIP parameter just prior to the "OUT" command as a 
test.) Can anyone please help? I've been digging through manuals and 
trying all combinations I can think of for two days and I've gotten 
nowhere. What am I missing?

Thanks a lot,

Jim Kaiser
University of Notre Dame
----------------------------------------------------------------------------
---------------------------------------- 


'---------------------------------------------------------------------
' Name: DIPITYDO.TIG
'---------------------------------------------------------------------
#INCLUDE DEFINE_A.INC            'general defines
USER_EPORT PHYSOFFS, 0F0h        'offset to physical address. -10h (-16dec)
USER_EPORT NROFOUT, 8            ' 8 expanded output ports
USER_EPORT LASTLADR, 017h        ' 17h is last output port
USER_EPORT INITIAL, 0, "&        ' initialize all ports to all 0's
00 00 00 00 00 00 00 00"%

TASK MAIN                               ' begin task MAIN
 BYTE DIP                              ' var of type BYTE
' install LCD-driver (BASIC-Tiger)
 INSTALL DEVICE #1, "LCD1.TDD"
' install LCD-driver (TINY-Tiger)
' INSTALL DEVICE #1, "LCD1.TDD", 0, 0, 0, 0, 0, 0, 80h, 8

 PUT #1,&
 "<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"


 LOOP 9999999                          ' many loops

   GET #1, #1, 1, DIP                  ' read DIP-switch in row 0
   PRINT #1, "<1>DIP-switch 1:"; DIP   ' output to LC-display
 '  OUT 10h,255,DIP            ' output DIP to port

 '  GET #25, #2, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 2:"; DIP      ' output to LC-display
'  OUT 11h,255,DIP            ' output DIP to port

 '  GET #26, #3, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 3:"; DIP      ' output to LC-display
'   OUT 12h,255,DIP            ' output DIP to port

 '  GET #27, #4, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 4:"; DIP      ' output to LC-display
'   OUT 13h,255,DIP            ' output DIP to port

    WAIT DURATION 300                   ' wait 300 ms
ENDLOOP                               '
END                                     ' end task MAIN

-- 
James W. Kaiser
University of Notre Dame
Physics Department
225 Nieuwland Science Center
Notre Dame, IN 46556
(574)631-6808


===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or
TigerSales@IndustrialController.Com



===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com

From owner-tigers-beastsign@router.xnet2.com Wed Jun 14 13:34:43 2006
Received: from router.xnet2.com (localhost.localdomain [127.0.0.1])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5EIYhGS013666;
	Wed, 14 Jun 2006 13:34:43 -0500
Received: (from majordom@localhost)
	by router.xnet2.com (8.13.4/8.13.4/Submit) id k5EIYhgD013665;
	Wed, 14 Jun 2006 13:34:43 -0500
X-Authentication-Warning: router.xnet2.com: majordom set sender to owner-tigers@xnet2.com using -f
Received: from mail7.atl.registeredsite.com (mail7.atl.registeredsite.com [64.224.219.81])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5EIYeN3013653
	for <tigers@xnet2.com>; Wed, 14 Jun 2006 13:34:42 -0500
Received: from kgsystems.net ([66.223.126.72])
	by mail7.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id k5EIYbv2002721
	for <tigers@xnet2.com>; Wed, 14 Jun 2006 14:34:37 -0400
Received: from pickering.cc.nd.edu (pickering.cc.nd.edu [129.74.250.225])
	by kgsystems.net (8.11.6/8.11.0) with ESMTP id k5EIYZo30885
	for <tigers@industrialcontroller.com>; Wed, 14 Jun 2006 18:34:35 GMT
	(envelope-from jkaiser@nd.edu)
Received: from [129.74.142.161] (emperor.phys.nd.edu [129.74.142.161])
	(authenticated bits=0)
	by pickering.cc.nd.edu (Switch-3.1.7/Switch-3.1.7) with ESMTP id k5EIYVuc027582
	(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO)
	for <tigers@industrialcontroller.com>; Wed, 14 Jun 2006 14:34:32 -0400 (EDT)
Message-ID: <449056B1.9080306@nd.edu>
Date: Wed, 14 Jun 2006 14:34:25 -0400
From: James Kaiser <jkaiser@nd.edu>
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
MIME-Version: 1.0
To: tigers@industrialcontroller.com
Subject: Re: How to get DIP switches and EP2-64SDA to work together?
References: <000001c68fd8$67f42800$0600a8c0@kasimdzanov>
In-Reply-To: <000001c68fd8$67f42800$0600a8c0@kasimdzanov>
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 8bit
X-ND-MTA-Date: Wed, 14 Jun 2006 14:34:34 EDT
X-ND-Virus-Scan: engine v4.4.00; dat v4784
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Status: Clean
Sender: owner-tigers@xnet2.com
Precedence: bulk
Reply-To: tigers@industrialcontroller.com


Tevz,
   Thanks for your quick reply. Congratulations, your English is 
excellent! Better than some native English speakers
that I know! I had no trouble understanding you.
  I intend to use all named constants eventually. This is just a short 
test program to check out basic operation
before I begin writing the full program, so I didn't worry too much 
about style. The definition for LCD in DEFINE_A.INC
is 1, so that shouldn't matter. I see you're using different drivers for 
keyboard and lcd. That gives me an idea - the book says
I can load more than one copy of LCD1. Maybe that would help? In my 
software manual, the command is listed as INSTALL_DEVICE, but
my program began as the sample program for DIP switches and it has 
INSTALL DEVICE. Both seem to work the same.
   I've been looking harder at the keyboard decoding on the prototyping 
board, thinking that may be the source of the problem,
but so far no luck.
   How many people are on this list? The archives (which I searched 
first) stop about 1 1/2 years ago, so I wondered how active it is. This
is my first post.

Jim Kaiser
> Hi Jim,
> First of all sorry for my pour English since I come from Slovenia and I
> don't practice speaking it every day :)
> During my programming I also ran into some problems with the drivers. I
> think the important thing is to separate ALL your devices. If you use
> "DEFINE_A.INC" it is advisable to use the constants defined in that file. So
> instead of:
> INSTALL_DEVICE #1, "LCD1.TDD"
> It would be much better to use
> INSTALL_DEVICE #LCD, "LCD1.TDD"
> And also 
> PRINT #LCD, "<1>DIP-switch 1:"
> Instead of
> PRINT #1, "<1>DIP-switch 1:"
> That way you can't confuse the devices.
>
> If you don't like those constants you can of course create your own:
> #DEFINE MY_DEVICE    111  'Some device
> INSTALL_DEVICE #MY_DEVICE, "...."
>
> In my example I have the keyboard separated from the LCD.
> install_device #LCD,"LCD-6963.TDD",0,0,0EEH,1,100,18H
> install_device #KEYB, "LCD1.tdd", 0, 0, 0, 0, 0, 0, 80h, 8'0eeh
> (I'm using TINY-Tiger)
>
> I also noticed that you don't have the underline in the "install_device"
> command. Compiler doesn't care obviously. But I'm not sure if it actually
> installs that device.
>
> And the last thing - parameters for your devices. You have to set them
> properly in order to get your devices work right.
>
> Well for now that's all I can think of. Feel free to contact me If you will
> run into some more problems. And if you find the cause for your problem let
> me know!
>
> Best regards!
>
> Tevz Grögl
>
> GENERA LYNX
> Trzaska cesta 132
> 1000 Ljubljana
> Slovenia
> tel: 00386 1 24 25 766 
> www.genera-lynx.com 
>   
>
>
>
> -----Original Message-----
> From: owner-tigers@xnet2.com [mailto:owner-tigers@xnet2.com] On Behalf Of
> James Kaiser
> Sent: Wednesday, June 14, 2006 3:35 PM
> To: tigers@industrialcontroller.com
> Subject: How to get DIP switches and EP2-64SDA to work together?
>
> Hello Tiger-Tamers,
>    I have a Basic-Tiger running on a Basic-Tiger prototyping board. The 
> board is connected to another board with an EP2-64SDA module. I am using 
> the keyboard inputs to scan discrete switches and want to use the EP2 to 
> set parameters into my system. I can get the switch scans to work. I can 
> also get the EP2 to work. I can't get them to work together.
>   The program I'm using as a test is shown below. It's a simple program 
> that reads 4 rows of "DIP switches" and shows the results on the LCD 
> display and also puts the results into the first 4 ports of the EP2. By 
> trial and error, I've found that if I remove the "USER_EPORT PHYSOFFS, 
> 0F0h" statement, the switches are read and displayed correctly. As soon 
> as I insert the statement back, the switches are not correctly read any 
> more. Somehow, this statement is affecting the reading of the switches 
> through the LCD1.TDD driver. I need this statement to make the EP2 work 
> correctly. The starting hardware address of the EP2 is 0. (The "OUT" 
> commands are temporarily commented out below but they do work if I 
> forceably set the DIP parameter just prior to the "OUT" command as a 
> test.) Can anyone please help? I've been digging through manuals and 
> trying all combinations I can think of for two days and I've gotten 
> nowhere. What am I missing?
>
> Thanks a lot,
>
> Jim Kaiser
> University of Notre Dame
> ----------------------------------------------------------------------------
> ---------------------------------------- 
>
>
> '---------------------------------------------------------------------
> ' Name: DIPITYDO.TIG
> '---------------------------------------------------------------------
> #INCLUDE DEFINE_A.INC            'general defines
> USER_EPORT PHYSOFFS, 0F0h        'offset to physical address. -10h (-16dec)
> USER_EPORT NROFOUT, 8            ' 8 expanded output ports
> USER_EPORT LASTLADR, 017h        ' 17h is last output port
> USER_EPORT INITIAL, 0, "&        ' initialize all ports to all 0's
> 00 00 00 00 00 00 00 00"%
>
> TASK MAIN                               ' begin task MAIN
>  BYTE DIP                              ' var of type BYTE
> ' install LCD-driver (BASIC-Tiger)
>  INSTALL DEVICE #1, "LCD1.TDD"
> ' install LCD-driver (TINY-Tiger)
> ' INSTALL DEVICE #1, "LCD1.TDD", 0, 0, 0, 0, 0, 0, 80h, 8
>
>  PUT #1,&
>  "<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"
>
>
>  LOOP 9999999                          ' many loops
>
>    GET #1, #1, 1, DIP                  ' read DIP-switch in row 0
>    PRINT #1, "<1>DIP-switch 1:"; DIP   ' output to LC-display
>  '  OUT 10h,255,DIP            ' output DIP to port
>
>  '  GET #25, #2, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 2:"; DIP      ' output to LC-display
> '  OUT 11h,255,DIP            ' output DIP to port
>
>  '  GET #26, #3, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 3:"; DIP      ' output to LC-display
> '   OUT 12h,255,DIP            ' output DIP to port
>
>  '  GET #27, #4, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 4:"; DIP      ' output to LC-display
> '   OUT 13h,255,DIP            ' output DIP to port
>
>     WAIT DURATION 300                   ' wait 300 ms
> ENDLOOP                               '
> END                                     ' end task MAIN
>
>   

===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com

From owner-tigers-beastsign@router.xnet2.com Thu Jun 15 01:25:10 2006
Received: from router.xnet2.com (localhost.localdomain [127.0.0.1])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5F6PAf6013671;
	Thu, 15 Jun 2006 01:25:10 -0500
Received: (from majordom@localhost)
	by router.xnet2.com (8.13.4/8.13.4/Submit) id k5F6PA82013670;
	Thu, 15 Jun 2006 01:25:10 -0500
X-Authentication-Warning: router.xnet2.com: majordom set sender to owner-tigers@xnet2.com using -f
Received: from mail7.atl.registeredsite.com (mail7.atl.registeredsite.com [64.224.219.81])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5F6P8dX013664
	for <tigers@xnet2.com>; Thu, 15 Jun 2006 01:25:08 -0500
Received: from kgsystems.net ([66.223.126.72])
	by mail7.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id k5F6P0m0016489
	for <tigers@xnet2.com>; Thu, 15 Jun 2006 02:25:00 -0400
Received: from web33111.mail.mud.yahoo.com (web33111.mail.mud.yahoo.com [68.142.206.92])
	by kgsystems.net (8.11.6/8.11.0) with SMTP id k5F6Oxo38214
	for <tigers@industrialcontroller.com>; Thu, 15 Jun 2006 06:24:59 GMT
	(envelope-from alimozoun@yahoo.com)
Received: (qmail 98661 invoked by uid 60001); 15 Jun 2006 06:24:54 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
  s=s1024; d=yahoo.com;
  h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding;
  b=kvp4gMCFHztxwMF6qtf5Ptrotl21ndCP+KW1PTYlfYvalPZ1iC8s/K5dDFFceChgdfOAQcuEGWhGTa80HqTO3CdTxHs7ipknJrSXw5ErAh4iBdnt/mlZl6GkXhs0CNFYA55P9Gg2N7es1yT1FMwbTRqzxeHbet93RjQb9I3nv7g=  ;
Message-ID: <20060615062454.98659.qmail@web33111.mail.mud.yahoo.com>
Received: from [217.219.4.3] by web33111.mail.mud.yahoo.com via HTTP; Wed, 14 Jun 2006 23:24:54 PDT
Date: Wed, 14 Jun 2006 23:24:54 -0700 (PDT)
From: Ali Mozoun <alimozoun@YAHOO.COM>
Subject: Re: How to get DIP switches and EP2-64SDA to work together?
To: tigers@industrialcontroller.com
In-Reply-To: <449056B1.9080306@nd.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Status: Clean
Sender: owner-tigers@xnet2.com
Precedence: bulk
Reply-To: tigers@industrialcontroller.com


HI,

I am working on similar problem at the moment.
The problem is that the L35 pin is
shared for both keyboard and the EP input.
I am working on a solution and if I solve
the problem I will let you know. 

ALireza Mozoun
 
--- James Kaiser <jkaiser@nd.edu> wrote:

> 
> Tevz,
>    Thanks for your quick reply. Congratulations,
> your English is 
> excellent! Better than some native English speakers
> that I know! I had no trouble understanding you.
>   I intend to use all named constants eventually.
> This is just a short 
> test program to check out basic operation
> before I begin writing the full program, so I didn't
> worry too much 
> about style. The definition for LCD in DEFINE_A.INC
> is 1, so that shouldn't matter. I see you're using
> different drivers for 
> keyboard and lcd. That gives me an idea - the book
> says
> I can load more than one copy of LCD1. Maybe that
> would help? In my 
> software manual, the command is listed as
> INSTALL_DEVICE, but
> my program began as the sample program for DIP
> switches and it has 
> INSTALL DEVICE. Both seem to work the same.
>    I've been looking harder at the keyboard decoding
> on the prototyping 
> board, thinking that may be the source of the
> problem,
> but so far no luck.
>    How many people are on this list? The archives
> (which I searched 
> first) stop about 1 1/2 years ago, so I wondered how
> active it is. This
> is my first post.
> 
> Jim Kaiser
> > Hi Jim,
> > First of all sorry for my pour English since I
> come from Slovenia and I
> > don't practice speaking it every day :)
> > During my programming I also ran into some
> problems with the drivers. I
> > think the important thing is to separate ALL your
> devices. If you use
> > "DEFINE_A.INC" it is advisable to use the
> constants defined in that file. So
> > instead of:
> > INSTALL_DEVICE #1, "LCD1.TDD"
> > It would be much better to use
> > INSTALL_DEVICE #LCD, "LCD1.TDD"
> > And also 
> > PRINT #LCD, "<1>DIP-switch 1:"
> > Instead of
> > PRINT #1, "<1>DIP-switch 1:"
> > That way you can't confuse the devices.
> >
> > If you don't like those constants you can of
> course create your own:
> > #DEFINE MY_DEVICE    111  'Some device
> > INSTALL_DEVICE #MY_DEVICE, "...."
> >
> > In my example I have the keyboard separated from
> the LCD.
> > install_device
> #LCD,"LCD-6963.TDD",0,0,0EEH,1,100,18H
> > install_device #KEYB, "LCD1.tdd", 0, 0, 0, 0, 0,
> 0, 80h, 8'0eeh
> > (I'm using TINY-Tiger)
> >
> > I also noticed that you don't have the underline
> in the "install_device"
> > command. Compiler doesn't care obviously. But I'm
> not sure if it actually
> > installs that device.
> >
> > And the last thing - parameters for your devices.
> You have to set them
> > properly in order to get your devices work right.
> >
> > Well for now that's all I can think of. Feel free
> to contact me If you will
> > run into some more problems. And if you find the
> cause for your problem let
> > me know!
> >
> > Best regards!
> >
> > Tevz Grögl
> >
> > GENERA LYNX
> > Trzaska cesta 132
> > 1000 Ljubljana
> > Slovenia
> > tel: 00386 1 24 25 766 
> > www.genera-lynx.com 
> >   
> >
> >
> >
> > -----Original Message-----
> > From: owner-tigers@xnet2.com
> [mailto:owner-tigers@xnet2.com] On Behalf Of
> > James Kaiser
> > Sent: Wednesday, June 14, 2006 3:35 PM
> > To: tigers@industrialcontroller.com
> > Subject: How to get DIP switches and EP2-64SDA to
> work together?
> >
> > Hello Tiger-Tamers,
> >    I have a Basic-Tiger running on a Basic-Tiger
> prototyping board. The 
> > board is connected to another board with an
> EP2-64SDA module. I am using 
> > the keyboard inputs to scan discrete switches and
> want to use the EP2 to 
> > set parameters into my system. I can get the
> switch scans to work. I can 
> > also get the EP2 to work. I can't get them to work
> together.
> >   The program I'm using as a test is shown below.
> It's a simple program 
> > that reads 4 rows of "DIP switches" and shows the
> results on the LCD 
> > display and also puts the results into the first 4
> ports of the EP2. By 
> > trial and error, I've found that if I remove the
> "USER_EPORT PHYSOFFS, 
> > 0F0h" statement, the switches are read and
> displayed correctly. As soon 
> > as I insert the statement back, the switches are
> not correctly read any 
> > more. Somehow, this statement is affecting the
> reading of the switches 
> > through the LCD1.TDD driver. I need this statement
> to make the EP2 work 
> > correctly. The starting hardware address of the
> EP2 is 0. (The "OUT" 
> > commands are temporarily commented out below but
> they do work if I 
> > forceably set the DIP parameter just prior to the
> "OUT" command as a 
> > test.) Can anyone please help? I've been digging
> through manuals and 
> > trying all combinations I can think of for two
> days and I've gotten 
> > nowhere. What am I missing?
> >
> > Thanks a lot,
> >
> > Jim Kaiser
> > University of Notre Dame
> >
>
----------------------------------------------------------------------------
> > ---------------------------------------- 
> >
> >
> >
>
'---------------------------------------------------------------------
> > ' Name: DIPITYDO.TIG
> >
>
'---------------------------------------------------------------------
> > #INCLUDE DEFINE_A.INC            'general defines
> > USER_EPORT PHYSOFFS, 0F0h        'offset to
> physical address. -10h (-16dec)
> > USER_EPORT NROFOUT, 8            ' 8 expanded
> output ports
> > USER_EPORT LASTLADR, 017h        ' 17h is last
> output port
> > USER_EPORT INITIAL, 0, "&        ' initialize all
> ports to all 0's
> > 00 00 00 00 00 00 00 00"%
> >
> > TASK MAIN                               ' begin
> task MAIN
> >  BYTE DIP                              ' var of
> type BYTE
> > ' install LCD-driver (BASIC-Tiger)
> >  INSTALL DEVICE #1, "LCD1.TDD"
> > ' install LCD-driver (TINY-Tiger)
> > ' INSTALL DEVICE #1, "LCD1.TDD", 0, 0, 0, 0, 0, 0,
> 80h, 8
> >
> >  PUT #1,&
> > 
>
"<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"
> >
> >
> >  LOOP 9999999                          ' many
> loops
> >
> >    GET #1, #1, 1, DIP                  ' read
> DIP-switch in row 0
> >    PRINT #1, "<1>DIP-switch 1:"; DIP   ' output to
> LC-display
> >  '  OUT 10h,255,DIP            ' output DIP to
> port
> >
> >  '  GET #25, #2, 1, DIP                  ' read
> DIP-switch
> >    PRINT #1, "DIP-switch 2:"; DIP      ' output to
> LC-display
> > '  OUT 11h,255,DIP            ' output DIP to port
> 
=== message truncated ===


__________________________________________________

===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com

From owner-tigers-beastsign@router.xnet2.com Thu Jun 15 01:53:57 2006
Received: from router.xnet2.com (localhost.localdomain [127.0.0.1])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5F6rvsA015637;
	Thu, 15 Jun 2006 01:53:57 -0500
Received: (from majordom@localhost)
	by router.xnet2.com (8.13.4/8.13.4/Submit) id k5F6rvRm015636;
	Thu, 15 Jun 2006 01:53:57 -0500
X-Authentication-Warning: router.xnet2.com: majordom set sender to owner-tigers@xnet2.com using -f
Received: from mail14.atl.registeredsite.com (mail14.atl.registeredsite.com [216.247.37.28])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5F6rtbU015630
	for <tigers@xnet2.com>; Thu, 15 Jun 2006 01:53:56 -0500
Received: from kgsystems.net ([66.223.126.72])
	by mail14.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id k5F6rjE5005870
	for <tigers@xnet2.com>; Thu, 15 Jun 2006 02:53:45 -0400
Received: from smtp.sinfonika.si (smtp.sinfonika.si [212.93.226.7])
	by kgsystems.net (8.11.6/8.11.0) with ESMTP id k5F6rho45846
	for <tigers@industrialcontroller.com>; Thu, 15 Jun 2006 06:53:44 GMT
	(envelope-from tevz.grogl@genera-lynx.com)
Received: from kasimdzanov (home.genera-lynx.com [212.93.231.130])
	by smtp.sinfonika.si (Postfix) with ESMTP id 759441CF3E
	for <tigers@industrialcontroller.com>; Thu, 15 Jun 2006 08:57:42 +0200 (CEST)
From: =?iso-8859-2?B?VGV2viBHcvZnbA==?= <tevz.grogl@genera-lynx.com>
To: <tigers@industrialcontroller.com>
Subject: RE: How to get DIP switches and EP2-64SDA to work together?
Date: Thu, 15 Jun 2006 08:53:28 +0200
Message-ID: <000001c69048$6d3f7c40$0600a8c0@kasimdzanov>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-2"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6626
Importance: Normal
In-Reply-To: <449056B1.9080306@nd.edu>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Status: Clean
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by router.xnet2.com id k5F6rubU015633
Sender: owner-tigers@xnet2.com
Precedence: bulk
Reply-To: tigers@industrialcontroller.com

Hi Jim,
I found something else in the Programming manual. Maybe this can help.

--> If, for example, a device driver such as "LCD1.TDD" is using a Port-Pin,
the driver
may block this pin for all other accesses (with IN or OUT) if necessary. 
--> Although you are allowed to execute a task at such a port with OUT, the
reserved pins remain
completely unchanged. 
--> This is a protective mechanism to ensure the correct function of the
connected peripheral devices and it simplifies programming since no explicit
measures have to be taken to leave such pins unchanged.
--> In the Plug & Play Lab the pins L60>L67 and L30>L37 are assigned to
control extended ports and thus cannot be addressed with IN or OUT.
--> You can dispense with the activity of extended ports by using the
compiler instruction USER_EPORT ACT, NOACTIVE (See Device Driver Manual). 
--> These pins can then be addressed as normal.


As for your question about this list - I don't have a clue how many people
does it involve. You are my first contact. I didn't find anything or anyone
active on the internet. Although they helped me at support@wilke.de so you
can try there also.

Tevz 

  

-----Original Message-----
From: owner-tigers@xnet2.com [mailto:owner-tigers@xnet2.com] On Behalf Of
James Kaiser
Sent: Wednesday, June 14, 2006 8:34 PM
To: tigers@industrialcontroller.com
Subject: Re: How to get DIP switches and EP2-64SDA to work together?


Tevz,
   Thanks for your quick reply. Congratulations, your English is 
excellent! Better than some native English speakers
that I know! I had no trouble understanding you.
  I intend to use all named constants eventually. This is just a short 
test program to check out basic operation
before I begin writing the full program, so I didn't worry too much 
about style. The definition for LCD in DEFINE_A.INC
is 1, so that shouldn't matter. I see you're using different drivers for 
keyboard and lcd. That gives me an idea - the book says
I can load more than one copy of LCD1. Maybe that would help? In my 
software manual, the command is listed as INSTALL_DEVICE, but
my program began as the sample program for DIP switches and it has 
INSTALL DEVICE. Both seem to work the same.
   I've been looking harder at the keyboard decoding on the prototyping 
board, thinking that may be the source of the problem,
but so far no luck.
   How many people are on this list? The archives (which I searched 
first) stop about 1 1/2 years ago, so I wondered how active it is. This
is my first post.

Jim Kaiser
> Hi Jim,
> First of all sorry for my pour English since I come from Slovenia and I
> don't practice speaking it every day :)
> During my programming I also ran into some problems with the drivers. I
> think the important thing is to separate ALL your devices. If you use
> "DEFINE_A.INC" it is advisable to use the constants defined in that file.
So
> instead of:
> INSTALL_DEVICE #1, "LCD1.TDD"
> It would be much better to use
> INSTALL_DEVICE #LCD, "LCD1.TDD"
> And also 
> PRINT #LCD, "<1>DIP-switch 1:"
> Instead of
> PRINT #1, "<1>DIP-switch 1:"
> That way you can't confuse the devices.
>
> If you don't like those constants you can of course create your own:
> #DEFINE MY_DEVICE    111  'Some device
> INSTALL_DEVICE #MY_DEVICE, "...."
>
> In my example I have the keyboard separated from the LCD.
> install_device #LCD,"LCD-6963.TDD",0,0,0EEH,1,100,18H
> install_device #KEYB, "LCD1.tdd", 0, 0, 0, 0, 0, 0, 80h, 8'0eeh
> (I'm using TINY-Tiger)
>
> I also noticed that you don't have the underline in the "install_device"
> command. Compiler doesn't care obviously. But I'm not sure if it actually
> installs that device.
>
> And the last thing - parameters for your devices. You have to set them
> properly in order to get your devices work right.
>
> Well for now that's all I can think of. Feel free to contact me If you
will
> run into some more problems. And if you find the cause for your problem
let
> me know!
>
> Best regards!
>
> Tevz Grögl
>
> GENERA LYNX
> Trzaska cesta 132
> 1000 Ljubljana
> Slovenia
> tel: 00386 1 24 25 766 
> www.genera-lynx.com 
>   
>
>
>
> -----Original Message-----
> From: owner-tigers@xnet2.com [mailto:owner-tigers@xnet2.com] On Behalf Of
> James Kaiser
> Sent: Wednesday, June 14, 2006 3:35 PM
> To: tigers@industrialcontroller.com
> Subject: How to get DIP switches and EP2-64SDA to work together?
>
> Hello Tiger-Tamers,
>    I have a Basic-Tiger running on a Basic-Tiger prototyping board. The 
> board is connected to another board with an EP2-64SDA module. I am using 
> the keyboard inputs to scan discrete switches and want to use the EP2 to 
> set parameters into my system. I can get the switch scans to work. I can 
> also get the EP2 to work. I can't get them to work together.
>   The program I'm using as a test is shown below. It's a simple program 
> that reads 4 rows of "DIP switches" and shows the results on the LCD 
> display and also puts the results into the first 4 ports of the EP2. By 
> trial and error, I've found that if I remove the "USER_EPORT PHYSOFFS, 
> 0F0h" statement, the switches are read and displayed correctly. As soon 
> as I insert the statement back, the switches are not correctly read any 
> more. Somehow, this statement is affecting the reading of the switches 
> through the LCD1.TDD driver. I need this statement to make the EP2 work 
> correctly. The starting hardware address of the EP2 is 0. (The "OUT" 
> commands are temporarily commented out below but they do work if I 
> forceably set the DIP parameter just prior to the "OUT" command as a 
> test.) Can anyone please help? I've been digging through manuals and 
> trying all combinations I can think of for two days and I've gotten 
> nowhere. What am I missing?
>
> Thanks a lot,
>
> Jim Kaiser
> University of Notre Dame
>
----------------------------------------------------------------------------
> ---------------------------------------- 
>
>
> '---------------------------------------------------------------------
> ' Name: DIPITYDO.TIG
> '---------------------------------------------------------------------
> #INCLUDE DEFINE_A.INC            'general defines
> USER_EPORT PHYSOFFS, 0F0h        'offset to physical address. -10h
(-16dec)
> USER_EPORT NROFOUT, 8            ' 8 expanded output ports
> USER_EPORT LASTLADR, 017h        ' 17h is last output port
> USER_EPORT INITIAL, 0, "&        ' initialize all ports to all 0's
> 00 00 00 00 00 00 00 00"%
>
> TASK MAIN                               ' begin task MAIN
>  BYTE DIP                              ' var of type BYTE
> ' install LCD-driver (BASIC-Tiger)
>  INSTALL DEVICE #1, "LCD1.TDD"
> ' install LCD-driver (TINY-Tiger)
> ' INSTALL DEVICE #1, "LCD1.TDD", 0, 0, 0, 0, 0, 0, 80h, 8
>
>  PUT #1,&
>  "<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"
>
>
>  LOOP 9999999                          ' many loops
>
>    GET #1, #1, 1, DIP                  ' read DIP-switch in row 0
>    PRINT #1, "<1>DIP-switch 1:"; DIP   ' output to LC-display
>  '  OUT 10h,255,DIP            ' output DIP to port
>
>  '  GET #25, #2, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 2:"; DIP      ' output to LC-display
> '  OUT 11h,255,DIP            ' output DIP to port
>
>  '  GET #26, #3, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 3:"; DIP      ' output to LC-display
> '   OUT 12h,255,DIP            ' output DIP to port
>
>  '  GET #27, #4, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 4:"; DIP      ' output to LC-display
> '   OUT 13h,255,DIP            ' output DIP to port
>
>     WAIT DURATION 300                   ' wait 300 ms
> ENDLOOP                               '
> END                                     ' end task MAIN
>
>   

===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or
TigerSales@IndustrialController.Com



===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com

From owner-tigers-beastsign@router.xnet2.com Thu Jun 15 02:35:44 2006
Received: from router.xnet2.com (localhost.localdomain [127.0.0.1])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5F7Zisu018639;
	Thu, 15 Jun 2006 02:35:44 -0500
Received: (from majordom@localhost)
	by router.xnet2.com (8.13.4/8.13.4/Submit) id k5F7ZiS5018638;
	Thu, 15 Jun 2006 02:35:44 -0500
X-Authentication-Warning: router.xnet2.com: majordom set sender to owner-tigers@xnet2.com using -f
Received: from mail4.atl.registeredsite.com (mail4.atl.registeredsite.com [64.224.219.78])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5F7ZcwY018626
	for <tigers@xnet2.com>; Thu, 15 Jun 2006 02:35:41 -0500
Received: from kgsystems.net ([66.223.126.72])
	by mail4.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id k5F7ZbBX026927
	for <tigers@xnet2.com>; Thu, 15 Jun 2006 03:35:37 -0400
Received: from home (myw-stp-66-18-82-36.sentechsa.net [66.18.82.36])
	by kgsystems.net (8.11.6/8.11.0) with ESMTP id k5F7ZXo56870
	for <tigers@industrialcontroller.com>; Thu, 15 Jun 2006 07:35:34 GMT
	(envelope-from brettwlewis@gmail.com)
Received: from brett ([192.168.1.196])
	by home (home [127.0.0.1])
	(MDaemon.PRO.v6.8.5.R)
	with ESMTP id 54-md50000000002.tmp
	for <tigers@industrialcontroller.com>; Thu, 15 Jun 2006 09:35:25 +0200
From: "Brett Lewis" <brettwlewis@gmail.com>
To: <tigers@industrialcontroller.com>
Subject: RE: How to get DIP switches and EP2-64SDA to work together?
Date: Thu, 15 Jun 2006 09:35:22 +0200
Message-ID: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAEgqmblD4vhG0/L7Pqi07r8KAAAAQAAAARtZIfOhzOkWFP0nAeGpJ1wEAAAAA@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6626
In-Reply-To: <449056B1.9080306@nd.edu>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
Importance: Normal
Disposition-Notification-To: "Brett Lewis" <brettwlewis@gmail.com>
X-Spam-Processed: home, Thu, 15 Jun 2006 09:35:25 +0200
	(not processed: message from valid local sender)
X-MDRemoteIP: 192.168.1.196
X-Return-Path: brettwlewis@gmail.com
X-MDaemon-Deliver-To: tigers@industrialcontroller.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Status: Clean
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by router.xnet2.com id k5F7ZfwY018634
Sender: owner-tigers@xnet2.com
Precedence: bulk
Reply-To: tigers@industrialcontroller.com

Jim

You're ahead of me and I can't help directly, but you tried getting help
from Werner at Wilke in Germany - he's very helpful - support@wilke.de.

Brett

-----Original Message-----
From: owner-tigers@xnet2.com [mailto:owner-tigers@xnet2.com] On Behalf Of
James Kaiser
Sent: 14 June 2006 08:34 PM
To: tigers@industrialcontroller.com
Subject: Re: How to get DIP switches and EP2-64SDA to work together?



Tevz,
   Thanks for your quick reply. Congratulations, your English is 
excellent! Better than some native English speakers
that I know! I had no trouble understanding you.
  I intend to use all named constants eventually. This is just a short 
test program to check out basic operation
before I begin writing the full program, so I didn't worry too much 
about style. The definition for LCD in DEFINE_A.INC
is 1, so that shouldn't matter. I see you're using different drivers for 
keyboard and lcd. That gives me an idea - the book says
I can load more than one copy of LCD1. Maybe that would help? In my 
software manual, the command is listed as INSTALL_DEVICE, but my program
began as the sample program for DIP switches and it has 
INSTALL DEVICE. Both seem to work the same.
   I've been looking harder at the keyboard decoding on the prototyping 
board, thinking that may be the source of the problem,
but so far no luck.
   How many people are on this list? The archives (which I searched 
first) stop about 1 1/2 years ago, so I wondered how active it is. This is
my first post.

Jim Kaiser
> Hi Jim,
> First of all sorry for my pour English since I come from Slovenia and 
> I don't practice speaking it every day :) During my programming I also 
> ran into some problems with the drivers. I think the important thing 
> is to separate ALL your devices. If you use "DEFINE_A.INC" it is 
> advisable to use the constants defined in that file. So instead of:
> INSTALL_DEVICE #1, "LCD1.TDD"
> It would be much better to use
> INSTALL_DEVICE #LCD, "LCD1.TDD"
> And also 
> PRINT #LCD, "<1>DIP-switch 1:"
> Instead of
> PRINT #1, "<1>DIP-switch 1:"
> That way you can't confuse the devices.
>
> If you don't like those constants you can of course create your own:
> #DEFINE MY_DEVICE    111  'Some device
> INSTALL_DEVICE #MY_DEVICE, "...."
>
> In my example I have the keyboard separated from the LCD. 
> install_device #LCD,"LCD-6963.TDD",0,0,0EEH,1,100,18H
> install_device #KEYB, "LCD1.tdd", 0, 0, 0, 0, 0, 0, 80h, 8'0eeh (I'm 
> using TINY-Tiger)
>
> I also noticed that you don't have the underline in the 
> "install_device" command. Compiler doesn't care obviously. But I'm not 
> sure if it actually installs that device.
>
> And the last thing - parameters for your devices. You have to set them 
> properly in order to get your devices work right.
>
> Well for now that's all I can think of. Feel free to contact me If you 
> will run into some more problems. And if you find the cause for your 
> problem let me know!
>
> Best regards!
>
> Tevz Grögl
>
> GENERA LYNX
> Trzaska cesta 132
> 1000 Ljubljana
> Slovenia
> tel: 00386 1 24 25 766
> www.genera-lynx.com 
>   
>
>
>
> -----Original Message-----
> From: owner-tigers@xnet2.com [mailto:owner-tigers@xnet2.com] On Behalf 
> Of James Kaiser
> Sent: Wednesday, June 14, 2006 3:35 PM
> To: tigers@industrialcontroller.com
> Subject: How to get DIP switches and EP2-64SDA to work together?
>
> Hello Tiger-Tamers,
>    I have a Basic-Tiger running on a Basic-Tiger prototyping board. 
> The
> board is connected to another board with an EP2-64SDA module. I am using 
> the keyboard inputs to scan discrete switches and want to use the EP2 to 
> set parameters into my system. I can get the switch scans to work. I can 
> also get the EP2 to work. I can't get them to work together.
>   The program I'm using as a test is shown below. It's a simple program 
> that reads 4 rows of "DIP switches" and shows the results on the LCD 
> display and also puts the results into the first 4 ports of the EP2. By 
> trial and error, I've found that if I remove the "USER_EPORT PHYSOFFS, 
> 0F0h" statement, the switches are read and displayed correctly. As soon 
> as I insert the statement back, the switches are not correctly read any 
> more. Somehow, this statement is affecting the reading of the switches 
> through the LCD1.TDD driver. I need this statement to make the EP2 work 
> correctly. The starting hardware address of the EP2 is 0. (The "OUT" 
> commands are temporarily commented out below but they do work if I 
> forceably set the DIP parameter just prior to the "OUT" command as a 
> test.) Can anyone please help? I've been digging through manuals and 
> trying all combinations I can think of for two days and I've gotten 
> nowhere. What am I missing?
>
> Thanks a lot,
>
> Jim Kaiser
> University of Notre Dame
> ----------------------------------------------------------------------
> ------
> ---------------------------------------- 
>
>
> '---------------------------------------------------------------------
> ' Name: DIPITYDO.TIG
> '---------------------------------------------------------------------
> #INCLUDE DEFINE_A.INC            'general defines
> USER_EPORT PHYSOFFS, 0F0h        'offset to physical address. -10h
(-16dec)
> USER_EPORT NROFOUT, 8            ' 8 expanded output ports
> USER_EPORT LASTLADR, 017h        ' 17h is last output port
> USER_EPORT INITIAL, 0, "&        ' initialize all ports to all 0's
> 00 00 00 00 00 00 00 00"%
>
> TASK MAIN                               ' begin task MAIN
>  BYTE DIP                              ' var of type BYTE
> ' install LCD-driver (BASIC-Tiger)
>  INSTALL DEVICE #1, "LCD1.TDD"
> ' install LCD-driver (TINY-Tiger)
> ' INSTALL DEVICE #1, "LCD1.TDD", 0, 0, 0, 0, 0, 0, 80h, 8
>
>  PUT #1,&  
> "<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"
>
>
>  LOOP 9999999                          ' many loops
>
>    GET #1, #1, 1, DIP                  ' read DIP-switch in row 0
>    PRINT #1, "<1>DIP-switch 1:"; DIP   ' output to LC-display
>  '  OUT 10h,255,DIP            ' output DIP to port
>
>  '  GET #25, #2, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 2:"; DIP      ' output to LC-display
> '  OUT 11h,255,DIP            ' output DIP to port
>
>  '  GET #26, #3, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 3:"; DIP      ' output to LC-display
> '   OUT 12h,255,DIP            ' output DIP to port
>
>  '  GET #27, #4, 1, DIP                  ' read DIP-switch
>    PRINT #1, "DIP-switch 4:"; DIP      ' output to LC-display
> '   OUT 13h,255,DIP            ' output DIP to port
>
>     WAIT DURATION 300                   ' wait 300 ms
> ENDLOOP                               '
> END                                     ' end task MAIN
>
>   

===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or
TigerSales@IndustrialController.Com



===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com

From owner-tigers-beastsign@router.xnet2.com Thu Jun 15 07:36:03 2006
Received: from router.xnet2.com (localhost.localdomain [127.0.0.1])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5FCa3oD004376;
	Thu, 15 Jun 2006 07:36:03 -0500
Received: (from majordom@localhost)
	by router.xnet2.com (8.13.4/8.13.4/Submit) id k5FCa3BX004375;
	Thu, 15 Jun 2006 07:36:03 -0500
X-Authentication-Warning: router.xnet2.com: majordom set sender to owner-tigers@xnet2.com using -f
Received: from mail10.atl.registeredsite.com (mail10.atl.registeredsite.com [64.224.219.84])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5FCa11O004367
	for <tigers@xnet2.com>; Thu, 15 Jun 2006 07:36:02 -0500
Received: from kgsystems.net ([66.223.126.72])
	by mail10.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id k5FCZwZe001286
	for <tigers@xnet2.com>; Thu, 15 Jun 2006 08:36:00 -0400
Received: from osgood.cc.nd.edu (osgood.cc.nd.edu [129.74.250.227])
	by kgsystems.net (8.11.6/8.11.0) with ESMTP id k5FCZwo96322
	for <tigers@industrialcontroller.com>; Thu, 15 Jun 2006 12:35:58 GMT
	(envelope-from jkaiser@nd.edu)
Received: from [129.74.142.161] (emperor.phys.nd.edu [129.74.142.161])
	(authenticated bits=0)
	by osgood.cc.nd.edu (Switch-3.1.7/Switch-3.1.7) with ESMTP id k5FCZt6U017805
	(version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO)
	for <tigers@industrialcontroller.com>; Thu, 15 Jun 2006 08:35:55 -0400 (EDT)
Message-ID: <4491542B.5040203@nd.edu>
Date: Thu, 15 Jun 2006 08:35:55 -0400
From: James Kaiser <jkaiser@nd.edu>
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
MIME-Version: 1.0
To: tigers@industrialcontroller.com
Subject: Re: How to get DIP switches and EP2-64SDA to work together?- solved
 - sort of
References: <20060615062454.98659.qmail@web33111.mail.mud.yahoo.com>
In-Reply-To: <20060615062454.98659.qmail@web33111.mail.mud.yahoo.com>
Content-Type: multipart/alternative;
 boundary="------------010909010704000108090400"
X-ND-MTA-Date: Thu, 15 Jun 2006 08:35:57 EDT
X-ND-Virus-Scan: engine v4.4.00; dat v4784
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Status: Clean
Sender: owner-tigers@xnet2.com
Precedence: bulk
Reply-To: tigers@industrialcontroller.com

This is a multi-part message in MIME format.
--------------010909010704000108090400
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello everybody,

    I have stumbled on to the solution to my problem. Instead of using 
the -10h
offset, I changed to -18h (0E8h). Once I did this, the DIP switches 
started working
again!! This means, of course, that my output ports begin at 18h now 
instead of 10h
but that's no problem. I've verified that the output ports, the DIP 
switch inputs and
the LCD display are all working correctly now.

   There was a suggestion by Ali that shared use of the L35 (P35?) pin 
might be
the problem, but my EP2 has no inputs, only outputs, and doesn't use 
that pin. Just
inserting the USER_EPORT PHYSOFFS, 0F0h command alone caused the DIP
switch reading to quit working. Actually, I think the switches were 
still being read
because I could look at the scanning waveforms with an oscilloscope and 
all looked
normal. I assume the results were being put somewhere that I couldn't 
access.
When I changed the command to USER_EPORT PHYSOFFS, 0E8h things started
to work again.

   I admit I have no idea why this worked, nor why I even tried it - 
desperation
I guess. If anyone can logically explain what's going on, I'd appreciate 
it. Maybe
I'll send the whole thing to support@wilke.de anyway and see what they 
say, but
the urgency is off now that it's working. I have to move on to the rest 
of the programming.

   Thanks to Tevz, Ali and Brett  for your suggestions. I know there's 
at least 4 of us
on this list!

Jim Kaiser

Ali Mozoun wrote:
> HI,
>
> I am working on similar problem at the moment.
> The problem is that the L35 pin is
> shared for both keyboard and the EP input.
> I am working on a solution and if I solve
> the problem I will let you know. 
>
> ALireza Mozoun
>  
> --- James Kaiser <jkaiser@nd.edu> wrote:
>
>   
>> Tevz,
>>    Thanks for your quick reply. Congratulations,
>> your English is 
>> excellent! Better than some native English speakers
>> that I know! I had no trouble understanding you.
>>   I intend to use all named constants eventually.
>> This is just a short 
>> test program to check out basic operation
>> before I begin writing the full program, so I didn't
>> worry too much 
>> about style. The definition for LCD in DEFINE_A.INC
>> is 1, so that shouldn't matter. I see you're using
>> different drivers for 
>> keyboard and lcd. That gives me an idea - the book
>> says
>> I can load more than one copy of LCD1. Maybe that
>> would help? In my 
>> software manual, the command is listed as
>> INSTALL_DEVICE, but
>> my program began as the sample program for DIP
>> switches and it has 
>> INSTALL DEVICE. Both seem to work the same.
>>    I've been looking harder at the keyboard decoding
>> on the prototyping 
>> board, thinking that may be the source of the
>> problem,
>> but so far no luck.
>>    How many people are on this list? The archives
>> (which I searched 
>> first) stop about 1 1/2 years ago, so I wondered how
>> active it is. This
>> is my first post.
>>
>> Jim Kaiser
>>     
>>> Hi Jim,
>>> First of all sorry for my pour English since I
>>>       
>> come from Slovenia and I
>>     
>>> don't practice speaking it every day :)
>>> During my programming I also ran into some
>>>       
>> problems with the drivers. I
>>     
>>> think the important thing is to separate ALL your
>>>       
>> devices. If you use
>>     
>>> "DEFINE_A.INC" it is advisable to use the
>>>       
>> constants defined in that file. So
>>     
>>> instead of:
>>> INSTALL_DEVICE #1, "LCD1.TDD"
>>> It would be much better to use
>>> INSTALL_DEVICE #LCD, "LCD1.TDD"
>>> And also 
>>> PRINT #LCD, "<1>DIP-switch 1:"
>>> Instead of
>>> PRINT #1, "<1>DIP-switch 1:"
>>> That way you can't confuse the devices.
>>>
>>> If you don't like those constants you can of
>>>       
>> course create your own:
>>     
>>> #DEFINE MY_DEVICE    111  'Some device
>>> INSTALL_DEVICE #MY_DEVICE, "...."
>>>
>>> In my example I have the keyboard separated from
>>>       
>> the LCD.
>>     
>>> install_device
>>>       
>> #LCD,"LCD-6963.TDD",0,0,0EEH,1,100,18H
>>     
>>> install_device #KEYB, "LCD1.tdd", 0, 0, 0, 0, 0,
>>>       
>> 0, 80h, 8'0eeh
>>     
>>> (I'm using TINY-Tiger)
>>>
>>> I also noticed that you don't have the underline
>>>       
>> in the "install_device"
>>     
>>> command. Compiler doesn't care obviously. But I'm
>>>       
>> not sure if it actually
>>     
>>> installs that device.
>>>
>>> And the last thing - parameters for your devices.
>>>       
>> You have to set them
>>     
>>> properly in order to get your devices work right.
>>>
>>> Well for now that's all I can think of. Feel free
>>>       
>> to contact me If you will
>>     
>>> run into some more problems. And if you find the
>>>       
>> cause for your problem let
>>     
>>> me know!
>>>
>>> Best regards!
>>>
>>> Tevz Grögl
>>>
>>> GENERA LYNX
>>> Trzaska cesta 132
>>> 1000 Ljubljana
>>> Slovenia
>>> tel: 00386 1 24 25 766 
>>> www.genera-lynx.com 
>>>   
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: owner-tigers@xnet2.com
>>>       
>> [mailto:owner-tigers@xnet2.com] On Behalf Of
>>     
>>> James Kaiser
>>> Sent: Wednesday, June 14, 2006 3:35 PM
>>> To: tigers@industrialcontroller.com
>>> Subject: How to get DIP switches and EP2-64SDA to
>>>       
>> work together?
>>     
>>> Hello Tiger-Tamers,
>>>    I have a Basic-Tiger running on a Basic-Tiger
>>>       
>> prototyping board. The 
>>     
>>> board is connected to another board with an
>>>       
>> EP2-64SDA module. I am using 
>>     
>>> the keyboard inputs to scan discrete switches and
>>>       
>> want to use the EP2 to 
>>     
>>> set parameters into my system. I can get the
>>>       
>> switch scans to work. I can 
>>     
>>> also get the EP2 to work. I can't get them to work
>>>       
>> together.
>>     
>>>   The program I'm using as a test is shown below.
>>>       
>> It's a simple program 
>>     
>>> that reads 4 rows of "DIP switches" and shows the
>>>       
>> results on the LCD 
>>     
>>> display and also puts the results into the first 4
>>>       
>> ports of the EP2. By 
>>     
>>> trial and error, I've found that if I remove the
>>>       
>> "USER_EPORT PHYSOFFS, 
>>     
>>> 0F0h" statement, the switches are read and
>>>       
>> displayed correctly. As soon 
>>     
>>> as I insert the statement back, the switches are
>>>       
>> not correctly read any 
>>     
>>> more. Somehow, this statement is affecting the
>>>       
>> reading of the switches 
>>     
>>> through the LCD1.TDD driver. I need this statement
>>>       
>> to make the EP2 work 
>>     
>>> correctly. The starting hardware address of the
>>>       
>> EP2 is 0. (The "OUT" 
>>     
>>> commands are temporarily commented out below but
>>>       
>> they do work if I 
>>     
>>> forceably set the DIP parameter just prior to the
>>>       
>> "OUT" command as a 
>>     
>>> test.) Can anyone please help? I've been digging
>>>       
>> through manuals and 
>>     
>>> trying all combinations I can think of for two
>>>       
>> days and I've gotten 
>>     
>>> nowhere. What am I missing?
>>>
>>> Thanks a lot,
>>>
>>> Jim Kaiser
>>> University of Notre Dame
>>>
>>>       
> ----------------------------------------------------------------------------
>   
>>> ---------------------------------------- 
>>>
>>>
>>>
>>>       
> '---------------------------------------------------------------------
>   
>>> ' Name: DIPITYDO.TIG
>>>
>>>       
> '---------------------------------------------------------------------
>   
>>> #INCLUDE DEFINE_A.INC            'general defines
>>> USER_EPORT PHYSOFFS, 0F0h        'offset to
>>>       
>> physical address. -10h (-16dec)
>>     
>>> USER_EPORT NROFOUT, 8            ' 8 expanded
>>>       
>> output ports
>>     
>>> USER_EPORT LASTLADR, 017h        ' 17h is last
>>>       
>> output port
>>     
>>> USER_EPORT INITIAL, 0, "&        ' initialize all
>>>       
>> ports to all 0's
>>     
>>> 00 00 00 00 00 00 00 00"%
>>>
>>> TASK MAIN                               ' begin
>>>       
>> task MAIN
>>     
>>>  BYTE DIP                              ' var of
>>>       
>> type BYTE
>>     
>>> ' install LCD-driver (BASIC-Tiger)
>>>  INSTALL DEVICE #1, "LCD1.TDD"
>>> ' install LCD-driver (TINY-Tiger)
>>> ' INSTALL DEVICE #1, "LCD1.TDD", 0, 0, 0, 0, 0, 0,
>>>       
>> 80h, 8
>>     
>>>  PUT #1,&
>>>
>>>       
> "<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"
>   
>>>  LOOP 9999999                          ' many
>>>       
>> loops
>>     
>>>    GET #1, #1, 1, DIP                  ' read
>>>       
>> DIP-switch in row 0
>>     
>>>    PRINT #1, "<1>DIP-switch 1:"; DIP   ' output to
>>>       
>> LC-display
>>     
>>>  '  OUT 10h,255,DIP            ' output DIP to
>>>       
>> port
>>     
>>>  '  GET #25, #2, 1, DIP                  ' read
>>>       
>> DIP-switch
>>     
>>>    PRINT #1, "DIP-switch 2:"; DIP      ' output to
>>>       
>> LC-display
>>     
>>> '  OUT 11h,255,DIP            ' output DIP to port
>>>       
> === message truncated ===
>
>
> __________________________________________________
>
> ===> Contact mail-list administrator: ListMaster@IndustrialController.Com
> ===> Tiger info: http://www.industrialcontroller.com/
> ===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
> ===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com
>   

--------------010909010704000108090400
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit


===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com
--------------010909010704000108090400--

From owner-tigers-beastsign@router.xnet2.com Fri Jun 16 09:29:21 2006
Received: from router.xnet2.com (localhost.localdomain [127.0.0.1])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5GETKvM010516;
	Fri, 16 Jun 2006 09:29:21 -0500
Received: (from majordom@localhost)
	by router.xnet2.com (8.13.4/8.13.4/Submit) id k5GETKjh010514;
	Fri, 16 Jun 2006 09:29:20 -0500
X-Authentication-Warning: router.xnet2.com: majordom set sender to owner-tigers@xnet2.com using -f
Received: from mail11.atl.registeredsite.com (mail11.atl.registeredsite.com [216.247.37.25])
	by router.xnet2.com (8.13.4/8.12.8) with ESMTP id k5GETBDu010503
	for <tigers@xnet2.com>; Fri, 16 Jun 2006 09:29:19 -0500
Received: from kgsystems.net ([66.223.126.72])
	by mail11.atl.registeredsite.com (8.12.11.20060308/8.12.11) with ESMTP id k5GET5Ax017280
	for <tigers@xnet2.com>; Fri, 16 Jun 2006 10:29:06 -0400
Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188])
	by kgsystems.net (8.11.6/8.11.0) with ESMTP id k5GET4o15669
	for <tigers@industrialcontroller.com>; Fri, 16 Jun 2006 14:29:05 GMT
	(envelope-from info@wilke.de)
Received: from [80.137.189.137] (helo=t06wsch2)
	by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis),
	id 0ML29c-1FrFJm1UIQ-0003a5; Fri, 16 Jun 2006 16:29:02 +0200
From: "Wilke Technology GmbH" <info@wilke.de>
To: <tigers@industrialcontroller.com>
Cc: <support.ausgang@wilke.de>
Subject: AW: How to get DIP switches and EP2-64SDA to work together?
Date: Fri, 16 Jun 2006 16:30:27 +0200
Organization: Wilke Technology GmbH
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
X-Mailer: Microsoft Office Outlook, Build 11.0.5510
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Thread-Index: AcaPwICP0EIEuGIgQGaIqod0Rd9UiwBj/3Jg
In-Reply-To: <44901070.50404@nd.edu>
Message-ID: <0ML29c-1FrFJm1UIQ-0003a5@mrelayeu.kundenserver.de>
X-Provags-ID: kundenserver.de abuse@kundenserver.de login:01fd8af6040847d5c992225ae020bda2
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on router.xnet2.com
X-Virus-Status: Clean
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by router.xnet2.com id k5GETKDu010511
Sender: owner-tigers@xnet2.com
Precedence: bulk
Reply-To: tigers@industrialcontroller.com

Dear Jim,

from version 5 of the Tiger-BASIC compiler on there are new special
functions for controlling external ports. These are the xport functions,
that are explicitely for external ports and thus do not require any physical
offset - you can directly use physical addresses with these functions. So
you can try the below code to make your DIP switches and your EP2 work
simultaneously:

'---------------------------------------------------------------------
' Name: DIPITYDO.TIG
'---------------------------------------------------------------------
#INCLUDE DEFINE_A.INC				' general defines

TASK MAIN						' begin task MAIN
  BYTE DIP, FLG, EVER				' vars of type BYTE

  INSTALL_DEVICE #1, "LCD1.TDD"		'  install LCD-driver (BASIC-Tiger)

  PUT #1, "<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"

  FLG = XSETUP (6, 3, 3, 4, 5, 4, 0)	' setup xport system

  FOR EVER = 0 TO 0 STEP 0			' endless loop

    GET #1, #1, 1, DIP				' read DIP-switch in row 0
    PRINT #1, "<1>DIP-switch 0:"; DIP	' output to LC-display
    XOUT (0h, DIP)				' output DIP to physical
port 0

    GET #1, #2, 1, DIP				' read DIP-switch in row 1
    PRINT #1, "DIP-switch 7:"; DIP		' output to LC-display
    XOUT (1h, DIP)				' output DIP to physical
port 1

    GET #1, #3, 1, DIP				' read DIP-switch in row 2
    PRINT #1, "DIP-switch 8:"; DIP		' output to LC-display
    XOUT (2h, DIP)				' output DIP to physical
port 2

    GET #1, #3, 1, DIP				' read DIP-switch in row 3
    PRINT #1, "DIP-switch 3:"; DIP		' output to LC-display
    XOUT (3h, DIP)				' output DIP to physical
port 3

    WAIT_DURATION 300				' wait 300 ms
  NEXT						'
END							' end task MAIN

If it won't work, I check with my colleagues from hardware on Monday.

Best Regards,
Werner Schoengen
Technical Support


embedded computers * data loggers * industrial control

Wilke Technology GmbH

Krefelder Str. 147 * D - 52070 Aachen * Germany
Tel.: +49 (241) 918 900         email: support@wilke-technology.com
Fax: +49 (241) 918 9044         web: www.wilke-technology.com


-----Ursprüngliche Nachricht-----
Von: owner-tigers@xnet2.com [mailto:owner-tigers@xnet2.com] Im Auftrag von
James Kaiser
Gesendet: Mittwoch, 14. Juni 2006 15:35
An: tigers@industrialcontroller.com
Betreff: How to get DIP switches and EP2-64SDA to work together?

Hello Tiger-Tamers,
   I have a Basic-Tiger running on a Basic-Tiger prototyping board. The
board is connected to another board with an EP2-64SDA module. I am using the
keyboard inputs to scan discrete switches and want to use the EP2 to set
parameters into my system. I can get the switch scans to work. I can also
get the EP2 to work. I can't get them to work together.
  The program I'm using as a test is shown below. It's a simple program that
reads 4 rows of "DIP switches" and shows the results on the LCD display and
also puts the results into the first 4 ports of the EP2. By trial and error,
I've found that if I remove the "USER_EPORT PHYSOFFS, 0F0h" statement, the
switches are read and displayed correctly. As soon as I insert the statement
back, the switches are not correctly read any more. Somehow, this statement
is affecting the reading of the switches through the LCD1.TDD driver. I need
this statement to make the EP2 work correctly. The starting hardware address
of the EP2 is 0. (The "OUT" 
commands are temporarily commented out below but they do work if I forceably
set the DIP parameter just prior to the "OUT" command as a
test.) Can anyone please help? I've been digging through manuals and trying
all combinations I can think of for two days and I've gotten nowhere. What
am I missing?

Thanks a lot,

Jim Kaiser
University of Notre Dame
----------------------------------------------------------------------------
---------------------------------------- 


'---------------------------------------------------------------------
' Name: DIPITYDO.TIG
'---------------------------------------------------------------------
#INCLUDE DEFINE_A.INC            'general defines
USER_EPORT PHYSOFFS, 0F0h        'offset to physical address. -10h (-16dec)
USER_EPORT NROFOUT, 8            ' 8 expanded output ports
USER_EPORT LASTLADR, 017h        ' 17h is last output port
USER_EPORT INITIAL, 0, "&        ' initialize all ports to all 0's
00 00 00 00 00 00 00 00"%

TASK MAIN                               ' begin task MAIN
 BYTE DIP                              ' var of type BYTE
' install LCD-driver (BASIC-Tiger)
 INSTALL DEVICE #1, "LCD1.TDD"
' install LCD-driver (TINY-Tiger)
' INSTALL DEVICE #1, "LCD1.TDD", 0, 0, 0, 0, 0, 0, 80h, 8

 PUT #1,&
 "<1BH>D<16><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0><0F0H>"


 LOOP 9999999                          ' many loops

   GET #1, #1, 1, DIP                  ' read DIP-switch in row 0
   PRINT #1, "<1>DIP-switch 1:"; DIP   ' output to LC-display
 '  OUT 10h,255,DIP            ' output DIP to port

 '  GET #25, #2, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 2:"; DIP      ' output to LC-display
'  OUT 11h,255,DIP            ' output DIP to port

 '  GET #26, #3, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 3:"; DIP      ' output to LC-display
'   OUT 12h,255,DIP            ' output DIP to port

 '  GET #27, #4, 1, DIP                  ' read DIP-switch
   PRINT #1, "DIP-switch 4:"; DIP      ' output to LC-display
'   OUT 13h,255,DIP            ' output DIP to port

    WAIT DURATION 300                   ' wait 300 ms
ENDLOOP                               '
END                                     ' end task MAIN

--
James W. Kaiser
University of Notre Dame
Physics Department
225 Nieuwland Science Center
Notre Dame, IN 46556
(574)631-6808


===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or
TigerSales@IndustrialController.Com



===> Contact mail-list administrator: ListMaster@IndustrialController.Com
===> Tiger info: http://www.industrialcontroller.com/
===> Unsubscribe or view archive: http://industrialcontroller.xnet2.com
===> Purchase Wilke Products (USA): 800-292-4303 or TigerSales@IndustrialController.Com

