Difference between revisions of "Joystick Interface"

From RoboJackets Wiki
Jump to navigation Jump to search
m (Fixed J4)
m (Replaced receptacles with headers)
Line 31: Line 31:
 
*300-7022-1-ND - U4 - 11.0592 MHZ Clock Siqnal Oscillator
 
*300-7022-1-ND - U4 - 11.0592 MHZ Clock Siqnal Oscillator
  
===Receptacles===
+
===Headers===
  
*A19490-ND - J1 - Power 2-pin receptacle  
+
*A19423-ND - J1 - Power 2-pin header  
*A19491-ND - J2 - CAN 3-pin receptacle 
+
*A19430-ND - J2 - CAN 3-pin header
*A19497-ND - J3 - 9 pin receptacle to joystick
+
*A19436-ND - J3 - 9 pin header to joystick
 
*A19520-ND - J4 - SPI connection to the MCU, 10 pin header
 
*A19520-ND - J4 - SPI connection to the MCU, 10 pin header
  

Revision as of 22:05, 1 February 2006

Parts

Part numbers listed are those of the Digi Key Corporation parts database. Note - some generic parts do not have part numbers listed.

Processor

  • ATTINY26-16SI-ND - U3 - Atmel AVR Microcontroller
  • LED2 - Green LED for use by programs running on the microcontroller
  • R3 - 470 ohm resistor in series with LED2
  • R4 - 470 ohm pullup resistor for joystick DATA
  • R5 - 470 ohm pullup resistor for joystick ACK

CAN Specific

  • MCP2515 - U2 - Microchip CAN Controller with SPI Interface
  • MCP2551 - U1 - Microchip CAN TransponderP966-ND
  • R1 - 10k ohm pullup resistor for the RESET command
  • R6 - 10k ohm pullup resistor for the CAN chip select

Onboard Power Control

  • 296-12290-1-ND - U4 - 5V Linear Regulator
  • 1N4004GICT-ND - D1 - Diode
  • P966-ND - C1,C2 - 10 microfarad Capacitor
  • 399-2127-ND - C3,C4,C5 - 0.1 microfarad Capacitor
  • LED1 - Red LED to indicate power activity
  • R2 - 470 ohm resistor in series with LED1

Oscillator

  • 300-7022-1-ND - U4 - 11.0592 MHZ Clock Siqnal Oscillator

Headers

  • A19423-ND - J1 - Power 2-pin header
  • A19430-ND - J2 - CAN 3-pin header
  • A19436-ND - J3 - 9 pin header to joystick
  • A19520-ND - J4 - SPI connection to the MCU, 10 pin header

Misc.

  • 377-1090-ND - Box to contain the module
  • 1892K-ND - Standoffs

Electrical

Joystick Schematic.png Joystick Board.png

Port Pin Assignments on MCU

* Port A:
* Bit	Dir	Description
* 0	I	Pad DATA
* 1	O	Pad COMMAND
* 2	O	Pad ATT
* 3	O	Pad CLOCK
* 4	I	Pad ACK
* 5		Unused
* 6		Unused
* 7	O	Status LED

* Port B:
* Bit	Dir	Description
* 0	I	SPI data input, with pull-up
* 1	O	SPI data output
* 2	O	SPI clock
* 3	O	CAN /CS
* 4	I	Clock, not usable as I/O
* 5		Unused
* 6	I	CAN INT
* 7	I	/RESET, not usable as I/O
	

Code

C Source Files

  • can.c - communicates with the CAN controller, pretty much the same for all modules
  • joystick.c - code that controls the joystick's inputs
  • Makefile - programmer created file for configuring the compilation for gcc
  • psx.c - code that interfaces with the psx controller
  • spi_usi - hardware based spi