How To Connect The EEPROM Of The Arduino To The Serial Port Of A PC- (Part 20/49)

The Arduino is an easy prototyping platform in which the hardware is very simple to use and to be connected with any other system. The programing environment is also very easy to start with and has lot of built-in functions for every simple and complex task. The AVR microcontroller boards which are provided with all the basic circuitry for the operation of the microcontroller which has been flashed with the arduino boot-loader are called arduino boards. The arduino can communicate with the other devices using its digital I/O, serial port, I2C port, SPI port etc. In this particular project the Arduino pro-mini board is used which is then programmed with the help of Arduino IDE version 1.0.3 on windows operating system. The Arduino pro-mini board has ATMEGA328 microcontroller inside it which has a 1Kb of internal EEPROM memory. The internal EEPROM memory can be easily accessed using the built-in functions provided by the Arduino IDE. The board has also one set of Tx and Rx pins with the help of which the board can be interfaced with the serial port. The image of the Arduino pro-mini board and the Arduino IDE is shown in the following;

Fig. 2: Typical Arduino Pro-Mini Board

Fig. 3: Arduino IDE Software Window

Since the arduino pro-mini board has no circuitary for interfacing it with the serial port or the USB port of the PC, an external USB to TTL converter board is required to connect it with the PC. This hardware helps in programming the arduino board and also helps in the serial communication with the PC through the USB port of the PC.

The code written for this project first enables the serial port with the help of the function Serial.begin(). It then writes the entire EEPROM with white spaces with the help of the function EEPROM.write(). Then a predefined text is written to the EEPROM starting from a particular memory location using the same function EEPROM.write(). The code then reads entire EEPROM starting from the 0th location to the 1023th location using the function EEPROM.read(). Each data byte read is also printed on the serial port using the function Serial.write(). When the coding is finished one can verify and upload the code to the Arduino board as explained in the project how to get started with the Arduino. The Arduino board can then be connected to the PC using USB to TTL converter board and the data can be viewed on any serial monitoring software or using the Arduino IDE’s serial monitoring software as explained in the project how to do serial debugging with the Arduino.