Hello,
I have two ATmega328 microcontrollers and I want to connect one directly to my PC (using USB) and use it like a USB driver (Like ATMEL MEGA16U2 works in Arduino Uno) and I want to connect it to a second microcontroller so it will receive all data that I will send using PC. How to do this?
thank you Mark for replying.
So I can't program atmega328 (Like Atmel MEGA16U2 is programmed as usb driver for arduino uno or any other usb driver microchip) so I could use two pins of Atmega328 as USB Data pins, and use it as usb driver which will be connected to second atmega328?
Gigi10012:
thank you Mark for replying.
So I can't program atmega328 (Like Atmel MEGA16U2 is programmed as usb driver for arduino uno or any other usb driver microchip) so I could use two pins of Atmega328 as USB Data pins, and use it as usb driver which will be connected to second atmega328?
Yes, but you will most likely lose the arduino IDE automatic reset function and will have to use the 'well timed manual reset' method to upload to the second arduino. The first arduino should have a jumper from ground to reset so that it can't interfere with the serial data pins. Then wiring between the two arduino is pins D0-D0, D1-D1, ground-ground pin and 5V to 5V pins.
Added note: If you remove the avr chip from the first arduino and don't connect reset to ground then add a reset to reset wire between the two arduinos the auto-reset function should still function for the second arduino.
Umm, I might have to retract that - ATtiny25 has no UART, so you'd have to monitor with Software Serial.
I don't if Software Serial runs on a '25 - might need a '45 or '85 to have enough code space.
I have found how to use V-USB on attiny25 (Fun with ATtiny and V-USB | fabiobaltieri) but it's not on 'arduino language (its not on Arduino IDE)'. So how to do this using arduino IDE?