Browse Source

ps2_usb: Fix pin configuration

exp
Jun Wako 9 years ago
parent
commit
6014d1014e
3 changed files with 6 additions and 6 deletions
  1. 2
    2
      converter/ps2_usb/Makefile
  2. 1
    1
      converter/ps2_usb/README.md
  3. 3
    3
      converter/ps2_usb/config.h

+ 2
- 2
converter/ps2_usb/Makefile View File



# PS/2 Options # PS/2 Options
# #
PS2_USE_USART = yes # uses hardware USART engine for PS/2 signal receive(recomened)
#PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin
#PS2_USE_USART = yes # uses hardware USART engine for PS/2 signal receive(recomened)
PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin
#PS2_USE_BUSYWAIT = yes # uses primitive reference code #PS2_USE_BUSYWAIT = yes # uses primitive reference code





+ 1
- 1
converter/ps2_usb/README.md View File

- **USART**: **Clock** is on `PD5` and **Data** on `PD2`. - **USART**: **Clock** is on `PD5` and **Data** on `PD2`.
3. Optionally you need pull-up resistor. 1K-10K Ohm is OK. 3. Optionally you need pull-up resistor. 1K-10K Ohm is OK.


To change pin configuration edit config.h.
To change pin configuration edit **config.h** and **Makefile**.




Build Firmware Build Firmware

+ 3
- 3
converter/ps2_usb/config.h View File

#define PS2_CLOCK_PORT PORTD #define PS2_CLOCK_PORT PORTD
#define PS2_CLOCK_PIN PIND #define PS2_CLOCK_PIN PIND
#define PS2_CLOCK_DDR DDRD #define PS2_CLOCK_DDR DDRD
#define PS2_CLOCK_BIT 5
#define PS2_CLOCK_BIT 1
#define PS2_DATA_PORT PORTD #define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND #define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD #define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 2
#define PS2_DATA_BIT 0
#endif #endif


/* /*
#define PS2_DATA_PORT PORTD #define PS2_DATA_PORT PORTD
#define PS2_DATA_PIN PIND #define PS2_DATA_PIN PIND
#define PS2_DATA_DDR DDRD #define PS2_DATA_DDR DDRD
#define PS2_DATA_BIT 2
#define PS2_DATA_BIT 0
#define PS2_INT_INIT() do { \ #define PS2_INT_INIT() do { \
EICRA |= ((1<<ISC11) | \ EICRA |= ((1<<ISC11) | \
(0<<ISC10)); \ (0<<ISC10)); \