EEPROM.read giving ascii values

I am saving data in eeprom using EEPROM.update function of byte data type but when i read that data it is giving it's ASCII value.How can i solve this?

By you not treating it as a char :wink: If you read it back into a byte and don't print it as ASCII it's just the data :slight_smile:

You are right...thanx ...

@vishal_3

byte data type

The following study may help you to overcome some of your confusions why you are seeing ASCII charctaer on the Serial Monitor.

byte x = 0x39;

Let me assume that you have made the above declaration and definition for your variable x. It is also assumed that you have written the value of x into location 0x0100 of the EEPROM, and you have also read it back executing the instruction byte y = EEPROM.read(0x0100);. Will you please answer to the following questions without doing any experiments using Arduino UNO?

1. What will we see on the Serial Monitor after the execution of Serial.println(y, BIN);?

2. What will we see on the Serial Monitor after the execution of Serial.println(y, HEX);?

3. What will we see on the Serial Monitor after the execution of Serial.println(y, DEC);?

4. What will we see on the Serial Monitor after the execution of Serial.println((char)y);?

5. Which one of the following is actually present in the target memory location?
(a) 00111001
(b) 39
(c) 57
(d) 9

6. Is the target EEPROM location bit-organized or digit-organized?

7. If you feed the value of y into the segments of a cc (common cathode)-type 7-segment display device, what character will appear on the display device?

I am using EEPROM Library ..i did a mistake by writing Serial.print(EEPROM.read(1)) without storing the value in a variable after i stored it in byte data type variable and it is showing what i wanted ..a silly mistake....