Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change wireless keyboard #1

Open
youxiaojie opened this issue Jan 10, 2019 · 10 comments
Open

change wireless keyboard #1

youxiaojie opened this issue Jan 10, 2019 · 10 comments

Comments

@youxiaojie
Copy link

can I modify this code to convert spi protocol to USB keyboard mouse and make a wireless connections use nrf24l01?

@robszy
Copy link
Owner

robszy commented Jan 10, 2019 via email

@youxiaojie
Copy link
Author

certainly. I see there's sources of nrf24l01 chip to transfer data by spi, so i hope to modify your source code to use this. firstly use a transmiter (arduino eg atmega328p) to translate scancode to spi and then receiver (arduino /teensy atmega32u4) to do the following this eventually translate ps/2 keyboard's scancode to hid code. do you think is it feasible?

I want to experiment by conncet two arduino by spi wire first, if ok add wireless code. is it feasible?
thank you.
and another question, is your converter single direction or bi-direction? could the keyboard receive the command from host?
thank you again.

@youxiaojie
Copy link
Author

youxiaojie commented Jan 11, 2019

Aim of this project is to make usable (not like translators on the market :) ) translator for keyboard and mouse which uses ps2 interface to connect them to new PC's which have only usb ports.

firstly what does this sentence mean? what is the different between yours and market's converter/ translator?
and secondly it seem like your converter realize the usb protocol by programming? am i right? I see your code is more complex than others eg tmk which used atmega32u4 and pjrc's ps/2 routine usually.
V-USB Support

With V-USB you can use this converter on ATmega(168/328) but it doesn't support NKRO at this time.

Circuit:

                +---+   +---------------+
USB            GND  |   |   ATmega168   |
===                 C3  |               |
5V <-------+--------+---|Vcc,AVCC       |        PS/2
           R1           |               |        ====
D- <----+--+-----R2-----|INT1        RXD|------->DATA
D+ <----|---+----R3-----|INT0        XCK|------->CLOCK
        Z1  Z2          |               |      ->5V
GND<----+---+--+--+-----|GND            |      ->GND
               |  |     |               |
               |  C2-+--|XTAL1          |
               |     X1 |               |
               +--C3-+--|XTAL2          |
                        +---------------+
R1:     1.5K Ohm
R2,R3:  68 Ohm
Z1,Z2:  Zenner 3.6V
C1,C2:  22pF
C3:     0.1uF
X1:     Crystal 20MHz(16MHz/12MHz)

is it your way to deal with ps/2 signal by atmega 328?

@robszy
Copy link
Owner

robszy commented Jan 18, 2019 via email

@robszy
Copy link
Owner

robszy commented Jan 18, 2019 via email

@youxiaojie
Copy link
Author

youxiaojie commented Jan 27, 2019

thanks after I read source code of lots of PS/2 USB converter I decide transfer USB HID. among these projects 1yours 2 nsd20463/ps2_kbd_to_usb_adapter#3
3 tmk is preferred, others are based in arduino majorly, thanks for advice very much. thanks for your patience to instruct me.

@youxiaojie
Copy link
Author

what is this means?
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
is it a pointer?for a simplified example int p[][3][4] means?

@robszy
Copy link
Owner

robszy commented Jan 28, 2019 via email

@youxiaojie
Copy link
Author

my dear friend and teacher,
build with atmel studio 7,some errors in keyboard.c,
some is
Severity Code Description Project File Line
Error 'odDebugInit' undeclared (first use in this function) ps2usb K:\ps2usb-master\ps2usb\src\keyboard.c 159
Severity Code Description Project File Line
Error macro "odDebugInit" passed 1 arguments, but takes just 0 ps2usb K:\ps2usb-master\ps2usb\src\keyboard.c 159
Severity Code Description Project File Line
Error implicit declaration of function 'waitForEnd' [-Werror=implicit-function-declaration] ps2usb K:\ps2usb-master\ps2usb\src\keyboard.c 178

why the new errors appear?

Severity Code Description Project File Line
Error implicit declaration of function 'cli' [-Werror=implicit-function-declaration] ps2usb K:\ps2usb-master\ps2usb\src\keyboard.c 117
Error implicit declaration of function '_delay_ms' [-Werror=implicit-function-declaration] ps2usb K:\ps2usb-master\ps2usb\src\keyboard.c 127
Error implicit declaration of function 'sei' [-Werror=implicit-function-declaration] ps2usb K:\ps2usb-master\ps2usb\src\keyboard.c 134
this three errors I correct it by adding #include delay.h and interrupt.h.
and the left, I have no way and have to ask you

the last question, can you remember what is the pin connexion of two ps/2 and usb?
thanks again

@robszy
Copy link
Owner

robszy commented Feb 5, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants