Hello all,
I'm back after a break =P.. I'm going to college this year in the fall, I
got a PicStart Plus and that works well.
To the point: I have some 628's (not the A revision), and I can't seem to
write to the ee (using pic code, but I can read it if I wrote it with the
programmer.) I am using the following code (bank0/1 work properly, or else i
couldnt have setup my ports):
movfw al ;my ptr counter
movwf EEADR
call rrs232
bank1
movwf EEDATA
bank0
call wr_ee
call rd_ee ;this reads properly.. like if i already had contents in EE
bank1
movfw EEDATA
bank0
call srs232
wr_ee bank1
bsf EECON1,WREN
bcf INTCON,GIE
movlw 0x55
movwf EECON2
movlw 0xaa
movwf EECON2
bsf EECON1,WR
bank0
btfss PIR1,EEIF
goto $-1
bcf PIR1,EEIF
bank1
bcf EECON1,WREN
bank0
return
thanks, its really confusing me.. and I am looking at the latest data sheet
which shows all EE SFRs are in bank1.
--andrew
--
http://www.piclist.com hint: To leave the PICList
mailto:piclist-unsubscribe-request@mitvma.mit.edu