Jump to content

Using INPT0-5 as output


Recommended Posts

In a recent status update discussion, @CPUWIZ mentioned that you can use all the controller pins (other than +v and gnd) as output. I've used the SWCHA pins as output using SWACNT, but I haven't seen documentation explaining how to use INPT0-5 as output. Was I misunderstanding what he said, or is there some way to accomplish this?

Link to comment
Share on other sites

Huh, so you can just write to them directly, and it works as output? I'll be jiggered.



Just look at devos0.2 source for what I am talking about, the 7800 joystick ports are connected the same way.


My google-fu is failing me. Where can I find the source you speak of?



Link to comment
Share on other sites

Only pins connected to the RIOT are bidirectional (pins 1-4 on each port), while the TIA ones (pins 5,6 and 9) are inputs only.
Actually you can use the TIA function to discharge the paddle lines (pins 5 and 9 on each port) as another (sort of) output.
There are some restrictions, though:
- you need pullup resistors on the paddle lines or they'll stay low after the caps are discharged.
- charge and discharge of the capacitors will take some time (which depends on the value of the pullup resitors)
- You can only charge/discharge all 4 paddle lines at once.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...