I have a TI86 calculator that I've had for over 7 years now. Well I'm letting a lady friend on mine borrow it, and I was going to load it up with some apps for her. And the tradeoff is happening this weekend. So I figured, "hey, let's just build a cable really quick". Well I got going down the rabbit hole and since I don't have a serial or parallel port anymore, I'd need a converter.

So I found an AVR USB to Serial converter schematic (which I'm sure ya'll are really familiar with) here:AVR USB to Serial Converter

Couple things:
1. I don't have a straight ATMega8\48\88 around. I only have the 48A-MU\PU, 88A-MU\PU, and the 324P-20PU (which is my favorite) and 328P-PU (Second favorite) immediately available. Without sounding too dumb, am I correct in assuming with the exception of the 324P, the other AVR's I have are compatible? I've used a 328P before for some stuff for the 88 since according to the datasheet it's more or less the same chip, just different grades of it.
2. I only have a 16 Mhz and 20 Mhz crystal. Would it be disastrous if I used those instead, or do I need to modify the code to be safe?

And then last question on this schematic: TI Serial Link

  1. If I had 3.6V and 5.1V Zeners, could I make them work? Is there an alternative if not? Zeners aren't something I use, so they're also a mystery to me sometimes too.

So like I said, silly questions. But I'd rather ask before I go wasting my chips and parts, you know?

Gracias, my friends.

  • \$\begingroup\$ The clock for USB needs to be pretty accurate and the crystal frequency has to match the code closely. V-USB does have an all software implementation though where the internal RC oscillator is calibrated to 16.5 MHz. For V-USB to work you need the 64 MHz PLL in the AVR, a device without PLL won't work. Beware that the signals on the USB data lines are 3.5V or so, certainly not 5V. \$\endgroup\$ – jippie Feb 20 '15 at 6:35
  • \$\begingroup\$ Oh that makes much more sense why the Zeners are 3.6. You can tell how much I work with USB ;) So then I can't use a prescaler in code to set the frequency at 12mhz if I'm using like a 16mhz crystal? I've read about using flip flops as dividers. I've also discovered how to create a clock with a second AVR. I'd assume I could output a 12mhz signal on one of the pins with a simple Do\Loop? \$\endgroup\$ – Dominic Luciano Feb 22 '15 at 5:14
  • \$\begingroup\$ When using V-USB I'd opt for the software calibrated internal RC oscillator. AVR's are too slow to generate a 12 MHz output, as you'd need at least a 24 MHz system clock for that. AVRs are limited to 20 MHz system clock. \$\endgroup\$ – jippie Feb 22 '15 at 8:49
  • \$\begingroup\$ You mean 20mhz max? I'm aware of that bit. But it looks like I'll be working with V-USB for this project. Any other pointers to help? Schematics? I'm very visual \$\endgroup\$ – Dominic Luciano Feb 22 '15 at 16:28
  1. Yes, the various atmega parts are likely to be compatible for this particular application. V-USB does not use many internal resources.

  2. V-USB supports both 16MHz and 20MHz crystals. You will have to modify the circuit.

  3. Are you going to use this circuit with AVR? Because you AVR circuit produces TTL-level serial data (0/5v), while "The Serial Link" circuit expects RS232-level serial data (-12/+12V). The serial link circuit uses all the zeners and resistors to convert RS232-level to a TTL-level in a special way.

So the two schematics you have posted are not compatible, unless you add another level shifter / converter (MAX232) so you can go TTL->RS232->TTL, which seems silly to me.

  • \$\begingroup\$ So I'd be far better off just using a USB-Serial converter IC? \$\endgroup\$ – Dominic Luciano Feb 23 '15 at 19:46
  • \$\begingroup\$ In schematics #1, AVR becomes USB-Serial converter IC, so a different usb-serial IC will not help. You can use USB-Serial converter "dongle" (which has 2 ICs inside: converter IC + level shifter) with schematics #2. \$\endgroup\$ – theamk Feb 23 '15 at 20:02
  • \$\begingroup\$ But if I was to do it myself, no dongle, I need a level shifter? Like a logic lever shifter? \$\endgroup\$ – Dominic Luciano Feb 24 '15 at 4:19
  • \$\begingroup\$ You will need a RS232 level shifter. Here is a common example: dragons-lair-project.com/tech/images/EuroDL/serialinterface.jpg (avr connects to the left, adapter converts on the right). It uses MAX232, and does not do RTS/DSR lines. Your schematics will need biogger converter chip like MAX236. \$\endgroup\$ – theamk Feb 24 '15 at 15:59
  • \$\begingroup\$ My my.... I'd just probably be better off buying the USB cable. Didn't think it was so complex to be honest. \$\endgroup\$ – Dominic Luciano Feb 24 '15 at 19:40

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.