NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Different ways of programming Atmega

June 03, 2012
by kapkunal
kapkunal's Avatar

There are quite different ways of programming atmega. I know ISP programming since I use AVRISP MKII. But it is serial programming and the way nerdkits program atmega is different although it is serial. What is the difference between two methods? If we connect tx and rx directly from PC to atmega168 will it work? why we are not using max232 chip here? I read online that while connecting atmega 168 to PC serial port connect it thru max232.

June 04, 2012
by Rick_S
Rick_S's Avatar

The MAX232 type chips are level translators/inverters. They take a TTL (5V) level serial "RS-232" signal and convert it to a more standard "RS-232" signal.

A standard RS-232 signal contains voltages that are typically 12 to 15V, way too high for the micro-controller to accept on it's input. So the MAX232 takes that higher voltage and drops it down on the receive side. It also takes the lower voltage from the micro-controller and bumps it up on the transmit side.

If you were to connect the micro-controller to a computer with a Standard RS-232 jack on the back and not use the USB cable, you would have to use either a MAX232 type chip or some other method to translate the signals.

The reason the Nerdkit doesn't need that chip is because they provide you with a cable that is TTL level not RS-232 level. As such, no translation is required.

As for the type of serial used in ISP, that is done through what is commonly called SPI (Serial Peripheral Interface). There is another serial communication port on the micro called the TWI (Two Wire Interface) or as trademarked by (I believe) Philips, I2C.

Serial communication simply means the data is streamed a bit at a time. Sometimes, as in the case of RS-232, there are two data wires, transmit and recieve, other times, there is only one.

Parallel communication is what is used in the LCD where 4 or 8 bits of data are sent at a time through multiple wires.

There are many varieties of serial communication, but luckily, some of the most common are built into the micro-controller used in the Nerdkit.

I hope that clarified more than confused BigGrin_Green


June 04, 2012
by kapkunal
kapkunal's Avatar

Thanks a lot. It cleared my doubts.

Post a Reply

Please log in to post a reply.

Did you know that LEDs (light emitting diodes) only conduct current in one direction, like normal diodes? Learn more...