Searching \ for '[PIC]: MPLAB IDE debugger vs. PIC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/languages.htm?key=mplab
Search entire site for: 'MPLAB IDE debugger vs. PIC'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: MPLAB IDE debugger vs. PIC'
2002\06\18@065217 by Andreas Nyholm

flavicon
face
Hello,
I'm having problem writing or reading to the eeprom on my PIC16F874. I
have a loop that's writing data to the eeprom and another loop later that
is reading from EEPROM and comparing with other data.
The strange thing here is that everything is working fine with the
debugger, EEPROM is updated and readed properly.
But on the PIC it seams that just the first byte is readed from EEPROM
(I've been using a LED to see how far I get in the program), atleast the
first one is compared properly, but not the second.

Any ideas why it works with the debugger and not with the PIC?
Common things to do wrong? I've been using the EEPROM read/write code from
Microchip.

Thanks a lot in advance!
Andreas

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\06\18@071529 by Carlos Ojea

flavicon
face
>I've been using the EEPROM read/write code from
>Microchip.


Dont spect code from Microchip to be perfect.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\06\18@135847 by Dwayne Reid

flavicon
face
At 01:51 PM 6/18/02 +0300, Andreas Nyholm wrote:
>Hello,
>I'm having problem writing or reading to the eeprom on my PIC16F874. I
>have a loop that's writing data to the eeprom and another loop later that
>is reading from EEPROM and comparing with other data.
>The strange thing here is that everything is working fine with the
>debugger, EEPROM is updated and readed properly.
>But on the PIC it seams that just the first byte is readed from EEPROM
>(I've been using a LED to see how far I get in the program), atleast the
>first one is compared properly, but not the second.
>
>Any ideas why it works with the debugger and not with the PIC?
>Common things to do wrong? I've been using the EEPROM read/write code from
>Microchip.

Do you allow enough time for each write to finish?

dwayne

--
Dwayne Reid   <spam_OUTdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 18 years of Engineering Innovation (1984 - 2002)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\06\19@024459 by Andreas Nyholm

flavicon
face
> >
> >Any ideas why it works with the debugger and not with the PIC?
> >Common things to do wrong? I've been using the EEPROM read/write code from
> >Microchip.
>
> Do you allow enough time for each write to finish?
>
Yes, I do use:  BTFSC EECON1, WR         ;Wait for
               GOTO $-1                ;write to finish
But since I only need to write to EEPROM during startup, I found an other
solution:       org 0x2100
               DW 0x33
                .
                .
So I'll think I use this for now and try to solve the writing problem if I
need to write while the program is running.

But why doesn't this operation work?
bsf lastState_out1,cnt2
cnt2 always have the value 0-7. lastState_out1 always gets 0x01. I also
tried to swap the bits but it's still the same.

/Andreas

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam@spam@mitvma.mit.edu with SET PICList DIGEST in the body


2002\06\19@074727 by Andreas Nyholm

flavicon
face
>
> But why doesn't this operation work?
> bsf lastState_out1,cnt2
> cnt2 always have the value 0-7. lastState_out1 always gets 0x01. I also
> tried to swap the bits but it's still the same.
>
Sorry for spamming the PIC-list but I'll answer this question myself.. :)
Atlest I think the answer is that it uses the address of cnt2 instead of
the value. Anyone know why and how to use the value instead?
It's good that you can write programs in more than one way :) ... so I
solved this problem with rrf instead...

/Andreas

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...