Hello there,
I have a question. Is it possible to connect Adafruit Trinket Pro to an OTG USB 2.0 Micro Card Reader instead of using SD card shield? or to connect a US stick through OTG micro USB cable? or micro USB OTG cable to connect USB stick?
Hello there,
I have a question. Is it possible to connect Adafruit Trinket Pro to an OTG USB 2.0 Micro Card Reader instead of using SD card shield? or to connect a US stick through OTG micro USB cable? or micro USB OTG cable to connect USB stick?
No, no and no.
The Trinket's CPU, the attiny85, does not support USB communication.
You want the 3.3 volt Trintet and the sd card breakout. If you have a 5 volt Trinket, make sure your SD card breakout has a level translator to the proper 3.3 v level required by the card. Beware of the cheap Chinese cards that use resistive voltage dividers to shift the voltage range rather than a proper level shifting ic. The resistive divider method doesn't work at the high speed supported by the higher density cards. Here's a proper SD breakout board.
Actually, the Trinket Pro has an ATmega328P MCU, not an ATtiny85.
And the USB connection is handled by the ATmega, so it does, in a sense, support USB.
But the answer remains the same. It's going to be extremely hard to use that USB port as a USB host port. The ATmega328P simply wasn't designed for USB applications, I doubt it even supports USB 2.0. You'll need to write a driver for the card reader as well.
You can still use a normal SD card in SPI mode, though, like avr_fred suggested.
Do you want to build a data logger? Or what are you going to do with the SD card?
Pieter
avr_fred:
No, no and no.The Trinket's CPU, the attiny85, does not support USB communication.
You want the 3.3 volt Trintet and the sd card breakout. If you have a 5 volt Trinket, make sure your SD card breakout has a level translator to the proper 3.3 v level required by the card. Beware of the cheap Chinese cards that use resistive voltage dividers to shift the voltage range rather than a proper level shifting ic. The resistive divider method doesn't work at the high speed supported by the higher density cards. Here's a proper SD breakout board.
I am using Trinket Pro 3v 12Mhz. I guess it will work with SD card breakout board you have suggested. Or do I need a Trinket Pro 5v 16MHz?
PieterP:
Actually, the Trinket Pro has an ATmega328P MCU, not an ATtiny85.
And the USB connection is handled by the ATmega, so it does, in a sense, support USB.
But the answer remains the same. It's going to be extremely hard to use that USB port as a USB host port. The ATmega328P simply wasn't designed for USB applications, I doubt it even supports USB 2.0. You'll need to write a driver for the card reader as well.You can still use a normal SD card in SPI mode, though, like avr_fred suggested.
Do you want to build a data logger? Or what are you going to do with the SD card?
Pieter
No, I am not building a data logger. Actually, I am trying to build something which can play songs/melodies once the switch is pressed and it should play it in a random order.
I have no knowledge of how to read from sheet music notes and if I start learning it, it will take much more time than I ever imagined. Furthermore, I have tried to put some notes available on the internet but not all are working. So I have moved to midi files, but I didn't find the songs I am trying to put. So, I have learned how to convert an audio or a video into midi files but it didn't work as well as I thought.
I am using a piezo buzzer but I think a speaker might help me in a better way. And using SD card, I can store and play whatever song I want to so I don't need to worry about conversion or notes or anything.
Correct me if I am wrong. And I am learning how to code Arduino as I am doing it for the first time.