Have an AES-128 implementation I'd like to install on an ATTiny85 for embedded use but need to come up with a way to communicate with it from a PC as you would do via Serial on Arduino Uno. For example, I'd like to stream 16 bytes of plaintext and get back 16 bytes of ciphertext (or signature hash, etc.).
The faster the transfer rate, the better obviously, but it would of course need to fit on the remaining space on an ATTiny85.
Any thoughts or working examples out there (i.e. I2C for PC, etc.) without incurring a lot of extra hardware cost?
-
Is there any reason why V-USB isn't an option?Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2016年08月09日 03:38:35 +00:00Commented Aug 9, 2016 at 3:38
-
Haven't looked into V-USB yet. If it fits, I'm fine with that.Matt Borja– Matt Borja2016年08月09日 03:39:54 +00:00Commented Aug 9, 2016 at 3:39
-
@IgnacioVazquez-Abrams So is this what we're talking about? codeandlife.com/2012/02/22/…Matt Borja– Matt Borja2016年08月09日 04:02:21 +00:00Commented Aug 9, 2016 at 4:02
-
That article is badly out of date, but yes.Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2016年08月09日 04:12:35 +00:00Commented Aug 9, 2016 at 4:12
-
It might seem a little old fashioned, but a software implementation of an RS-232 type link could work for you. It might be easier than V-USB and require less resources on the AVR. I think that's the way I would go. Regards,Michael Vincent– Michael Vincent2016年09月08日 10:53:16 +00:00Commented Sep 8, 2016 at 10:53
3 Answers 3
So thanks to Ignacio Vazquez-Abrams' tip, it looks like I'll be able to accomplish this with V-USB:
V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip.
Requirements: AVR microcontroller with at least 2 kB of Flash memory, 128 bytes RAM and a clock rate of at least 12 MHz.
Taken from ATTiny85's Datasheet:
- 8K Bytes of In-System Programmable Program Memory Flash
- 512 Bytes In-System Programmable EEPROM (enough for third-two 16-byte keys)
- 512 Bytes Internal SRAM
Looking forward to trying it out :)
-
Keep us updated on how it works out, please. Regards,Michael Vincent– Michael Vincent2016年09月08日 10:48:30 +00:00Commented Sep 8, 2016 at 10:48
-
Haven't had a chance to implement this yet, but I might also look at your RS-232 recommendation. Ah, reminds me of my very first electronics project: the 4ドル.00 serial link for my Ti-83+.Matt Borja– Matt Borja2016年09月08日 15:46:18 +00:00Commented Sep 8, 2016 at 15:46
Any thoughts or working examples out there (i.e. I2C for PC, etc.) without incurring a lot of extra hardware cost?
Yet another alternative is to use the Display Data Channel (DDC) on the PC. This is 5V and I2C. Unfortunately not all PC video boards support I2C. Please see the reference for further details.
I2C is supported on ATtiny by the USI module.
Cheers!
need to come up with a way to communicate with it from a PC
would be difficult to make an uart out of usi?