How to read the Atmega's output on the computer

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

So I just took the step from the Arduino, to a standalone Atmega8. I am having an absolute hoot so far.

One thing I am missing, though, is the serial display from the Arduino. I could interface sensors and peripherals and visually see their output by running a Putty terminal on the COM port of the arduino, or simply through the serial print display in the Arduino IDE it self.

What are my options to accomplish a similar task on my atmega chip?

In case it matters, I am utilizing the USBasp programmer.

Many thanks, everyone.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Mega's UART + MAX3232 -> PC COM port or USB-to-serial adapter. Or Mega's UART + FT232R -> PC USB port.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1) put a MAX232 next to the AVR and then get a $3 USB-RS232 cable from ebay. In fact that cable contains the equivalent of the FTDI you find on an Arduino board

2) put an FTDI FT232R next to the AVR and run a USB cable direct to the PC. This is almost exactly the same as you have now with the Arudino.

3) why not simply use the Arduino anyway - nothing says you have to use it with the Arduino software. You can write "normal" C just as you are doing with the mega8 then use avrdude to upload it into the Arduino chip.

If you hunt around a bit you will find schematics for "cheap" AVR development boards that don't go to the expense/complexity of using a MAX232 (as in (1)) but do the level inversion/voltage change/protection using a couple of transistors. But to be honest I'd just pick up some MAX232's and a handful of capacitors to go with them.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks guys. MBedder, I think you meant MAX232 right?

Anyways, I think I will go the MAX232 route then. It seems cheapest, since I already have a USB-RS232 cable on its way. I'll put in an order for a few MAX232s asap.

As for clawson's option #3, that sounds like a pretty cool idea actually. It just seems a little annoying to keep it around always, but sounds like a cool temporary solution.

I'll look into the MAX232 solution more, but what capacitors do you recommend I get? I have a random assortment of them, and a few packs of 10x 100, 10, and 0.1 uf caps.

Thanks again.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

but what capacitors do you recommend I get?

Exactly the ones it tells you to in the datasheet. For the standard MAX232 that would be 1.0uF electrolytics. For the MAX232A you can use 0.1uF (which is the appeal of it).

MAX3232 can operate across the wider range of 3.3V to 5.0V

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that there are many second sources of the MAX232, like from TI, Exar, AD, ST and Intersil that are quite a bit cheaper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the info!