I am trying to find a way to communicate with usb port to which a microcontroller has been connected.
can anyone help me how i can?
i am using atmega328
actually i dont have a serial port in my pc
so i want o connect atmega328 to pc via usp port
and then i dont know how to communicate with it using windows/linux
- - - Updated - - -
actually i dont have a serial port in my pc
so i want o connect atmega328 to pc via usp port
and then i dont know how to communicate with it using windows/linux
I'm still not clear of what you are asking, is it a USB bootloader similar to arduino or are you asking for the actual arduino bootloader
If thew question is about arduino you can find all relevant info https://www.arduino.cc/
if not check https://www.obdev.at/products/vusb/usbasploader.html but note that you will need a programmer to program the bootloader to the AVR in both cases
i mean that i can connect a atmega328 to pc via usb cable
but i dont know how to access or read the data trasmitted from the microcontroller from the pc
is it possible to do so using c language?
You can either implement V-USB which Alex suggested in reply #2, which is a firmware/software based USB implementation.
Or you can utilize a USB to Serial Bridge chipset like the FT232R which interfaces directly to the AVRs UART.
In either case the USB can implement a CDC device class which appears as Virtual COM Port on the PC, allowing legacy applications which support RS-232 serial port interfacing.
did you mean that you are gonna communicated your microcontroller w/ PC? if the case like that its plenty ways i.e. you can use usb to ttl(simple one) or ou can use rs232 interfaced with db9.. how it works? just google it CMIIW