0

Pin03 and Pin04 differ?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Pin03 and Pin04 differ?

by muellermario on Sat Jan 19, 2019 11:18 am

Hi,

I want to use the trinket 5V for a HID. I connected 5 buttons to Pins 0 - 4

0,1,2 work correct
3 & 4 show a strange behaviour. Is there any difference with PIN 3 and 4 ?

Thanks
Regards
Mario

muellermario
 
Posts: 46
Joined: Wed Jan 27, 2016 11:53 am

Re: Pin03 and Pin04 differ?

by millercommamatt on Sat Jan 19, 2019 11:54 am


millercommamatt
 
Posts: 250
Joined: Tue Jul 31, 2018 4:57 pm

Re: Pin03 and Pin04 differ?

by muellermario on Sat Jan 19, 2019 12:01 pm

Hi millercommamatt,

many thanks for your reply. I am a newby and not very familiar with terms like SPI and I2C.
Does that mean Pin03 and Pin04 can not be used to read a buttons state?

Thanks
Regards
Mario

muellermario
 
Posts: 46
Joined: Wed Jan 27, 2016 11:53 am

Re: Pin03 and Pin04 differ?

by PeteH51 on Sun Jan 20, 2019 12:25 am

My understanding is that pins 3 and 4 are used by the USB initially. If you want to use them in your code, you should DL the code, and then remove the USB connection, powering the trinket from a battery.

See https://learn.adafruit.com/tap-tempo-tr ... gs-learned

PeteH51
 
Posts: 18
Joined: Sun Jan 06, 2019 12:04 pm

Re: Pin03 and Pin04 differ?

by adafruit_support_carter on Mon Jan 21, 2019 4:10 pm

First, we'd recommend switching to this:
https://www.adafruit.com/product/3500
since the original Trinket is being deprecated.

On the older Trinket, pins were very sparse and served multiple functions. Pins 3 and 4 are attached to the USB data lines. There are some associated resistors that can cause interference for attached hardware. See schematic:
https://learn.adafruit.com/introducing- ... atics-11-4
From the pinout page, for GPIO 3 and 4:
The best use of these pins is as outputs to things like LEDs.


There's also an LED attached to GPIO1.

adafruit_support_carter
 
Posts: 9835
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.