steep learning curve

General discussion on mikroBasic for AVR.
Post Reply
Author
Message
ROV_MCU_PSX
Posts: 1
Joined: 31 Jan 2008 04:55

steep learning curve

#1 Post by ROV_MCU_PSX » 31 Jan 2008 05:26

I am trying to set up a playstation controller to run a submersible via 2 Atmel ATMEGA16 micro controllers. I am pretty new to the programming of the microcontroller (MC), but have managed to win a few small battles with programming one of them (ie. managed to blink an LED on and off, have 6 blink consecutively, and also learned how to turn an LED on & off using I/O). I have yet to start working on figureing out how to let 2 MC's talk to each other, let alone interface with a playstation controller.

The idea for the Sub control system is to have an MC at the surface which sends a signal down to a 2nd MC in the sub. The purpose is that the MC on the surface will take the interface from a playstation controller, then the surface MC will send a signal to the MC underwater (trying to eliminate the number of wires from the surface to the sub as that would increase drag through the water)

there are 2 horizontal thrust motors (need fwd and rev each with speed control) - each one is hoped to be controlled using the respective joystick on the psx controller.
there are 4 vertical thrusters (smaller motors which need fwd and rev and no speed control) - each motor is hoped to be controlled using the 4 shoulder buttons at the top of the PSX controller.
lights on and off button - hoped to be controlled by using triangle, cirlce, square or x buttons...any one would do, preferably the x button.

so, to get to my question...I dont really have a clue as to how to go about programming the PSX controller to interface with the MC. I have looked all over online for writeups on people using a psx controller, but I honestly dont fully understand the programming of it all. i understand MATLAB alright, but the AV Compiler language is not clear. it is also not clear how to set up the PSX controller as it relates to the programming. there are clock variables, command variable, etc....all of which the meaning are not understood. Is there a code out there that can be altered to work for me? can someone shine some light as to how to go about this? I need the two joysticks to work, the 4 shoulder buttons to work, and the x button.

any ideas? or should i stick to switching the input signals to the surface MC with just a simple atari type joystick or plain ole' buttons and swtiches?

on a side note, the motor speeds and directions will likely be controlled via hexfets based off the signal from the underwater sub MC

any help is greatly appreciated!

democracyman
Posts: 3
Joined: 17 Jun 2008 19:54

#2 Post by democracyman » 17 Jun 2008 19:56

This example may help, on different system and control platform though.

http://members.aol.com/stuarttttt/index.html

Dan

Post Reply

Return to “mikroBasic for AVR General”