Embedded Problem....

Thread Starter

himanshu1990

Joined Jun 23, 2010
16
Hi there guys...

I have 1 problem that was asked in some sort of an interwiew....
and i cudnt answer it coz m a beginner in this field...

heres that questn:-

We have two microcontrollers, each connected to a PC through UART. (uC 1 with PC1 and uC 2 with PC 2)
Data is to be sent from PC1 to uC 2 through uC 1 using I2C. Whatever data is sent from PC1 to uC 1 serially (can be of arbitrary length, not greater than 20), uC1 should store that internally, flushing out any previous data.
PC2 is used to command uC2 to get the data from uC1 over I2C and the data received is to be sent to PC2 through the serial port.

how do I do that..?
what all things do i need..?
And m a little slow with programming so cant make out with the full fledged progam...

plz do reply...

Thanks...:)
 

sage.radachowsky

Joined May 11, 2010
241
Well, for each of the microcontroller units, you need:

* a microcontroller
* a power supply for it
* an RS232 level translator chip, like the MAX232 family of chips, if you want to use read RS232 levels to communicate with the PC, and any capacitors required by that chip
* a crystal or ceramic oscillator would be good, but it is not necessary if you're using a slower baud rate because most internal oscillators on uC are good enough to do up to 9600 baud
* the programming header for the microcontroller and the capacitors or resistors for the control of the reset pin
* bypass capacitor for the microcontroller
* connectors for each side, the RS232 to PC and the I2C to the other microcontroller board.
* the PCB or breadboard to connect everything together.

That should do it.
 

Thread Starter

himanshu1990

Joined Jun 23, 2010
16
Well, for each of the microcontroller units, you need:

* a microcontroller
* a power supply for it
* an RS232 level translator chip, like the MAX232 family of chips, if you want to use read RS232 levels to communicate with the PC, and any capacitors required by that chip
* a crystal or ceramic oscillator would be good, but it is not necessary if you're using a slower baud rate because most internal oscillators on uC are good enough to do up to 9600 baud
* the programming header for the microcontroller and the capacitors or resistors for the control of the reset pin
* bypass capacitor for the microcontroller
* connectors for each side, the RS232 to PC and the I2C to the other microcontroller board.
* the PCB or breadboard to connect everything together.

That should do it.

hey thanx sir..

well when I am using the Uart do I need to use the RS232...??

I searched the net and found that RS232 is outdated and all...

cud you plz Explain a bit...???

Thanx a lot...
 

sage.radachowsky

Joined May 11, 2010
241
Well, here's how I see the terms:

The RS232 standard means that the signals are positive and negative. There is a valid range according to the standard of 3 to 15 Volts, both positive and negative. But some computers will understand and output 0V as the "1" voltage and +5V as the "0" voltage. That is the cheap way that it is sometimes implemented.

Then again, some people use RS232 to mean UART communications even if it is TTL level (like 0 and 3.3V). But I think this is incorrect.

Then there is UART, which means serial data communications where the "1" is high (typically 3.3V or 5V) and "0" is 0V. It may also refer to RS232 levels but I think this is not really correct.

RS232 is becoming outdated but it is still commonly used because it's so common. It works well for lower data rates and over distances. If the voltages are implemented correctly as positive and negative, then it is rather impervious to noise and interference, and it is pretty simple.

There are also RS422 and CANbus and other bus standards when there is a need to transmit data in a noisy environment, but they are more complicated to implement.
 

BMorse

Joined Sep 26, 2009
2,675
Well, if people want to get technical, lets see what WiKi says:

RS232:
In telecommunications, RS-232 (Recommended Standard 232) is a standard for serial binary single-ended data and control signals connecting between a DTE (Data Terminal Equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pinout of connectors.
UART:
A universal asynchronous receiver/transmitter (usually abbreviated UART and pronounced /ˈjuːɑrt/) is a type of "asynchronous receiver/transmitter", a piece of computer hardware that translates data between parallel and serial forms. UARTs are commonly used in conjunction with other communication standards such as EIA RS-232.
A UART is usually an individual (or part of an) integrated circuit used for serial communications over a computer or peripheral device serial port. UARTs are now commonly included in microcontrollers. A dual UART, or DUART, combines two UARTs into a single chip. Many modern ICs now come with a UART that can also communicate synchronously; these devices are called USARTs (universal synchronous/asynchronous receiver/transmitter).
Serial:
In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time (contrast parallel port).[1] Throughout most of the history of personal computers, data transfer through serial ports connected the computer to devices such as terminals and various peripherals.
While such interfaces as Ethernet, FireWire, and USB all send data as a serial stream, the term "serial port" usually identifies hardware more or less compliant to the RS-232 standard, intended to interface with a modem or with a similar communication device.
All have to do with the same thing.....

B. Morse
 
Top