Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

82c55 and daqpad 6016 oem

Hi everyboday,
 
I have a problem and i would like to have your help. Thank you so much for your help.
 
The question is I use daqpad 6016 OEM interfaced with the chip 82C55 in order to expand I/O. My code doesnt work. Please see my code.
 
Would you please take a look and give me your inputs?
 
Thank you so much for your help.
Download All
0 Kudos
Message 1 of 10
(4,726 Views)
Hello NguahoanUSA,

I'm not sure exactly what you're trying to do, but it looks like you're using up 4 lines from port3 of the DAQPad-6016 to get 3 lines of digital output using an external 8255. Is that right? If so, you're wasting a line. It takes more DIO lines to interface to the 8255 than the 8255 is providing for you (since your schematic doesn't hook anything up to the other 21 lines on the 8255). Plus, the DAQPad-6016 actually uses an 8255 internally for ports 1 through 3, so it's unlikely that your external 8255 will have different drive characteristics.

If you have a good reason to design a circuit using an external 8255, you need to hook up the WR* line so that the 8255 will actually listen to you, and you need to hook up the other 7 data lines so that you can write to the control register (note that the 8255 ports are tristated until you use the control register to tell it to drive them). You may have to do much more, but those are the obvious problems with your current design. If you run into more problems, but the DAQPad-6016 is doing what you tell it to do, you will probably have to contact the 8255 vendor's technical support.
---
Brad Keryan
NI R&D
0 Kudos
Message 2 of 10
(4,694 Views)
Hi Brad,
 
I would like to thank you for your advices.
I am sorry for making you confuse about previous schematic. I just made the previous schematic simply by deleting the line in D1,D2,D3,D4,D5,D6, and D7 and it made you confusing. Sorry about that.
 
These attachment is the update. In my project, I need more than 200 digital outputs line (Daqpad 6016 OEM does not have enough) so that I use some 82C55 chips. I have problem with chip controller. For example:
 
1. CS*=LOW, A0=LOW, A1=LOW:  The 82C55 doesnt select port A
2. CS*=LOW, A0=LOW, A1=HIGH:  The 82C55 doesnt select port B
3. CS*=LOW, A0=HIGH, A1=LOW:  The 82C55 doesnt select port C
 
Would you please take a look at my attached LabView code?
 
I would like to thank you for your support.
 
Best regards,
Brian
Download All
0 Kudos
Message 3 of 10
(4,691 Views)
Hi Brian,

Your VI looks like it should successfully twiddle bits on the 6016 I/O connector, but it doesn't do anything that the DAQ Assistant test panel doesn't do. Whether it works will depend on whether the person running it knows and understands the 8255 register interface, since the VI doesn't actually implement an abstraction for the 8255 register interface. Note that you can put lines from multiple DIO ports in the same DAQmx task, which would simplify it a little bit.

Also, I think you need to strobe the WR* or RD* line to get the 8255 to do a write or a read. Check out the timing diagrams in the 8255 datasheet--they don't just tie the WR* line low all the time. I recommend reading the datasheet, and if you need more help learning how to program the 8255, contact the chip vendor.

Brad
---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 10
(4,674 Views)
Hi Brad,
 
I would like to thank you for your advices. I am going to let you know the result of this.
 
Have a good night.
Best regards,
Brian
0 Kudos
Message 5 of 10
(4,662 Views)

Hi Everybody:

As Brad's advice, I try many times but it doesnt work.  Do you have any advices? Please help me out.

Thank you for your helps and have a good night.

Best regards,

Brian

Download All
0 Kudos
Message 6 of 10
(4,622 Views)
Hello Brian,

I'm not sure what you mean when you say that it doesn't work. Could you provide some more details about the problem? Is the DAQPad-6016 generating signals properly? Are you receiving any error messages or warnings? It is hard to provide any advice without more information.

That being said, I think Brad had a point with his previous comment about the RD* and WR* signals. The diagram in the 82C55A data sheet (copied below) shows the the WR* line being strobed for basic output. I would recommend that you examine this diagram closely to make sure that you are following all the timing specifications listed.


Message Edited by Matt A on 03-10-2007 06:51 PM


Matt Anderson

Hardware Services Marketing Manager
National Instruments
0 Kudos
Message 7 of 10
(4,589 Views)
Hello Matt:
 
I would like to thank you for your advice. The problem is that:
 
My project need about 200 digital input and output. The daqpad 6016
OEM doesnt enough digital input and output so that i use some chip
82C55 in order to expand the DIO. The "READ" of 82C55 works very well.
However, I have some problem with the "WRITE". This 82C55 is set for WRITE only so that the WR* is connected to ground and the RD* is connected to 5VDC of Dadpad 6016 OEM.

1. CS*=LOW, A0=LOW, A1=LOW, the data bus D0-D7= all HIGH: The 82C55
doesnt select port A, and port A (PA0-PA7) are still LOW.
2. CS*=LOW, A0=LOW, A1=HIGH, the data bus D0-D7= all HIGH:  The 82C55
doesnt select port B, and port B (PB0-PB7) are still LOW.
3. CS*=LOW, A0=HIGH, A1=LOW, the data bus D0-D7= all HIGH:  The 82C55
doesnt select port C, and port C (PC0-PC7) are still LOW.

It seems to me that there are no transfer at all between the data bus
and port A, port B, and port C.

I would like to attached my VI, schematic for you to review. Would you
please review my VI and give me some inputs?
 
Thank you and have a good night.
 
Best regards,
 
Brian
Download All
0 Kudos
Message 8 of 10
(4,576 Views)
Hello Brian,

I believe if you examine the 82C55A manual closely, you will note that WR* must be sent high to 1 before the data out is valid. The user manual states:

"Operating Modes
Mode 0 (Basic Input/Output). This functional configuration
provides simple input and output operations for each of the
three ports. No handshaking is required, data is simply
written to or read from a specific port.

Mode 0 Basic Functional Definitions:
   • Two 8-bit ports and two 4-bit ports
   • Any Port can be input or output
   • Outputs are latched
    • Inputs are not latched
    • 16 different Input/Output configurations possible"

I believe the highlighted text explains the behavior you are describing. Namely, you say that "'READ' of 82C55 works very well. However, I have some problem with 'WRITE'...". This is because the WRITE operation is latched on WR* going high. Specifically, you should note the tWB timing parameter shown in the diagram I posted above and as highlighted in the table below.



I hope this clears things up for you.

Message Edited by Matt A on 03-12-2007 10:16 AM


Matt Anderson

Hardware Services Marketing Manager
National Instruments
Message 9 of 10
(4,551 Views)
Hello Matt:
 
I would like to thank you so much for your value advice. I would let you know the result.
 
Best regards,
Brian
0 Kudos
Message 10 of 10
(4,532 Views)