choosing microcontroller & using Serial Communication

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

Hi,

I am new to microcontrollers and need help deciding which one to use.

The microcontroller needs to be able to generate PWM signals, A->D conversion, accept data from a rotary encoder (servo motor) in quadrature format, and be able to communicate through serial with a PC.

I was looking at the ATtiny26 however I am confused about the Universal Serial Interface... Is this directly compatible with a PC serial connection or do I need an additional dedicated chip with Serial Communication Interfaces (e.g. the AT80251G2D) to interface with the PC?

Any help would be greatly appreciated.

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

Unless you really need a special feature of the Tiny26 (high speed PWM?) I'm partial to Mega8/48/88 familys for a bunch of subsystems and resources at a great price. More directly, it has U(S)ART vs, USI. Some have been successful with USI, but others have had a frustrating time.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

I'd recommend the same as theusch. Once you have an avr that has U(S)ART, the only thing you need to set up an RS232 connection to a PC is a max232 chip with a few caps. There is many reference circuits out there for these sort of setups..
the link below is for a mega16 serial port config and its all you need to talk to a PC.
http://www.captain.at/electronic...

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

I think I will give the ATmega8 a go. Thanks for the help.

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

Another choice:
USB interface to connect to your PC,the chip is CH375A/V(DIP28/SOIC28).

Either host mode or device mode.

REF.:http://wch.cn

Datasheet:
http://wch.cn/download/list.asp?...

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

Daniel_2007 wrote:
I think I will give the ATmega8 a go. Thanks for the help.

Be warned the Mega8, unlike the Mega88 does not have an OCD interface so you cannot use DebugWire to debug it like you can with the more modern Mega88

Like Lee and zarmi82 I'd recommend the Mega88. That way, if you can get the code smaller you can later trade down to a Mega48 or, if it bloats up a bit you can step up to the Mega168

Cliff