2

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 Aug 9 '16 at 3:38
  • Haven't looked into V-USB yet. If it fits, I'm fine with that. – Matt Borja Aug 9 '16 at 3:39
  • @IgnacioVazquez-Abrams So is this what we're talking about? codeandlife.com/2012/02/22/… – Matt Borja Aug 9 '16 at 4:02
  • That article is badly out of date, but yes. – Ignacio Vazquez-Abrams Aug 9 '16 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 Sep 8 '16 at 10:53
1

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 :)

| improve this answer | |
  • Keep us updated on how it works out, please. Regards, – Michael Vincent Sep 8 '16 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 Sep 8 '16 at 15:46
0

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!

| improve this answer | |
0

need to come up with a way to communicate with it from a PC

would be difficult to make an uart out of usi?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.