I'm was able to successfully connect ATMEGA328P-PU to my USB port and using avrdude write a simple code (C language) to it. Everything is working, but the problem is that I want to attach a sensor, but am completely lost how can I 'log' the output to my computer. I could do this with Arduino tools. do I need a special bootloader? Thanks

  • \$\begingroup\$ No special bootloader needed. You just need to drive the hardware UART the same way that the Arduino tools did. All the gory register level stuff is in the ATMEGA328 book of words! \$\endgroup\$ – Neil_UK Jul 20 '16 at 13:29

The programmer you mention in your other question (the Pololu USB AVR Programmer) has a built-in USB-to-TTL adapter so you can communicate directly with the micro over UART. See: https://www.pololu.com/docs/0J36/6

enter image description here

According to the aforementioned document, your programmer should enumerate as both a programmer and a virtual com port within your OS; bytes transmitted to the virtual com port of your programmer go out the line labelled "TTL TX" in the above image, and whatever comes back from the micro is received on "TTL RX". Connecting the TX and RX lines to a UART on your micro should allow you to receive and transmit data back and forth between your computer and the micro.


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.