From: Marko Mäkelä (msmakela_at_gmail.com)
Date: 2007-05-09 10:32:01
On Wed, May 09, 2007 at 01:56:20AM -0500, Jim Brain wrote: > LO->HI: switch DDR to input, then switch logic level to high to engage > pullup. Doing it this way ensures you never drive pin with 5v directly > HI->LO: disengage pullup, then switch DDR to output. Oh, I did remember something about setting the PIN bit on the AVR when composing my answer. That was for engaging the pullup resistor when outputting a logic 1. But I don't think it should be necessary for the joystick port, because mechanical joysticks do not contain any pullup resistors. And I think you can safely leave the PIN bit initialized to 1 at all times. It's a different matter on a shared bus, such as the Commodore serial bus. There you might want to disengage the pullups when the device is not active, or you won't be able to attach very many devices to the bus. I remember that George Page, who parted with his collection some years ago, once tested how many devices he can connect to the serial bus. I think he was getting problems after some 5 devices. That might be because the Commodore devices are equipped with fixed (passive) pull-up resistors. By the way, I found Al Anger's Commodore mods <http://gallery.gwizcomputers.com/comm/> very interesting and entertaining. I wonder what happened to the 64HD tower <http://gallery.gwizcomputers.com/comm/mod_a/index.html>. There's no picture of the completed system. Marko http://www.iki.fi/~msmakela/8bit/ Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.