Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to check eeprom working without debugger in mplab

Status
Not open for further replies.

rems

New Member
i have written code to read and write in to the eeprom,how will i check eeprom is working without debugger.could anyone help me?
 
i wrote the code to read and write in eeprom,i want to test it in teraterm without using debugger,is it possible.i use MPLABX IDE and pic16f1937.
 
Last edited:
Write a couple of values to some eeprom locations and then read the eeprom into MPLAB and check they are there. Then try reading them back and writing to another eeprom location etc.

Mike.
 
void eprom_write(struct sCal* calibration,unsigned int address )
{
byte i;
byte* ptr = (byte*)calibration ; // calibration values stored

for (i=0; i<sizeof (struct sCal); i++) // Looping through float value. As float is 4 bytes and EEPROM memory is 1 byte each per address.
eeprom_write (address++,*ptr++);
}

void eprom_read(struct sCal* calibration,unsigned int address )
{

byte i;
byte* ptr = (byte*)calibration ;

for (i=0; i<sizeof (struct sCal); i++)
*ptr++ = eeprom_read (address++);
}

thios is my eprom program ,my calibration values will be stored in eeprom.
when i use debugger its reading the values,but i wanted to use teraterm without icd 3 debugger.how can i do that.i dont know how to check it without a debugger
 
Is it that you do not trust the ICD3. It shows you exactly what the values are that is if you are using the ICDs debugger and not the MPLAB simulator.

Do this to use hyperterm

1 write the values to EEPROM

2 read the values into variables

3 convert the variables to ascii strings and send them to the pic's usart (serial port)

Using the serial port you have other places to mess up like the conversion which is most easily done with a printf if you know how to use it.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top