Feature #215

Cablear contactos de los botones a puertos digitales de entrada.

Added by Txinto Vaz about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/08/2016
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:

Description

Los botones o las posiciones de palanca de un joystick, al hacer contacto, ponen a GND (masa) su cable correspondiente. Cuando no hacen contacto lo dejan al aire.

Según vemos aquí Recopilación de conocimiento, la teensy ya dispone de pullups de entrada.
Por tanto, no necesitamos más que conectar cada uno de los cables de los contactos a una de las puertas de la Teensy.

photo668429746462369749.jpg View (202 KB) Txinto Vaz, 02/08/2016 08:52 PM

194

Related issues

Blocks TGRMach - Feature #216: Programar la detección de los contactos del Joystick. Closed 02/01/2016

History

#1 Updated by Txinto Vaz about 8 years ago

  • Estimated time changed from 3.00 h to 4.00 h

#2 Updated by Txinto Vaz about 8 years ago

Vamos a cablear estos pines los pines según éstas definiciones que usaremos en el software:

#define CFG_JOY_UP_PIN 23
#define CFG_JOY_DOWN_PIN 21
#define CFG_JOY_LEFT_PIN 22
#define CFG_JOY_RIGHT_PIN 20

#define CFG_JOY_GREENBUT_PIN 19
#define CFG_JOY_REDBUT_PIN 18
#define CFG_JOY_BLUEBUT_PIN 17
#define CFG_JOY_YELLOWBUT_PIN 16
#define CFG_JOY_GREYBUT_PIN 15
#define CFG_JOY_BLACKBUT_PIN 14
#define CFG_JOY_WHITELBUT_PIN 12
#define CFG_JOY_WHITERBUT_PIN 11
#define CFG_JOY_MODEBUT_PIN 10
#define CFG_JOY_RESTARTBUT_PIN 9
#define CFG_JOY_PLAYERBUT_PIN 8
Hemos dejado libre el pin 13 ya que está asociado a un led y nos puede ir bien para debugar en el futuro.

Los pines de la Teensy se pueden consultar aquí: https://www.pjrc.com/teensy/pinout.html

#3 Updated by Txinto Vaz about 8 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 100

#4 Updated by Txinto Vaz about 8 years ago

  • Status changed from In Progress to Resolved

#5 Updated by Txinto Vaz about 8 years ago

  • Status changed from Resolved to Closed

#6 Updated by Txinto Vaz about 8 years ago

  • Blocks Feature #216: Programar la detección de los contactos del Joystick. added

#7 Updated by Txinto Vaz about 8 years ago

194

El cableado puede verse aquí:

#8 Updated by Txinto Vaz about 8 years ago

Recableamos según nueva configuración de pines, ver diferencias en e5584f46

Nuevos pines:

/**** Pin assigment section ****/
#define CFG_POWERGND_PIN 2 // anteriormente 2

#define CFG_JOY_UP_PIN 23 // anteriormente 23
#define CFG_JOY_DOWN_PIN 21 // anteriormente 21
#define CFG_JOY_LEFT_PIN 22 // anteriormente 22
#define CFG_JOY_RIGHT_PIN 20 // anteriormente 20

#define CFG_JOY_GREENBUT_PIN 19// anteriormente 19
#define CFG_JOY_REDBUT_PIN 18 // anteriormente 18
#define CFG_JOY_BLUEBUT_PIN 17 // anteriormente 17
#define CFG_JOY_YELLOWBUT_PIN 16 // anteriormente 16
#define CFG_JOY_GREYBUT_PIN 15 // anteriormente 15
#define CFG_JOY_BLACKBUT_PIN 14 // anteriormente 14
#define CFG_JOY_WHITELBUT_PIN 29 // anteriormente 12
#define CFG_JOY_WHITERBUT_PIN 30 // anteriormente 11
#define CFG_JOY_MODEBUT_PIN 31 // anteriormente 10
#define CFG_JOY_RESTARTBUT_PIN 32 // anteriormente 9
#define CFG_JOY_PLAYERBUT_PIN 33 // anteriormente 8

/**** ATARI norm output ****/
#define CFG_ATARI_PIN_1 9 // anteriormente 7  // MSX FW // AZUL 1er conector
#define CFG_ATARI_PIN_2 8 // anteriormente 6  // MSX BACK // VERDE 1er conector
#define CFG_ATARI_PIN_3 7 // anteriormente 5  // MSX LEFT // AMARILLO 1er conector
#define CFG_ATARI_PIN_4 6 // anteriormente 4  // MSX RIGHT // BLANCO 1er conector
#define CFG_ATARI_PIN_5 5 // anteriormente NC // MSX +5v // ROJO 1er conector
#define CFG_ATARI_PIN_6 12 // anteriormente 3  // MSX TRG1 // AZUL 2o conector
#define CFG_ATARI_PIN_7 11 // anteriormente 1  // MSX TRG2 // VERDE 2o conector
#define CFG_ATARI_PIN_8 10 // anteriormente 0  // MSX OUT // AMARILLO 2o conector
#define CFG_ATARI_PIN_9 4 // anteriormente NC // MSX GND // NEGRO 1er conector
#define CFG_ATARI_PIN_9 4 // anteriormente NC // MSX GND // NEGRO 1er conector

Also available in: Atom PDF