Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Parallel Port Testing

  • 23-10-2003 11:46am
    #1
    Closed Accounts Posts: 14,483 ✭✭✭✭


    This post has been deleted.


Comments

  • Registered Users, Registered Users 2 Posts: 1,481 ✭✭✭satchmo


    Well there's always an oscilloscope?!


  • Registered Users, Registered Users 2 Posts: 1,842 ✭✭✭phaxx


    I did a project using the parallel port for the Young Scientist thingy once, and I built a little thingy with LEDs to see what the state of the output lines on the parallel port was. Pretty much just a parallel connector from Maplin, a piece of buscuitboard with eight LEDs, and some wire to the right pins. That was it.

    You could do the same with the input lines (there's five, right?) and add some little push buttons/switches to the buscuitboard.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,596 Mod ✭✭✭✭Capt'n Midnight


    You could look up loopback tester for pinouts.

    Perhaps get an old 386 or something and run a cable between the two PC's - then use a program (use debug to test) to put values on the output ports - the nice thing about this is that you can get the program to simulate the way the device is supposed to behave. (and you can generate random values to bounds test the controlling program on the good PC)

    If you had a ISA slot you could put in a second parallel port on irq5 ...

    Note: most parallel ports these days are bi directional so would make programming much easier.. - though of course the Inputs stay the same as the previous output unless an external device changes them..


  • Closed Accounts Posts: 14,483 ✭✭✭✭daveirl


    This post has been deleted.


  • Registered Users, Registered Users 2 Posts: 7,521 ✭✭✭jmcc


    Originally posted by daveirl
    I'm writing a program at the moment that has to communicate with a piece of hardware I'm designing over a parallel port. My problem is that I don't actually want to build the hardware yet because I'd prefer to debug the program first and then work on the hardware.

    From an engineering point of view, developing the software before the hardware is bad. Though for the parallel port what you are doing is essentially reading bytes from a few addresses. If you know the status you can really just set an array of possible bytes that you would see on the parallel port.

    Interfacing with the parallel port is pretty simple anyway. You could always google for the kind of tester interface that you need.

    Regards...jmcc


  • Advertisement
  • Closed Accounts Posts: 14,483 ✭✭✭✭daveirl


    This post has been deleted.


  • Registered Users, Registered Users 2 Posts: 7,521 ✭✭✭jmcc


    Originally posted by daveirl
    Well sorry I didn't mean to sound like that. I have a hardware design done already but it's the interface I'm working on. I know the Hardware works because that's easy to simulate (i.e. Manually input desired inputs) but the software isn't my forté so that's where I'm expecting all my debugging to be so that's why I want to test it separately.

    Without knowing what language you are writing the code in, it is difficult to make a guess at how easy the task is. :) This link shows how easy reading and writing the data for the parallel port is:

    http://www.doc.ic.ac.uk/~ih/doc/par/doc/data.html

    It looks like you have most of the data you need to simulate the interface for the software. The software for dealing with the parallel port is very simple when it does not involve clocks. It is really just reading and writing bytes to a set of addresses.

    If you know what you want to do and the data that should be on the interface as a result, then emulating it in software is not that difficult.

    The data to and from the parallel port is essentially just a set of bytes. Thus if you want to isolate a particular bit, it is a question of bitmasking masking the byte. Emulating the interface should be easy enough because you will probably have one byte value with a bit set for read and the others will be data. You can create a loop which would provide the expected data for all values 0 - 255:
    a type of [if $bytevalue = n then do this ] approach.

    Since you are only reading and writing values, the data can be in hex, binary or decimal. Decimal can be a bitch of a thing when you are dealing with hardware level interfacing because you have to translate back and forth. The simplest would be hex because it is a lot easier to translate from hex to binary. Binary is perhaps the best but it can be tricky to get right at first.

    I haven't used the parallel port for interacing for a few years and the last time I used it was for a PIC programmer for PIC16C84s used for some smartcard work. ;) I wasn't always into search engines and internet work.

    The following URLs may be of some use:

    http://www.epanorama.net/links/pc/interface.html#parallel
    http://www.doc.ic.ac.uk/~ih/doc/par/
    http://www.lvr.com/parport.htm

    Regards...jmcc


  • Closed Accounts Posts: 14,483 ✭✭✭✭daveirl


    This post has been deleted.


Advertisement