1
\$\begingroup\$

I have a high interest in learning such an USART, UART, RS232, USB, SPI, I2C, TTL communication. I find some detail explainations about above communications in this link

And I want to have deep understanding about that by learning it using microcontroller. There are many types of microcontroller nowadays. And I am very confused which one should I choose to learn that, since I am a newbie in microcontroller.

But I find this link and I think that this arduino starter kit would be enough for me to learn above protocol communications. Am I right? is there any cheaper one? If it is not, please recommend me the right one.

Also, are there any good reference to learn above protocols communications?

Thanks before in advance.

\$\endgroup\$

closed as primarily opinion-based by Leon Heller, Dave Tweed, Olin Lathrop, PeterJ, Nick Alexeev Jul 25 '13 at 17:13

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ For all of those except USB, Arduino should be fine, and Google as a learning resource. USB is signifigantly more complicated. \$\endgroup\$ – pjc50 Jul 25 '13 at 10:41
  • \$\begingroup\$ @pjc50 : maybe USB is next stage learning? \$\endgroup\$ – kalingga Jul 25 '13 at 10:54
  • \$\begingroup\$ One problem with a question like this is you could ask 10 people and get 10 different (valid) answers. The above looks OK for a start but one obvious thing is it doesn't have any devices to talk to. You'd probably want a TTL to RS232 adapter and a few SPI/I2C devices like memory / temperature sensors / whatever sounds interesting. It's probably worth thinking about a few 'real world' projects you might find interesting and see what parts would be useful. \$\endgroup\$ – PeterJ Jul 25 '13 at 12:08
  • 2
    \$\begingroup\$ The PIC 18F2550 has everything you asked for. \$\endgroup\$ – Olin Lathrop Jul 25 '13 at 12:44
  • 1
    \$\begingroup\$ Thread on how to choose microcontroller (μC) platform. All the communication buses mentioned in the O.P. are available on many μC. Many to choose from. If you want to gain in-depth understanding, stay away from Arduino. \$\endgroup\$ – Nick Alexeev Jul 25 '13 at 17:16
3
\$\begingroup\$

I feel as though the problem you are experiencing is that you are not sure where to start, and you need some help in accomplishing the necessary research yourself so you can teach yourself these protocols you've listed.

To me, it appears there are three steps to understand a relatively simple protocol (simple relative to protocols like Bluetooth) well and implement it into MCUs. I'm going to be generic here but I'll try to point you in some good directions the best I can so you can get started on your own research.

1: Learn the Protocol

Read about the protocol on a lower level; what signals are involved, the logic, timing requirements, how the data is transferred, etc. For instance, this appears to be a great article on teaching yourself how UART works on a low-level:

Cytron's UART Tutorial.

Find articles like this for all the protocols and really understand what is happening at the pins of a MCU.

2: Research Datasheets on MCUs

Find a MCU that will support this protocol and read the datasheet. Digikey is a great tool for finding MCUs and the datasheets associated with them. For example (I'm an AVR person myself), I'll choose the ever pervasive ATmega328p. Searching for this in Digikey yields the various packages for this chip. I'll choose DIP (ATmega328p DIP).

Here you can open the datasheet for the MCU. In section 20, the datasheet discusses its USART HW (you can configure it to behave Asynchronously to become simple UART). This is where you will have to take your time and research how to set the various registers to configure the UART, and how to interface to the HW in general.

Look at the HW design of the protocol itself:

enter image description here

The HW pieces in bold, e.g. UBRRn, UDRn, UCSRnA, UCSRnB and UCSRnC are registers that you interface to in order to use the USART HW. For instance, you can use the register UCSRnC to control whether or not the USART functions Synchronously or Asynchronously!

3: Actually Implement It

Grab the MCU of your choosing, build a power supply circuit and actually use it! Or, much more conveniently, interface to the registers yourself with Arduino; Arduino actually uses the ATmega328p by the way. Using Arduino out of the box with its high level functions is not going to teach you the protocol involved. But actually messing with the registers in the lower level, you'll actually begin to understand the nuances and the intricacies involved.

Yes, it is a lot of work, but it is rewarding; it also teaches you invaluable skills along the way which are useful in EE.

TL;DR: Read a lot

Best of luck.

\$\endgroup\$
  • \$\begingroup\$ it is unfortunate this is closed, I think the OP was where I was a while ago. You see there are docs and diagrams etc, but you need some real hardware and something specific hardware +tutorial that one can follow along. The last option I'm now exploring minix3 and seeing how their support for these protocols are written, since minix3 isn't very large. overall there is a big mental model shift for (like me)a programmer to move to writing code for some real things \$\endgroup\$ – gideon Nov 29 '17 at 20:19
  • \$\begingroup\$ one excellent way would be something for an arduino or the raspberry pi and a guide that elks one through writing a simple SPI driver... so far I havn't found anything like this. \$\endgroup\$ – gideon Nov 29 '17 at 20:23
2
\$\begingroup\$

The problem is that each family / brand of micros are different in the way they operate, each programming language is different too, and sometimes you may have to do things differently for different tasks.

So, there is no right answer - for learning the basic principles, almost any micro with a reasonable development kit / environment will do. However, if you have some specific thing in mind, such as learning how to program Atmel micros in C, then you would be better off starting down that road.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.