Re: Strange pic programming problem
From: Ed (ed_at_NOSPAMmicra.org.uk)
Date: 07/06/04
- Next message: Tim Wescott: "Re: SEEKING ELECTIRICAL DESIGN ENGINEER - New Commercial Product Design"
- Previous message: Ed: "Strange pic programming problem"
- In reply to: Ed: "Strange pic programming problem"
- Next in thread: Spehro Pefhany: "Re: Strange pic programming problem"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 06 Jul 2004 02:53:51 GMT
Ed wrote:
> Im back again with yet another question!! :)
>
> I am programming a 16F877A and at the moment I am trying to read and
> write to the EEPROM memory. This is bascially what I have done:
>
> At the beginning of the program I have set this:
>
> MOVLW 0x19 ;
> MOVWF EEADRV ;
> MOVLW 0x19 ;
> MOVWF EEDATAV ;
> CALL WRITE ;
>
> WRITE (code has been omitted to save space here)
>
> MOVF EEADRV,W ;Data Memory Value
> MOVWF EEADR ;Address to write
> MOVF EEDATAV,W ;Data Memory Value
> MOVWF EEDATA ;to write
>
> So very bascially all I am trying to do is load EEADRV and EEDATAV with
> 0x19, then in the write subroutiene, move EEADRV to EEADR and EEDATAV to
> EEDATA, however for some reason this just wont work in my program,
> however if I take this same code and create a new asm file, it works
> fine and I can load EEADR and EEDATA with what ever I want without a
> problem.
> Since the first load commands are right at the beginning of my program
> and the write subroutiene is at the end could this cause any problem
> with passing the accross to the other variables. My code is about 1800
> lines, and this is all I can think of, however I dont know a solution -
> I'm hoping somone here might and can help me here.
>
> Thanks
>
> Ed
>
Ed wrote:
-- * Micra Sports Club * * Don't underestimate, what you will never understand * * http://www.micra.org.uk http://www.micrasportsclub.co.uk *> Im back again with yet another question!! :) > > I am programming a 16F877A and at the moment I am trying to read and > write to the EEPROM memory. This is bascially what I have done: > > At the beginning of the program I have set this: > > MOVLW 0x19 ; > MOVWF EEADRV ; > MOVLW 0x19 ; > MOVWF EEDATAV ; > CALL WRITE ; > > WRITE (code has been omitted to save space here) > > MOVF EEADRV,W ;Data Memory Value > MOVWF EEADR ;Address to write > MOVF EEDATAV,W ;Data Memory Value > MOVWF EEDATA ;to write > > So very bascially all I am trying to do is load EEADRV and EEDATAV with > 0x19, then in the write subroutiene, move EEADRV to EEADR and EEDATAV to > EEDATA, however for some reason this just wont work in my program, > however if I take this same code and create a new asm file, it works > fine and I can load EEADR and EEDATA with what ever I want without a > problem. > Since the first load commands are right at the beginning of my program > and the write subroutiene is at the end could this cause any problem > with passing the accross to the other variables. My code is about 1800 > lines, and this is all I can think of, however I dont know a solution - > I'm hoping somone here might and can help me here. > > Thanks > > Ed > Ok I just tried moving the EE routienes to the front of my program with no sucess - now im totally stuck :( Any suggestions welcome. Ed -- * Micra Sports Club * * Don't underestimate, what you will never understand * * http://www.micra.org.uk http://www.micrasportsclub.co.uk *
- Next message: Tim Wescott: "Re: SEEKING ELECTIRICAL DESIGN ENGINEER - New Commercial Product Design"
- Previous message: Ed: "Strange pic programming problem"
- In reply to: Ed: "Strange pic programming problem"
- Next in thread: Spehro Pefhany: "Re: Strange pic programming problem"
- Messages sorted by: [ date ] [ thread ]