SEROUT or PWMOUT to replicate Gamecube analog stick output?

wafers

New Member
Hello all, I'm starting a project very similar to the rapidfire Xbox controllers that have been mentioned here. The differences are that I hope to use a Gamecube controller and take control of the analog stick as well as the buttons. I'm quite new to this & have a few questions that I'm hoping someone can clarify so that I'm sure I can handle this project with a Picaxe before I begin.

I've browsed through the Picaxe manuals and it seems that I should be able to pull this off with either SEROUT or PWMOUT.

Here's an image of an N64 stick, which I assume is similar to the GC controller- http://www.modded-by-bacteria.com/images/joy1.jpg

My understanding is that the GC stick is read optically and digital output is generated directly from these readings; does that sound right? If this is the case, then PWMOUT may not be useful.

This (http://int03.co.uk/crema/hardware/gamecube/gc-control.htm) article on the GC controller protocol suggests that the controller sends strings of 4 bit and 8 bit data to the console via a serial interface, perhaps I could use SEROUT to output data to the data line as well?

On another forum I read-
Remove the potentiometer leads going to the controller and run them to a PIC instead. The microcontroller would then relay the variable voltage back to the controllers joystick input. But then you would also have the ability to program the PIC to use macro functions that could send out the varied voltage output as desired. This would require an Anolog-2-Digital converter for the joystick. And due to space, you would want them to be serial interface to the PIC.
Is this necessary or does an easier solution exist? Does anyone have experience with the GC controller? How difficult do you think this task would be to a new user?

Thank you!
 

boriz

Senior Member
Welcome.

“How difficult do you think this task would be to a new user?”

Depends on your experience. You might have to get someone else to do most of it for you. Have you done any successful Picaxe projects at all?
 

BeanieBots

Moderator
Welcome to the forum.

Not 100% clear about what you want to do.
You speak of both analogue voltages AND of serial data.

Reading the article you linked to, it speaks of serial running at 4uS per bit. You won't be able to do anything with that using a PICAXE. It's simply too fast.

If you want to read in an analogue voltage, do 'something' to it and then send it out again then it should be possible. Be aware that to create an analogue voltage output requires converting the logic level PWM signal into analogue by use of an RC network. That will take time to respond to changes so how successfull it is will depend on how quickly you need the analogue voltage to change.

Sorry I couldn't be more specific but I don't that controller nor what the requirements are. However, if you can give more specific details then I'm sure we can help.
 

wafers

New Member
Depends on your experience. You might have to get someone else to do most of it for you. Have you done any successful Picaxe projects at all?
No, though the coding for a RF Xbox chip seems relatively simple for me and I'm not bad with the soldering iron. I suppose the real trouble will be understanding how this particular anolog stick works and how analog output (or whatever I may need) works on the PICAXE.

Not 100% clear about what you want to do.
The RF Xbox controllers that have been posted here are essentially "macro" controllers, where a switch activates a chain of commands to be processed. In most cases this is simply a loop of shoot-shoot-shoot-shoot really quickly. I'm hoping to create macros incorporating other button presses and the anologue stick for movement, so that a switch will run this macro command, i.e. "Down, Downforward, Forward, A, B, Y."

I'm really not sure how to go about producing the movements though, as they are controlled by the analog stick (and I'm not 100% sure how that works). Hope this helps to clarify- thanks for your replies.


Edit: I just found some info suggesting that the GC controller uses potentiometers on the analog sticks- reading more about them now.
 
Last edited:

hippy

Ex-Staff (retired)
http://int03.co.uk/crema/hardware/gamecube/gc-control.htm
How difficult do you think this task would be to a new user?
After a short read, my answer would be "difficult, at least", a lot of work even with experience, and I don't think it's achievable with a PICAXE.

You don't need to worry about sending analogue as the interface is entirely digital, you just need to determine what analogue value to send as digital data along with button push data.

The real problem is the bi-directional high-speed bus which uses a protocol which is not natively supported by the PICAXE and is too fast to be bit-banged.

Even if it were possible, designing something which can read what a GC controller sends and forcing it to send that is one thing, designing a GC controller which has to handle everything which a GC can throw at it in addition to asking it to send data is probably a much more complicated task. It would require a very detailed understanding of the GC port protocols.

On the other hand, interfacing to the GC controller itself, faking button pushes, control stick movements and so on, may be possible if schematics of the controller can be found.
 
Top