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

Attiny84 Keyboard #1

Open
Soumojit28 opened this issue Aug 18, 2020 · 7 comments
Open

Attiny84 Keyboard #1

Soumojit28 opened this issue Aug 18, 2020 · 7 comments

Comments

@Soumojit28
Copy link

Can you help me how can I use this with attiny84 to act as a keyboard?

@zaher
Copy link
Member

zaher commented Aug 18, 2020

follow this project it is based on another one with improvements, it is IR project but you can modify it to send keyboards

https://github.com/parmaja/usbIRConsumer

@Soumojit28
Copy link
Author

Thanks for the quick answer, I have some more questions as I am using an attiny84 is it require an external 16Mhz crystal to communicate with the usb? and need a bit more help with the schematics, which pins on attiny84 should connect to usb?

@zaher
Copy link
Member

zaher commented Aug 18, 2020

look at this project https://nathan.chantrell.net/20121014/tinypcremote-an-attiny85-based-infrared-pc-remote-control/
you can remove the part of IR reciever, and keep attiny send keyboard message by adding push button for example

@Soumojit28
Copy link
Author

Yup, I sawed it, but the thing is will this stays the same for an attiny84, and any ideas if I need an external crystal for it?

@zaher
Copy link
Member

zaher commented Aug 18, 2020

just add it, look at this schema, i used external crustal 20 for my project

https://www.avrfreaks.net/forum/implement-usb-device-attiny85

@Soumojit28
Copy link
Author

Soumojit28 commented Aug 19, 2020

So tried it, added a 16Mhz crystal in attiny84, its working with the crystal, modified the usbconfig.h like this

``/* This is the port where the USB bus is connected. When you configure it to

  • "B", the registers PORTB, PINB and DDRB will be used.
    /
    #define USB_CFG_DMINUS_BIT 1
    /
    This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
  • This may be any bit in the port.
    /
    #define USB_CFG_DPLUS_BIT 2
    /
    This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
  • This may be any bit in the port. Please note that D+ must also be connected
  • to interrupt pin INT0! [You can also use other interrupts, see section
  • "Optional MCU Description" below, or you can connect D- to the interrupt, as
  • it is required if you use the USB_COUNT_SOF feature. If you use D- for the
  • interrupt, the USB interrupt will also be triggered at Start-Of-Frame
  • markers every millisecond.]
    */
    #define USB_CFG_CLOCK_KHZ 16000``

Compiled the example sketch in the library and uploaded the code but getting Unknown USB Device (Device Descriptor Failed) in the device manager. any ideas whats wrong here?

@zaher
Copy link
Member

zaher commented Aug 19, 2020

I can not help you, because it is not my main job, it is just hobby project.

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