Connect with us

WinAVR, parallel port and Windows 2k

Discussion in 'Electronic Basics' started by [email protected], Jul 5, 2007.

Scroll to continue with content
  1. Guest

    Ok, I desoldered and re-soldered my cable (with the correct pinout
    this time).

    To test it, I tried turning on and off bit one on the parallel port,
    and measuring Pin 2 wrt ground with my multimeter.

    on.com code:

    MOV DX,0378
    MOV AL,01
    OUT DX,AL
    RET

    off.com code:
    MOV DX,0378
    MOV AL,00
    OUT DX,AL
    RET

    This works just fine with FreeDOS (booted from CD).

    HOWEVER, when I try using install_giveio.bat with the WinAVR tools, my
    on.com and off.com routines failed to give any change on my
    multimeter.

    (I should mention, I'm running Windows 2000 on my laptop.)

    Somehow I have a sinking feeling that AVRDude won't be able to flash
    my ATTiny13 chip if it can't access the parallel port.

    Suggestions/advice/help?

    Thanks,

    Michael
     
  2. Guest


    Whoops, I meant to post this on c.a.e instead of s.e.b. Sorry about
    that

    Michael
     
  3. Si Ballenger

    Si Ballenger Guest

    You probably don't have user level access to the hardware on the
    win 2k machine. Do A google search for userport.zip to fix the
    problem.
     
  4. mc

    mc Guest

    Under Windows, port access is virtualized. Your software is supposed to be
    communicating with the printer port through a printer driver. Look at
    www.lvr.com -- there are drivers that will allow you to bit-twiddle the
    printer port.
     
  5. Guest


    Ok, will do.

    I tried fiddling with WINAVR last night; I didn't get very far. avr-
    gcc refused to compile my test project (blinky lights). It probably
    doesn't help that I'm not very good at making makefiles.

    I'll try the AVR tools from Atmel, and look at their assembler.

    Thanks,

    Michael
     
  6. Guest


    Ok, thanks. I was under the impression that giveio.sys didn't require
    a rewrite of legacy code... guess I was wrong.
     
  7. David Brown

    David Brown Guest

    Installing the giveio driver is not enough - your program must also open
    a handle to the driver to be allowed direct hardware access (and
    therefore direct access to the parallel port). There should be plenty
    of examples on the web of how to do this.

    If you want an even easier solution (but definitely not a *safe*
    solution!) you can install the "totalio" driver. Whenever that driver
    is started, *all* programs get full direct access to the hardware, just
    like under Win9x. When you install "totalio", make sure that it is set
    to "manual" start, not "automatic", and start it only when needed with
    "net start totalio". But the giveio path is very much the preferred method.
     
  8. Sjouke Burry

    Sjouke Burry Guest

    Google for userport.zip, which is a small utility
    to unlock access to all wanted hardware ports.
    Normally all access to the ports is blocked in
    Windows(2000/xp).
     
  9. Jamie

    Jamie Guest

    You should update your tools to a serial or USB programmer. I don't
    have any fathe in tools that require special drivers. That is one reason
    I keep a 98Se machine around.
     
  10. Jasen Betts

    Jasen Betts Guest

    giveio may need adminsitrator prifviledges to work.
    maybe build this, and download the software from the atmel site,

    http://www.iready.org/projects/uinternet/ispdongle.pdf

    I've got a genuine Atmel STK200 programmer here, and as far as I can
    tell this circuit is identical (ATMEL filed the numbers off the chip).

    watch the pinout on the parallel port, follow the numbers not the outline

    Bye.
    Jasen
     
  11. The Atmel syntax is awful. Maybe there exist a gas version for
    Atmel so you can use AT&T syntax. But the AVR instruction set
    very simple so it's no problem to write your own assembler. I
    have written one using 68k syntax. You will find it together
    with a tutorial for a simple beginners project at:

    ftp://137.193.64.130/pub/assembler/adela.zip
     
  12. David Brown

    David Brown Guest

    You were almost correct - it does *not* need a rewrite of legacy code.
    It just needs a small addition to open a handle to the giveio driver,
    which is hardly a difficult task if you have access to the source code.
    If you don't have access to the source code, then totalio is the answer.

    mvh.,

    David
     
  13. linnix

    linnix Guest

    (from caveman commericals)
    Yes, I have a response.
    What?
    WinAVR comes with gcc and gas.
     
  14. Jasen Betts

    Jasen Betts Guest

    avrgcc ships with a version of gas (at&t syntax assembler).
    I did a ~700 line project in avra (basically the atmel syntax
    with a few ease-of-use features added) I didn't find it
    particularly painful, it helped that the syntax I was using
    matched that of the documentation I was reading.

    As I'm fairly familiar with intel x86,
    gas is a bit oa a learning curve.

    Bye.
    Jasen
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-