Author Topic: Learning about microcontrollers  (Read 3097 times)

0 Members and 1 Guest are viewing this topic.

Offline Randall W. LottTopic starter

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
Learning about microcontrollers
« on: March 22, 2012, 08:41:15 pm »
Are there any good resources online regarding how to use microcontrollers with perepherals such as; LCDs, Ethernet, USB, and wireless technologies?

I have experience with the Motorolla 68HC11.  I understand its registers and respective assembly language.  Granted, it may be older than me!

I own an Arduino Duemilanove and I understand C++.

My goal is to use a single chip to communicate with my PC and update a database given conditions presented on the PCB.

Thank you.
- Randy
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Learning about microcontrollers
« Reply #1 on: March 22, 2012, 08:49:33 pm »
I think the arduino website is a good starting point. http://arduino.cc/en/Tutorial/HomePage

There are lots and lots of tutorials and websites that deal with stuff you mentioned but you could be a bit more specific. Like "LCDs" contains everything from using HD44780 -based text-LCDs to graphical color LCDs with high-speed data buses which are quite a bit different kind of beasts. Wireless technologies contain everything from bluetooth and wifi to simple radiolinks.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline kd7eir

  • Contributor
  • Posts: 27
  • Country: us
Re: Learning about microcontrollers
« Reply #2 on: March 23, 2012, 03:10:03 am »
I have found that a Google search for arduino + (insert device here) will return more hits than enough information.
 

Offline ChrisW

  • Contributor
  • Posts: 43
Re: Learning about microcontrollers
« Reply #3 on: March 23, 2012, 05:40:19 am »
LCD's



Wireless



-Chris
« Last Edit: March 23, 2012, 05:46:20 am by ChrisW »
 

Offline Randall W. LottTopic starter

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
Re: Learning about microcontrollers
« Reply #4 on: March 23, 2012, 06:58:08 am »
Thank you.  I'll start there.

I've googled UART, ISP, I2C, and such.  I still only understand serial and parallel as black and white.  From my understanding, UART is a serial bus that sends and receives through shift-registers?  The data would need to be temporarily stored due to its asynchronous nature.

When a device claims to have "serial I/O", does it mean that it will always work with UART as long as the logic levels and baudrates match?  Some products, such as sensor modules, only mention "serial" and don't claim it to be synchronous or not.  This is confusing to me.

I've studied digital electronics up to state machines, multiplexers, shift registers, programmable logic, counters, flip-flops, and decoders.
- Randy
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Learning about microcontrollers
« Reply #5 on: March 23, 2012, 07:36:31 am »
I've googled UART, ISP, I2C, and such.  I still only understand serial and parallel as black and white.  From my understanding, UART is a serial bus that sends and receives through shift-registers?


No, UART, or USART, as it is named in the AVR, is a piece of hardware for driving a class of serial buses, the RS232 bus being the most prominent. In case of the AVR the U(S)ART is build into the AVR. While in the old days it was a separate IC. This article http://en.wikibooks.org/wiki/Serial_Programming/Typical_RS232_Hardware_Configuration explains the principles. The article is not AVR specific.

The presence of a UART in some setup typically indicates you can at least do RS232, maybe other similar buses, too. But as you can see in the mentioned article, having a UART is not enough. While the other stuff, baud rate generator and the like, is e.g. build into an AVR, the required level converter is not.

Quote
The data would need to be temporarily stored due to its asynchronous nature.

Synch and asynch just describe where the clock for the bus is derived from.  Synch means the partners in the communication are synchronized via a separate clock signal. Asynch means they synchronise each other from the data signal.

It is not the asynchronous nature that requires the storage. It is the serial one, the need to convert a piece of data, a byte, into a series of bits, to be send over the serial bus one after the other.  Because you send the bits one after the other, and not all at once, you need to keep (store) the bits until it is their time to be sent.

Quote
When a device claims to have "serial I/O", does it mean that it will always work with UART as long as the logic levels and baudrates match?

No, "serial I/O" is a generic term. It can mean all sorts of serial buses, protocols and voltage levels. You have to derive from the context if they are talking about a specific bus, e.g. often they mean RS232, but maybe with TTL level only, or they mean SPI, or I2C or whatnot if they just talk about general capabilities.

Quote
Some products, such as sensor modules, only mention "serial" and don't claim it to be synchronous or not.

Synch or asynch is not the key issue here. The bus type as such is. Synch or asynch is just one property of many a particular bus has. If you know the bus, you now if it is synch or asynch.

To identify the bus you need to read the data sheet. One thing to keep in mind is that several serial busses, like I2C or SPI were or are proprietary. Sometimes only the name of the bus is a trademark. Device manufacturers try to avoid license fees by implementing a "compatible" bus, and not mentioning the trademarks in the documents. E.g. I2C is often called TWI, because Philips/NXP owns (owned?) I2C. So it helps to know the alternative names, and it helps to know how a particular bus functions, to be able to recognize it in a datasheet.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline Randall W. LottTopic starter

  • Regular Contributor
  • *
  • Posts: 180
  • Country: us
Re: Learning about microcontrollers
« Reply #6 on: March 23, 2012, 05:03:13 pm »
"While the other stuff, baud rate generator and the like, is e.g. build into an AVR, the required level converter is not."

I noticed that some chips state TTL level UART and others say LVTTL level UART.  Can I assume that the baudrate will be automatically set and I will simply need a bi-directional translator (level converter)?  I know that TTL runs at 0-5V and LVTTL runs at 0-3.3V.



It would be simple to use a voltage divider for the 5V to 3.3V buck, but I kept away from it due to problems at higher rates, although I'm sure it won't be running at concerning speeds.

Are there any easy ways to identify compatibility or do I just need to suck it up and use a translation IC?

Thank you dearly for your time and effort.  Take care.
- Randy
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: Learning about microcontrollers
« Reply #7 on: March 23, 2012, 06:53:56 pm »
Can I assume that the baudrate will be automatically set

The baud rate and a few other communication parameters need to be programmed. AVRs have usable defaults, i.e. when an AVR comes out of reset things like number of data bits, parity, stop bits are set to the common 8N1. Therefore in simple setups the programming of some parameters can be skipped. Although I usually do it. Baud rate, the AVR uses a divider for setting it, should always be programmed, because it depends on the system clock, the clock to be divided. Interrupts might be programmed, too.

Quote
Are there any easy ways to identify compatibility or do I just need to suck it up and use a translation IC?

For real RS232 you should use a dedicated RS232 converter. MAX232 or MAX3232 are very popular among hobbyists.

For connecting a 5V to a 3.3V system it depends on the systems. Some 3.3V systems are 5V tolerant and voltage levels might still be within TTL tolerance. For others you need level converters.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf