PDA

View Full Version : Help;; eeprom won't read/write beyond address 255



DDDvvv
- 30th August 2010, 00:41
hi everyone.
im trying a memory intensive app on a 18f2620, where i need to read/write ascii characters onto eeprom. this pic has 1024 eeprom bytes, but for some reason, i cannot read/write beyond address 255.

program compiles ok but it shows black pixels on an lcd when i use this command:

data @300, "a","s","c","i","i"

i try to read at any of the above locations, and i get no values. works ok if i use any address under 255.

what im i missing?

thanks for reading

DDDvvv
- 30th August 2010, 01:11
im reading the datasheet, and im thinking that it has something to do with the EEADR register, that controls the address, being 8 bit (256 values).

so, is there life after address 255 in picbasic, or do i have to use external memory?

thanks

ScaleRobotics
- 30th August 2010, 14:15
I notice that in my PBP file, the 18f2620.bas file of mine has this line commented out. Have you tried uncommenting it out? This is the line that tells pbp how big the EEProm is, so without it, PBP can't know its larger than usual.



'EEPROM $F00000, $F003FF

Acetronics2
- 30th August 2010, 14:59
Hi, DDDvvv

EDIT : 300dec <> 300 hex !!! ... ::lol::

300 dec = $12C ...

no bug on my side ... just need to have a new pair of glasses ( it's true ! ) and scroll slowlier through MPLAB Window ...
I had tested it for the 2525 too ... didn't see anything nor ...

Alain

ScaleRobotics
- 30th August 2010, 15:12
Ah, now I see why it is commented out....

WARNING Line 29: $F00000 Numeric overflow, value truncated. (18F2620.BAS)
WARNING Line 29: $F003FF Numeric overflow, value truncated. (18F2620.BAS)

Right you are Alain.

DDDvvv
- 30th August 2010, 16:19
thanks for replying guys.
i get the same error if i uncomment the eeprom line.

im sure there's some workaround in assembly, but for now, its off to i2c external memory and a pic with no eeprom. hopefully, i dont get the same error on using external memory.

Bruce
- 30th August 2010, 17:45
This works fine with PBP 2.60a and MPLAB ver 8.53.


DATA @300, "a","s","c","i","i"

Dat VAR BYTE
Index VAR WORD

Main:
FOR Index = 300 TO 304
READ Index,Dat
HSEROUT [Dat,13,10]
NEXT
Here:
GOTO Here
Spits it out as expected in the serial output window, and MPLAB shows all data in the EEPROM view window.

Of course you need a word size variable for the index pointer when the address is > 255.

KVLV
- 30th December 2010, 11:43
hi I bring this thread up because i have trouble compiling eeprom passed the 256 bytes
chip used 18f2620 it has 1024x8 byte of eeprom

pbp pro version 2.60a
mplab ide 8.63
mpasm v5.39
microcode studio 4.0.0.0

so please point out what i did wrong.
Please help and thank you.

I have tried both the DATA and EEPROM, both cannot compile more than 256 byte of eeprom

my code is enclosed.

'************************************************* ***************
'* Name : UNTITLED.BAS *
'* Author : KVLV *
'* Notice : Copyright (c) 2010 VANCOUVER *
'* : All Rights Reserved *
'* Date : 12/27/2010 *
'* Version : 1.0 *
'* Notes : *
'* : *
'************************************************* ***************
'chip use 18F2620
'
DEFINE LOADER_USED 1 'for bootstrap loader
define OSC 20
'define HSER_BAUD 19200 ' on pc side set to 19200 8N1 (8 data bits, no parity bit, 1 stop bit)
define HSER_BAUD 19200
' Set receive register to receiver enabled
DEFINE HSER_RCSTA 90h
' Set transmit register to transmitter enabled
DEFINE HSER_TXSTA 20h

INCLUDE "Modedefs.bas"

L var word
B var word
M var word
temp var word
'Mask var byte
X var word '[5]
'Y VAR BIT[40]
C VAR word
S var byte[5]

data %00000000, %00000000, %00000000, %00000000, %00000000 'space
data %00000000, %00000000, %01111001, %00000000, %00000000 '!
data %00000000, %01110000, %00000000, %01110000, %00000000 'double_quotes
data %00010100, %01111111, %00010100, %01111111, %00010100 'hash
data %00010010, %00101010, %01111111, %00101010, %00100100 'dollar_sign
data %01100010, %01100100, %00001000, %00010011, %00100011 'percent
data %00110110, %01001001, %01010101, %00100010, %00000101 'ampersand
data %00000000, %01010000, %01100000, %00000000, %00000000 'apostrophe
data %00000000, %00011100, %00100010, %01000001, %00000000 'left_parenthesis
data %00000000, %01000001, %00100010, %00011100, %00000000 'right_parenthesis
data %00010100, %00001000, %00111110, %00001000, %00010100 'asterisk
data %00001000, %00001000, %00111110, %00001000, %00001000 'plus
data %00000000, %00000101, %00000110, %00000000, %00000000 'comma
data %00001000, %00001000, %00001000, %00001000, %00001000 'minus
data %00000000, %00000011, %00000011, %00000000, %00000000 'full_stop
data %00000010, %00000100, %00001000, %00010000, %00100000 'forward_slash
data %00111110, %01000101, %01001001, %01010001, %00111110 'zero
data %00000000, %00100001, %01111111, %00000001, %00000000 'one
data %00100001, %01000011, %01000101, %01001001, %00110001 'two
data %01000010, %01000001, %01010001, %01101001, %01000110 'three
data %00001100, %00010100, %00100100, %01111111, %00000100 'four
data %01110010, %01010001, %01010001, %01010001, %01001110 'five
data %00011110, %00101001, %01001001, %01001001, %00000110 'six
data %01000000, %01000111, %01001000, %01010000, %01100000 'seven
data %00110110, %01001001, %01001001, %01001001, %00110110 'eight
data %00110000, %01001001, %01001001, %01001010, %00111100 'nine
data %00000000, %00110110, %00110110, %00000000, %00000000 'colon
data %00000000, %00110101, %00110110, %00000000, %00000000 'semicolon
data %00001000, %00010100, %00100010, %01000001, %00000000 'less_than
data %00010100, %00010100, %00010100, %00010100, %00010100 'equals
data %00000000, %01000001, %00100010, %00010100, %00001000 'greater_than
data %00100000, %01000000, %01000101, %01001000, %00110000 'question_mark
data %00100110, %01001001, %01001111, %01000001, %00111110 'at
data %00111111, %01000100, %01000100, %01000100, %00111111 'A
data %01111111, %01001001, %01001001, %01001001, %00110110 'B
data %00111110, %01000001, %01000001, %01000001, %00100010 'C
data %01111111, %01000001, %01000001, %00100010, %00011100 'D
data %01111111, %01001001, %01001001, %01001001, %01000001 'E
data %01111111, %01001000, %01001000, %01001000, %01000000 'F
data %00111110, %01000001, %01001001, %01001001, %00101111 'G
data %01111111, %00001000, %00001000, %00001000, %01111111 'H
data %00000000, %01000001, %01111111, %01000001, %00000000 'I
data %00000010, %00000001, %01000001, %01111110, %01000000 'J
data %01111111, %00001000, %00010100, %00100010, %01000001 'K
data %01111111, %00000001, %00000001, %00000001, %00000001 'L
data %01111111, %00100000, %00011000, %00100000, %01111111 'M
data %01111111, %00010000, %00001000, %00000100, %01111111 'N
data %00111110, %01000001, %01000001, %01000001, %00111110 'O
data %01111111, %01001000, %01001000, %01001000, %00110000 'P
data %00111110, %01000001, %01000101, %01000010, %00111101 'Q
data %01111111, %01001000, %01001100, %01001010, %00110001 'R
data %00110001, %01001001, %01001001, %01001001, %01000110 'S
data %01000000, %01000000, %01111111, %01000000, %01000000 'T
data %01111110, %00000001, %00000001, %00000001, %01111110 'U
data %01111100, %00000010, %00000001, %00000010, %01111100 'V
data %01111110, %00000001, %00001110, %00000001, %01111110 'W
data %01100011, %00010100, %00001000, %00010100, %01100011 'X
data %01110000, %00001000, %00000111, %00001000, %01110000 'Y
data %01000011, %01000101, %01001001, %01010001, %01100001 'Z
data %00000000, %01111111, %01000001, %01000001, %00000000 'left_square
data %00100000, %00010000, %00001000, %00000100, %00000010 'back_slash
data %00000000, %01000001, %01000001, %01111111, %00000000 'right_square
data %00010000, %00100000, %01000000, %00100000, %00010000 'circumflex
data %00000001, %00000001, %00000001, %00000001, %00000001 'underscore
data %00000000, %01000000, %00100000, %00010000, %00000000 'grave_accent
data %00000010, %00010101, %00010101, %00010101, %00001111 'a
data %01111111, %00001001, %00001001, %00001001, %00000110 'b
data %00001110, %00010001, %00010001, %00010001, %00010001 'c
data %00000110, %00001001, %00001001, %00001001, %01111111 'd
data %00001110, %00010101, %00010101, %00010101, %00001101 'e
data %00000000, %00001000, %00111111, %01001000, %00100000 'f
data %00001001, %00010101, %00010101, %00010101, %00011110 'g
data %01111111, %00001000, %00001000, %00001000, %00000111 'h
data %00000000, %00000000, %00101111, %00000000, %00000000 'i
data %00000010, %00000001, %00000001, %01011110, %00000000 'j
data %00000000, %01111111, %00000100, %00001010, %00010001 'k
data %00000000, %01000001, %01111111, %00000001, %00000000 'l
data %00011111, %00010000, %00001110, %00010000, %00011111 'm
data %00011111, %00001000, %00010000, %00010000, %00001111 'n
data %00001110, %00010001, %00010001, %00010001, %00001110 'o
data %00011111, %00010100, %00010100, %00010100, %00001000 'p
data %00001000, %00010100, %00010100, %00010100, %00011111 'q
data %00011111, %00001000, %00010000, %00010000, %00001000 'r
data %00001001, %00010101, %00010101, %00010101, %00010010 's
data %00010000, %00010000, %01111110, %00010001, %00010010 't
data %00011110, %00000001, %00000001, %00000001, %00011110 'u
data %00011100, %00000010, %00000001, %00000010, %00011100 'v
data %00011110, %00000001, %00000110, %00000001, %00011110 'w
data %00010001, %00001010, %00000100, %00001010, %00010001 'x
data %00010000, %00001001, %00000110, %00001000, %00010000 'y
data %00010001, %00010011, %00010101, %00011001, %00010001 'z
data %00001000, %00110110, %01000001, %01000001, %00000000 'leftcurly
data %00000000, %00000000, %01111111, %00000000, %00000000 'vertline
data %00000000, %01000001, %01000001, %00110110, %00001000 'rightcurly
data %00000100, %00001000, %00001000, %00001000, %00010000 'tilde
data %01111111, %01000001, %01000001, %01000001, %01111111 'del


TRISA=%00000000 '0=output
TRISB=%00000000 '1 = input
TRISC=%00000000
ADCON0=%11000000
ADCON1=%00000111
CMCON =%00000111 ' Comparators = off

INTCON2.7=0 ' Enable Pull-Up's PIC18F2620 'VERIFIED

Main:

' temp=l

' 'display data sideway
' for M=0 to 4
' read l,x

' hserout ["L:",dec3 l, " X:",bin8 x,13,10]
' l=l+1
' if l>175 then
' l=170
' endif

' next m
' s[0]= %01111111 'these lines work
' s[1]= %01000001
' s[2]= %01000001
' s[3]= %01000001
' s[4]= %01111111

' for c=470 to 474
' write c,s[c-470]
' pause 1
' next c



for c=0 to 475 step 5
hserout ["C:", dec c,13,10]
gosub rotate
next c

hserout ["That's all folk!",13,10]

END





goto main


'-----------------
'setup variable
'set c as location of
'call this
'ex:
' c=0
' gosub rotate
'
Rotate: 'rotate 90 counterclockwise
l=c
temp=l
for m=0 to 4
read l, x
hserout [bin x.7]
l=l+1
next m
hserout [13,10]

l=temp
for m=0 to 4
read l, x
hserout [bin x.6]
l=l+1
next m
hserout [13,10]

l=temp
for m=0 to 4
read l, x
hserout [bin x.5]
l=l+1
next m
hserout [13,10]

l=temp
for m=0 to 4
read l, x
hserout [bin x.4]
l=l+1
next m
hserout [13,10]

l=temp
for m=0 to 4
read l, x
hserout [bin x.3]
l=l+1
next m
hserout [13,10]

l=temp
for m=0 to 4
read l, x
hserout [bin x.2]
l=l+1
next m
hserout [13,10]

l=temp
for m=0 to 4
read l, x
hserout [bin x.1]
l=l+1
next m
hserout [13,10]

l=temp
for m=0 to 4
read l, x
hserout [bin x.0]
l=l+1
next m
hserout [13,10,13,10]

return

Dave
- 30th December 2010, 13:37
KVLV, Are you sure you are compiling it with the right chip selected? I have been using 18F2620's for the last few years with almost all of the eeprom used. I have never had such a problem. Your code at first glance looks as though it should work.

Dave Purola,
N8NTA

KVLV
- 30th December 2010, 16:27
Dave,
yes, i did verify the chip use 18f2620.
also i use windows 7 32b

i have done/checked all the info from the top post to this end.

I just wanted someone on the other side compile and verify that it worked.

i have also have read the DATA/EEPROM that in this statement

"If the optional Location value is omitted, the first DATA
statement starts storing at address 0 and subsequent statements store at
the following locations."

or this "If the optional Location value is
omitted, the first EEPROM statement starts storing at address 0 and
subsequent statements store at the following locations."


Thanks,

ScaleRobotics
- 30th December 2010, 16:44
I just wanted someone on the other side compile and verify that it worked.

Compile works down here for the code you posted. Success 1678 bytes.

Windows XP
pbp pro version 2.60a
mplab ide 8.60
mpasm v5.38
microcode studio 3.0.0.5

KVLV
- 30th December 2010, 17:24
my compilation came up with 1686 bytes

fyi: i used tiny bootloader to load the hex file to the pic and also
use my trusted programmer to load the hex file.

the display cannot pass the 256 bytes of eeprom.

i am sure the READ/WRITE command work fine.
these code work fine


' s[0]= %01111111 'these lines work
' s[1]= %01000001
' s[2]= %01000001
' s[3]= %01000001
' s[4]= %01111111

' for c=470 to 474
' write c,s[c-470]
' pause 1
' next c


i am question the DATA/EEPROM are not working.

this is from the tiny booloader


Connected to \\.\COM1 at 115200
HEX: 2 min old, INHX32,18Fcode+cfg+eeprom , total=1686 bytes.
Searching for PIC ...
Found:18F 2620/4620
eeprom addr:000h <- 00h
eeprom addr:001h <- 00h
eeprom addr:002h <- 00h
eeprom addr:003h <- 00h
eeprom addr:004h <- 00h
eeprom addr:005h <- 00h
eeprom addr:006h <- 00h
eeprom addr:007h <- 79h
eeprom addr:008h <- 00h
eeprom addr:009h <- 00h
eeprom addr:00Ah <- 00h
eeprom addr:00Bh <- 70h
eeprom addr:00Ch <- 00h
eeprom addr:00Dh <- 70h
eeprom addr:00Eh <- 00h
eeprom addr:00Fh <- 14h
eeprom addr:010h <- 7Fh
eeprom addr:011h <- 14h
eeprom addr:012h <- 7Fh
eeprom addr:013h <- 14h
eeprom addr:014h <- 12h
eeprom addr:015h <- 2Ah
eeprom addr:016h <- 7Fh
eeprom addr:017h <- 2Ah
eeprom addr:018h <- 24h
eeprom addr:019h <- 62h
eeprom addr:01Ah <- 64h
eeprom addr:01Bh <- 08h
eeprom addr:01Ch <- 13h
eeprom addr:01Dh <- 23h
eeprom addr:01Eh <- 36h
eeprom addr:01Fh <- 49h
eeprom addr:020h <- 55h
eeprom addr:021h <- 22h
eeprom addr:022h <- 05h
eeprom addr:023h <- 00h
eeprom addr:024h <- 50h
eeprom addr:025h <- 60h
eeprom addr:026h <- 00h
eeprom addr:027h <- 00h
eeprom addr:028h <- 00h
eeprom addr:029h <- 1Ch
eeprom addr:02Ah <- 22h
eeprom addr:02Bh <- 41h
eeprom addr:02Ch <- 00h
eeprom addr:02Dh <- 00h
eeprom addr:02Eh <- 41h
eeprom addr:02Fh <- 22h
eeprom addr:030h <- 1Ch
eeprom addr:031h <- 00h
eeprom addr:032h <- 14h
eeprom addr:033h <- 08h
eeprom addr:034h <- 3Eh
eeprom addr:035h <- 08h
eeprom addr:036h <- 14h
eeprom addr:037h <- 08h
eeprom addr:038h <- 08h
eeprom addr:039h <- 3Eh
eeprom addr:03Ah <- 08h
eeprom addr:03Bh <- 08h
eeprom addr:03Ch <- 00h
eeprom addr:03Dh <- 05h
eeprom addr:03Eh <- 06h
eeprom addr:03Fh <- 00h
eeprom addr:040h <- 00h
eeprom addr:041h <- 08h
eeprom addr:042h <- 08h
eeprom addr:043h <- 08h
eeprom addr:044h <- 08h
eeprom addr:045h <- 08h
eeprom addr:046h <- 00h
eeprom addr:047h <- 03h
eeprom addr:048h <- 03h
eeprom addr:049h <- 00h
eeprom addr:04Ah <- 00h
eeprom addr:04Bh <- 02h
eeprom addr:04Ch <- 04h
eeprom addr:04Dh <- 08h
eeprom addr:04Eh <- 10h
eeprom addr:04Fh <- 20h
eeprom addr:050h <- 3Eh
eeprom addr:051h <- 45h
eeprom addr:052h <- 49h
eeprom addr:053h <- 51h
eeprom addr:054h <- 3Eh
eeprom addr:055h <- 00h
eeprom addr:056h <- 21h
eeprom addr:057h <- 7Fh
eeprom addr:058h <- 01h
eeprom addr:059h <- 00h
eeprom addr:05Ah <- 21h
eeprom addr:05Bh <- 43h
eeprom addr:05Ch <- 45h
eeprom addr:05Dh <- 49h
eeprom addr:05Eh <- 31h
eeprom addr:05Fh <- 42h
eeprom addr:060h <- 41h
eeprom addr:061h <- 51h
eeprom addr:062h <- 69h
eeprom addr:063h <- 46h
eeprom addr:064h <- 0Ch
eeprom addr:065h <- 14h
eeprom addr:066h <- 24h
eeprom addr:067h <- 7Fh
eeprom addr:068h <- 04h
eeprom addr:069h <- 72h
eeprom addr:06Ah <- 51h
eeprom addr:06Bh <- 51h
eeprom addr:06Ch <- 51h
eeprom addr:06Dh <- 4Eh
eeprom addr:06Eh <- 1Eh
eeprom addr:06Fh <- 29h
eeprom addr:070h <- 49h
eeprom addr:071h <- 49h
eeprom addr:072h <- 06h
eeprom addr:073h <- 40h
eeprom addr:074h <- 47h
eeprom addr:075h <- 48h
eeprom addr:076h <- 50h
eeprom addr:077h <- 60h
eeprom addr:078h <- 36h
eeprom addr:079h <- 49h
eeprom addr:07Ah <- 49h
eeprom addr:07Bh <- 49h
eeprom addr:07Ch <- 36h
eeprom addr:07Dh <- 30h
eeprom addr:07Eh <- 49h
eeprom addr:07Fh <- 49h
eeprom addr:080h <- 4Ah
eeprom addr:081h <- 3Ch
eeprom addr:082h <- 00h
eeprom addr:083h <- 36h
eeprom addr:084h <- 36h
eeprom addr:085h <- 00h
eeprom addr:086h <- 00h
eeprom addr:087h <- 00h
eeprom addr:088h <- 35h
eeprom addr:089h <- 36h
eeprom addr:08Ah <- 00h
eeprom addr:08Bh <- 00h
eeprom addr:08Ch <- 08h
eeprom addr:08Dh <- 14h
eeprom addr:08Eh <- 22h
eeprom addr:08Fh <- 41h
eeprom addr:090h <- 00h
eeprom addr:091h <- 14h
eeprom addr:092h <- 14h
eeprom addr:093h <- 14h
eeprom addr:094h <- 14h
eeprom addr:095h <- 14h
eeprom addr:096h <- 00h
eeprom addr:097h <- 41h
eeprom addr:098h <- 22h
eeprom addr:099h <- 14h
eeprom addr:09Ah <- 08h
eeprom addr:09Bh <- 20h
eeprom addr:09Ch <- 40h
eeprom addr:09Dh <- 45h
eeprom addr:09Eh <- 48h
eeprom addr:09Fh <- 30h
eeprom addr:0A0h <- 26h
eeprom addr:0A1h <- 49h
eeprom addr:0A2h <- 4Fh
eeprom addr:0A3h <- 41h
eeprom addr:0A4h <- 3Eh
eeprom addr:0A5h <- 3Fh
eeprom addr:0A6h <- 44h
eeprom addr:0A7h <- 44h
eeprom addr:0A8h <- 44h
eeprom addr:0A9h <- 3Fh
eeprom addr:0AAh <- 7Fh
eeprom addr:0ABh <- 49h
eeprom addr:0ACh <- 49h
eeprom addr:0ADh <- 49h
eeprom addr:0AEh <- 36h
eeprom addr:0AFh <- 3Eh
eeprom addr:0B0h <- 41h
eeprom addr:0B1h <- 41h
eeprom addr:0B2h <- 41h
eeprom addr:0B3h <- 22h
eeprom addr:0B4h <- 7Fh
eeprom addr:0B5h <- 41h
eeprom addr:0B6h <- 41h
eeprom addr:0B7h <- 22h
eeprom addr:0B8h <- 1Ch
eeprom addr:0B9h <- 7Fh
eeprom addr:0BAh <- 49h
eeprom addr:0BBh <- 49h
eeprom addr:0BCh <- 49h
eeprom addr:0BDh <- 41h
eeprom addr:0BEh <- 7Fh
eeprom addr:0BFh <- 48h
eeprom addr:0C0h <- 48h
eeprom addr:0C1h <- 48h
eeprom addr:0C2h <- 40h
eeprom addr:0C3h <- 3Eh
eeprom addr:0C4h <- 41h
eeprom addr:0C5h <- 49h
eeprom addr:0C6h <- 49h
eeprom addr:0C7h <- 2Fh
eeprom addr:0C8h <- 7Fh
eeprom addr:0C9h <- 08h
eeprom addr:0CAh <- 08h
eeprom addr:0CBh <- 08h
eeprom addr:0CCh <- 7Fh
eeprom addr:0CDh <- 00h
eeprom addr:0CEh <- 41h
eeprom addr:0CFh <- 7Fh
eeprom addr:0D0h <- 41h
eeprom addr:0D1h <- 00h
eeprom addr:0D2h <- 02h
eeprom addr:0D3h <- 01h
eeprom addr:0D4h <- 41h
eeprom addr:0D5h <- 7Eh
eeprom addr:0D6h <- 40h
eeprom addr:0D7h <- 7Fh
eeprom addr:0D8h <- 08h
eeprom addr:0D9h <- 14h
eeprom addr:0DAh <- 22h
eeprom addr:0DBh <- 41h
eeprom addr:0DCh <- 7Fh
eeprom addr:0DDh <- 01h
eeprom addr:0DEh <- 01h
eeprom addr:0DFh <- 01h
eeprom addr:0E0h <- 01h
eeprom addr:0E1h <- 7Fh
eeprom addr:0E2h <- 20h
eeprom addr:0E3h <- 18h
eeprom addr:0E4h <- 20h
eeprom addr:0E5h <- 7Fh
eeprom addr:0E6h <- 7Fh
eeprom addr:0E7h <- 10h
eeprom addr:0E8h <- 08h
eeprom addr:0E9h <- 04h
eeprom addr:0EAh <- 7Fh
eeprom addr:0EBh <- 3Eh
eeprom addr:0ECh <- 41h
eeprom addr:0EDh <- 41h
eeprom addr:0EEh <- 41h
eeprom addr:0EFh <- 3Eh
eeprom addr:0F0h <- 7Fh
eeprom addr:0F1h <- 48h
eeprom addr:0F2h <- 48h
eeprom addr:0F3h <- 48h
eeprom addr:0F4h <- 30h
eeprom addr:0F5h <- 3Eh
eeprom addr:0F6h <- 41h
eeprom addr:0F7h <- 45h
eeprom addr:0F8h <- 42h
eeprom addr:0F9h <- 3Dh
eeprom addr:0FAh <- 7Fh
eeprom addr:0FBh <- 48h
eeprom addr:0FCh <- 4Ch
eeprom addr:0FDh <- 4Ah
eeprom addr:0FEh <- 31h
eeprom addr:0FFh <- 31h
WRITE OK at 9:17, time:4.242 sec



the enclose picture is from my programmer soft.

KVLV
- 30th December 2010, 19:11
Thanks scalerobotics.

I have a temp solution, workaround.

this program will write the needed data to the eeprom and use the one posted above to read.


'************************************************* ***************
'* Name : UNTITLED.BAS *
'* Author : KVLV *
'* Notice : Copyright (c) 2010 VANCOUVER *
'* : All Rights Reserved *
'* Date : 12/30/2010 *
'* Version : 1.0 *
'* Notes : *
'* : *
'************************************************* ***************
'chip use 18F2620
'
DEFINE LOADER_USED 1 'for bootstrap loader
define OSC 20
'define HSER_BAUD 19200 ' on pc side set to 19200 8N1 (8 data bits, no parity bit, 1 stop bit)
define HSER_BAUD 19200
' Set receive register to receiver enabled
DEFINE HSER_RCSTA 90h
' Set transmit register to transmitter enabled
DEFINE HSER_TXSTA 20h

B0 var word[1024]
C var word


TRISA=%00000000 '0=output
TRISB=%00000000 '1 = input
TRISC=%00000000
ADCON0=%11000000
ADCON1=%00000111
CMCON =%00000111 ' Comparators = off

INTCON2.7=0 ' Enable Pull-Up's PIC18F2620 'VERIFIED

data %00000000, %00000000, %00000000, %00000000, %00000000 'space
data %00000000, %00000000, %01111001, %00000000, %00000000 '!
data %00000000, %01110000, %00000000, %01110000, %00000000 'double_quotes
data %00010100, %01111111, %00010100, %01111111, %00010100 'hash
data %00010010, %00101010, %01111111, %00101010, %00100100 'dollar_sign
data %01100010, %01100100, %00001000, %00010011, %00100011 'percent
data %00110110, %01001001, %01010101, %00100010, %00000101 'ampersand
data %00000000, %01010000, %01100000, %00000000, %00000000 'apostrophe
data %00000000, %00011100, %00100010, %01000001, %00000000 'left_parenthesis
data %00000000, %01000001, %00100010, %00011100, %00000000 'right_parenthesis
data %00010100, %00001000, %00111110, %00001000, %00010100 'asterisk
data %00001000, %00001000, %00111110, %00001000, %00001000 'plus
data %00000000, %00000101, %00000110, %00000000, %00000000 'comma
data %00001000, %00001000, %00001000, %00001000, %00001000 'minus
data %00000000, %00000011, %00000011, %00000000, %00000000 'full_stop
data %00000010, %00000100, %00001000, %00010000, %00100000 'forward_slash
data %00111110, %01000101, %01001001, %01010001, %00111110 'zero
data %00000000, %00100001, %01111111, %00000001, %00000000 'one
data %00100001, %01000011, %01000101, %01001001, %00110001 'two
data %01000010, %01000001, %01010001, %01101001, %01000110 'three
data %00001100, %00010100, %00100100, %01111111, %00000100 'four
data %01110010, %01010001, %01010001, %01010001, %01001110 'five
data %00011110, %00101001, %01001001, %01001001, %00000110 'six
data %01000000, %01000111, %01001000, %01010000, %01100000 'seven
data %00110110, %01001001, %01001001, %01001001, %00110110 'eight
data %00110000, %01001001, %01001001, %01001010, %00111100 'nine
data %00000000, %00110110, %00110110, %00000000, %00000000 'colon
data %00000000, %00110101, %00110110, %00000000, %00000000 'semicolon
data %00001000, %00010100, %00100010, %01000001, %00000000 'less_than
data %00010100, %00010100, %00010100, %00010100, %00010100 'equals
data %00000000, %01000001, %00100010, %00010100, %00001000 'greater_than
data %00100000, %01000000, %01000101, %01001000, %00110000 'question_mark
data %00100110, %01001001, %01001111, %01000001, %00111110 'at
data %00111111, %01000100, %01000100, %01000100, %00111111 'A
data %01111111, %01001001, %01001001, %01001001, %00110110 'B
data %00111110, %01000001, %01000001, %01000001, %00100010 'C
data %01111111, %01000001, %01000001, %00100010, %00011100 'D
data %01111111, %01001001, %01001001, %01001001, %01000001 'E
data %01111111, %01001000, %01001000, %01001000, %01000000 'F
data %00111110, %01000001, %01001001, %01001001, %00101111 'G
data %01111111, %00001000, %00001000, %00001000, %01111111 'H
data %00000000, %01000001, %01111111, %01000001, %00000000 'I
data %00000010, %00000001, %01000001, %01111110, %01000000 'J
data %01111111, %00001000, %00010100, %00100010, %01000001 'K
data %01111111, %00000001, %00000001, %00000001, %00000001 'L
data %01111111, %00100000, %00011000, %00100000, %01111111 'M
data %01111111, %00010000, %00001000, %00000100, %01111111 'N
data %00111110, %01000001, %01000001, %01000001, %00111110 'O
data %01111111, %01001000, %01001000, %01001000, %00110000 'P
data %00111110, %01000001, %01000101, %01000010, %00111101 'Q
data %01111111, %01001000, %01001100, %01001010, %00110001 'R
'data %00110001, %01001001, %01001001, %01001001, %01000110 'S
b0[255]=%00110010:b0[256]=%01001001:b0[257]=%01001001:b0[258]=%01001001:b0[259]=%00100110 'S 'corrected dec 30.2010
b0[260]=%01000000:b0[261]=%01000000:b0[262]=%01111111:b0[263]=%01000000:b0[264]=%01000000 'T
b0[265]=%01111110:b0[266]=%00000001:b0[267]=%00000001:b0[268]=%00000001:b0[269]=%01111110 'U
b0[270]=%01111100:b0[271]=%00000010:b0[272]=%00000001:b0[273]=%00000010:b0[274]=%01111100 'V
b0[275]=%01111110:b0[276]=%00000001:b0[277]=%00001110:b0[278]=%00000001:b0[279]=%01111110 'W
b0[280]=%01100011:b0[281]=%00010100:b0[282]=%00001000:b0[283]=%00010100:b0[284]=%01100011 'X
b0[285]=%01110000:b0[286]=%00001000:b0[287]=%00000111:b0[288]=%00001000:b0[289]=%01110000 'Y
b0[290]=%01000011:b0[291]=%01000101:b0[292]=%01001001:b0[293]=%01010001:b0[294]=%01100001 'Z
b0[295]=%00000000:b0[296]=%01111111:b0[297]=%01000001:b0[298]=%01000001:b0[299]=%00000000 'left_square
b0[300]=%00100000:b0[301]=%00010000:b0[302]=%00001000:b0[303]=%00000100:b0[304]=%00000010 'back_slash
b0[305]=%00000000:b0[306]=%01000001:b0[307]=%01000001:b0[308]=%01111111:b0[309]=%00000000 'right_square
b0[310]=%00010000:b0[311]=%00100000:b0[312]=%01000000:b0[313]=%00100000:b0[314]=%00010000 'circumflex
b0[315]=%00000001:b0[316]=%00000001:b0[317]=%00000001:b0[318]=%00000001:b0[319]=%00000001 'underscore
b0[320]=%00000000:b0[321]=%01000000:b0[322]=%00100000:b0[323]=%00010000:b0[324]=%00000000 'grave_accent
b0[325]=%00000010:b0[326]=%00010101:b0[327]=%00010101:b0[328]=%00010101:b0[329]=%00001111 'a
b0[330]=%01111111:b0[331]=%00001001:b0[332]=%00001001:b0[333]=%00001001:b0[334]=%00000110 'b
b0[335]=%00001110:b0[336]=%00010001:b0[337]=%00010001:b0[338]=%00010001:b0[339]=%00010001 'c
b0[340]=%00000110:b0[341]=%00001001:b0[342]=%00001001:b0[343]=%00001001:b0[344]=%01111111 'd
b0[345]=%00001110:b0[346]=%00010101:b0[347]=%00010101:b0[348]=%00010101:b0[349]=%00001101 'e
b0[350]=%00000000:b0[351]=%00001000:b0[352]=%00111111:b0[353]=%01001000:b0[354]=%00100000 'f
b0[355]=%00001001:b0[356]=%00010101:b0[357]=%00010101:b0[358]=%00010101:b0[359]=%00011110 'g
b0[360]=%01111111:b0[361]=%00001000:b0[362]=%00001000:b0[363]=%00001000:b0[364]=%00000111 'h
b0[365]=%00000000:b0[366]=%00000000:b0[367]=%00101111:b0[368]=%00000000:b0[369]=%00000000 'i
b0[370]=%00000010:b0[371]=%00000001:b0[372]=%00000001:b0[373]=%01011110:b0[374]=%00000000 'j
b0[375]=%00000000:b0[376]=%01111111:b0[377]=%00000100:b0[378]=%00001010:b0[379]=%00010001 'k
b0[380]=%00000000:b0[381]=%01000001:b0[382]=%01111111:b0[383]=%00000001:b0[384]=%00000000 'l
b0[385]=%00011111:b0[386]=%00010000:b0[387]=%00001110:b0[388]=%00010000:b0[389]=%00011111 'm
b0[390]=%00011111:b0[391]=%00001000:b0[392]=%00010000:b0[393]=%00010000:b0[394]=%00001111 'n
b0[395]=%00001110:b0[396]=%00010001:b0[397]=%00010001:b0[398]=%00010001:b0[399]=%00001110 'o
b0[400]=%00011111:b0[401]=%00010100:b0[402]=%00010100:b0[403]=%00010100:b0[404]=%00001000 'p
b0[405]=%00001000:b0[406]=%00010100:b0[407]=%00010100:b0[408]=%00010100:b0[409]=%00011111 'q
b0[410]=%00011111:b0[411]=%00001000:b0[412]=%00010000:b0[413]=%00010000:b0[414]=%00001000 'r
b0[415]=%00001001:b0[416]=%00010101:b0[417]=%00010101:b0[418]=%00010101:b0[419]=%00010010 's
b0[420]=%00010000:b0[421]=%00010000:b0[422]=%01111110:b0[423]=%00010001:b0[424]=%00010010 't
b0[425]=%00011110:b0[426]=%00000001:b0[427]=%00000001:b0[428]=%00000001:b0[429]=%00011110 'u
b0[430]=%00011100:b0[431]=%00000010:b0[432]=%00000001:b0[433]=%00000010:b0[434]=%00011100 'v
b0[435]=%00011110:b0[436]=%00000001:b0[437]=%00000110:b0[438]=%00000001:b0[439]=%00011110 'w
b0[440]=%00010001:b0[441]=%00001010:b0[442]=%00000100:b0[443]=%00001010:b0[444]=%00010001 'x
b0[445]=%00010000:b0[446]=%00001001:b0[447]=%00000110:b0[448]=%00001000:b0[449]=%00010000 'y
b0[450]=%00010001:b0[451]=%00010011:b0[452]=%00010101:b0[453]=%00011001:b0[454]=%00010001 'z
b0[455]=%00001000:b0[456]=%00110110:b0[457]=%01000001:b0[458]=%01000001:b0[459]=%00000000 'leftcurly
b0[460]=%00000000:b0[461]=%00000000:b0[462]=%01111111:b0[463]=%00000000:b0[464]=%00000000 'vertline
b0[465]=%00000000:b0[466]=%01000001:b0[467]=%01000001:b0[468]=%00110110:b0[469]=%00001000 'rightcurly
b0[470]=%00000100:b0[471]=%00001000:b0[472]=%00001000:b0[473]=%00001000:b0[474]=%00010000 'tilde
b0[475]=%01111111:b0[476]=%01000001:b0[477]=%01000001:b0[478]=%01000001:b0[479]=%01111111 'del
b0[480]=$ef 'eof



for c=255 to 480
write c,b0[c]
pause 1
next c




end

KVLV
- 2nd January 2011, 22:16
it turns out that my programmer program cannot load eeprom passed the 255 bytes and since corrected.
the tinybootloader is also cannot write beyond 255bytes

so my temp solutions works for now.