Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:50 17 Jun 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 release candidates - all versions

     Page 51 of 52    
Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2551
Posted: 05:25am 07 Jun 2025
Copy link to clipboard 
Print this post

  Quote  When calling a subroutine you can supply less than the required number of values and in that case the missing values will be assumed to be either zero or an empty string.
BYVAL appears not to adhere to that.
> LIST
' Test prog 1
Dim integer a=5, b=6, c=7
 Print "a, b, c =";a;b;c
test a,,c

Sub test(BYVAL a, BYVAL b, BYVAL c)
If a = 5 Then
 a = 10
 Print "In Sub a, b, c =";a;b;c
EndIf
End Sub

Print "After Sub a, b, c =";a;b;c
> RUN
a, b, c = 5 6 7
In Sub a, b, c = 10 6 7
After Sub a, b, c = 5 6 7
>

> LIST
' Test prog 1
Dim integer a=5, b=6, c=7
 Print "a, b, c =";a;b;c
test a,,c

Sub test(a, b, c)
If a = 5 Then
 a = 10
 Print "In Sub a, b, c =";a;b;c
EndIf
End Sub

Print "After Sub a, b, c =";a;b;c
> RUN
a, b, c = 5 6 7
In Sub a, b, c = 10 0 7
After Sub a, b, c = 5 6 7
>

BYVAL appears to be the default anyway.

Senility advancing.
Edited 2025-06-07 16:01 by phil99
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4022
Posted: 06:29am 07 Jun 2025
Copy link to clipboard 
Print this post

  phil99 said  
  Quote  When calling a subroutine you can supply less than the required number of values and in that case the missing values will be assumed to be either zero or an empty string.
BYVAL appears not to adhere to that.
> LIST
' Test prog 1
Dim integer a=5, b=6, c=7
 Print "a, b, c =";a;b;c
test a,,c

Sub test(BYVAL a, BYVAL b, BYVAL c)
If a = 5 Then
 a = 10
 Print "In Sub a, b, c =";a;b;c
EndIf
End Sub

Print "After Sub a, b, c =";a;b;c
> RUN
a, b, c = 5 6 7
In Sub a, b, c = 10 6 7
After Sub a, b, c = 5 6 7
>


Oops - looks like a bug in MMBasic!

(b should default to 0 in test.)

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10169
Posted: 07:13am 07 Jun 2025
Copy link to clipboard 
Print this post

  Quote  Oops - looks like a bug in MMBasic!

(b should default to 0 in test.)


No it isn't. You are just printing the value of a global variable which wasn't passed. Try

' Test prog 1
Dim integer a=5, b=6, c=7
Print "a, b, c =";a;b;c
test a,,c

Sub test(BYVAL x%, BYVAL y%, BYVAL z%)
If x% = 5 Then
x% = 10
Print "In Sub x% y%, z% =";x%;y%;z%
EndIf
End Sub

Print "After Sub a, b, c =";a;b;c
> RUN
a, b, c = 5 6 7
In Sub a, b, c = 10 6 7
After Sub a, b, c = 5 6 7
>
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 419
Posted: 07:23am 07 Jun 2025
Copy link to clipboard 
Print this post

  JohnS said  
  phil99 said  
  Quote  When calling a subroutine you can supply less than the required number of values and in that case the missing values will be assumed to be either zero or an empty string.
BYVAL appears not to adhere to that.
> LIST
' Test prog 1
Dim integer a=5, b=6, c=7
 Print "a, b, c =";a;b;c
test a,,c

Sub test(BYVAL a, BYVAL b, BYVAL c)
If a = 5 Then
 a = 10
 Print "In Sub a, b, c =";a;b;c
EndIf
End Sub

Print "After Sub a, b, c =";a;b;c
> RUN
a, b, c = 5 6 7
In Sub a, b, c = 10 6 7
After Sub a, b, c = 5 6 7
>


Oops - looks like a bug in MMBasic!

(b should default to 0 in test.)

John


It doesn't look like a bug to me. Variables that aren't passed are global unless declared as LOCAL. The variable b wasn't passed so it retained its value of 6. Try changing b in the sub and see what happens. It will have the changed value after exiting the sub.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6249
Posted: 07:24am 07 Jun 2025
Copy link to clipboard 
Print this post

If you use OPTION EXPLICIT
RUN
a, b, c = 5 6 7
In Sub x% y%, z% = 10
[10] Print "In Sub x% y%, z% =";x%;y%;z%
Error : Y is not declared
>


Perhaps a warning in the manual to take care with empty parameters and BYVAL

Jim
VK7JH
MMedit
 
AlbertR
Newbie

Joined: 29/05/2025
Location: Germany
Posts: 12
Posted: 07:28am 07 Jun 2025
Copy link to clipboard 
Print this post

there should also be a different if the "AS INTEGER" is used


Option EXPLICIT
Dim integer a
a = 2
Print "a at start "a
test1
Print "test without par:"a
a = 2
test1(a)
Print "test1: "a
a = 2
test2(a)
Print "test2: "a
a = 2
test3(a)
Print "test3: "a
a = 2
test4(a)
Print "test4: "a
a = 2
test5(a)
Print "test5: "a
a = 2
test6(a)
Print "test6: "a
'------------------------------------
Sub test1( b )
If b = 2 Then b = 23
End Sub

Sub test2( b As integer )
If b = 2 Then b = 23
End Sub

Sub test3(byval b )
If b = 2 Then b = 23
End Sub

Sub test4(byval b As integer)
If b = 2 Then b = 23
End Sub

Sub test5(byref b As integer)
If b = 2 Then b = 23
End Sub

Sub test6(byref b )
If b = 2 Then b = 23
End Sub

>RUN
a at start  2
test without par: 2
test1:  2
test2:  23
test3:  2
test4:  2
test5:  23
[23] test6(a)
Error : BYREF requires same types: a
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4022
Posted: 11:38am 07 Jun 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Oops - looks like a bug in MMBasic!

(b should default to 0 in test.)


No it isn't. You are just printing the value of a global variable which wasn't passed. Try

' Test prog 1
Dim integer a=5, b=6, c=7
Print "a, b, c =";a;b;c
test a,,c

Sub test(BYVAL x%, BYVAL y%, BYVAL z%)
If x% = 5 Then
x% = 10
Print "In Sub x% y%, z% =";x%;y%;z%
EndIf
End Sub

Print "After Sub a, b, c =";a;b;c
> RUN
a, b, c = 5 6 7
In Sub a, b, c = 10 6 7
After Sub a, b, c = 5 6 7
>


I don't see how that can print In Sub a, b, c = 10 6 7
as it should be In Sub x% y%, z%  etc

But addressing the main issue: normally defining a SUB with parameters makes each of those parameters a sort of locally defined variable, so the original example would have both a global variable b and a parameter b.  The parameter would in effect hide the global one.

It's OK if that is not how MMBasic is supposed to work but it is most unusual/odd.

John
Edited 2025-06-07 21:38 by JohnS
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 131
Posted: 03:56pm 08 Jun 2025
Copy link to clipboard 
Print this post

G'day Peter,

Finally managed to read the EDID data from the two 7" 1024x600 displays here and decoded them, both totally different.  

Searching around it appears there are as many settings for the 1024x600 displays as there are displays... and 800x480 looks like a similar situation.

Sadly, as you suggest, there is no real "standard" at this resolution.

With that in mind, would you consider the following:

A "HDMI USER" mode / resolution, with the parameters input by the user, I imagine this would require 2 sets:
Mode 1 in monochrome with tiles
Mode 2,3 or 4 in color.

This would require the user to do the calculations for the clock frequency and divider / PLL ratios to suit, thankfully a lot of the porch and blanking information is available in the datasheets.

Whilst this would not be for the beginner, a database could be formed with setting data for the more common displays from Waveshare / Buydisplay etc.

This does of course assume that the above is even possible.

Regards,
Lyle.
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 131
Posted: 11:21am 09 Jun 2025
Copy link to clipboard 
Print this post

G'day,
Another possible gremlin, can anyone else confirm?

Setting system I2C to "slow" or opening I2C/I2C2 at 100khz stops the "I2C check" and "List System I2C" functions from working.

060002rc9 works ok, 060002rc15 onwards does not.

> option list
PicoMite MMBasic RP2040 Edition V6.00.02RC26
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
> setpin gp0,gp1,i2c
> i2c open 100,1000
> i2c check &h3c
> ? mm.i2c
1
> i2c write &h3c,0,1,0
> ? mm.i2c
0
> i2c check &h3c
> ? mm.i2c
1
>
(Move DAT / CLK)

> setpin gp2,gp3,i2c2
> i2c2 open 100,1000
> i2c2 check &h3c
> ? mm.i2c
1
> i2c2 write &h3c,0,1,0
> ? mm.i2c
0
>

List System I2C can also block further read / write attempts, although hard to nail down a pattern.

Tested with SSD1306 OLED display and DS3231RTC (separately)

Regards,
Lyle.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2551
Posted: 11:58am 09 Jun 2025
Copy link to clipboard 
Print this post

My understanding is "List System I2C" only works for the channel specified in OPTION SYSTEM I2C. Your option list doesn't show that.
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 131
Posted: 12:09pm 09 Jun 2025
Copy link to clipboard 
Print this post

G'day Phil,
Correct, however the post was getting a bit long showing both scenarios.

> option list
PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.02RC23
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION SYSTEM I2C GP20,GP21
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD US, 0, 0, 600, 150
OPTION RESOLUTION 720x400 @ 283200KHz
OPTION DISPLAY 33, 90
OPTION SDCARD GP22, GP26, GP27, GP28
OPTION AUDIO GP10,GP11', ON PWM CHANNEL 5
OPTION RTC AUTO ENABLE
OPTION PLATFORM HDMIUSB
> option system i2c disable
> option system i2c gp20,gp21,slow
> list system i2c
HEX  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> i2c write &h68,0,1,0
> ?mm.i2c
1
> option system i2c disable
> option system i2c gp20,gp21
> list system i2c
HEX  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> i2c write &h68,0,1,0
> ? mm.i2c
0
>

This is on a different system with DS3231 RTC but shows the same symptoms.
Also "I2C/I2C2 check" as example in previous post.
Have tried from RC15-RC26 and same result.

Regards,
Lyle.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2551
Posted: 12:59pm 09 Jun 2025
Copy link to clipboard 
Print this post

Yes, similar result. Also manual doesn't mention MM.I2C can return 2. Reading a EEPROM it fails to read all the requested bytes, but maybe 100kHz is too slow for the EEPROM. Reads the full amount at 400kHz.
> ? mm.i2c
1
> i2c check &h50
> ? mm.i2c
0
> List System I2C
HEX  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> ? mm.i2c
1
> OPTION SYSTEM I2C disable
> OPTION SYSTEM I2C GP8,GP9,slow
> List System I2C
HEX  0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>
> s$=""
> i2c read &H50,0,128,s$ :? s$
, Page   0, A=  31->
> ? mm.i2c
2
> i2c check &h50
> ? mm.i2c
1
> i2c read &H50,0,128,s$ :? s$
ptr A=  32, Page   1
> ? mm.i2c
2
> i2c check &h50
> ? mm.i2c
1
>

Edited 2025-06-09 23:06 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10169
Posted: 01:30pm 09 Jun 2025
Copy link to clipboard 
Print this post

I know why this is happening - will fix in the release
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2551
Posted: 05:38am 10 Jun 2025
Copy link to clipboard 
Print this post

In RC26
  Quote  Reading a EEPROM it fails to read all the requested bytes, but maybe 100kHz is too slow for the EEPROM. Reads the full amount at 400kHz
Did a proper count of the bytes returned at 400kHz and the maximum is 82 out of 128 the remainder are NUL. In RC19 I got all requested bytes.
Edited 2025-06-10 16:03 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10169
Posted: 07:18am 10 Jun 2025
Copy link to clipboard 
Print this post

  Quote  Reading a EEPROM it fails to read all the requested bytes, but maybe 100kHz is too slow for the EEPROM. Reads the full amount at 400kHz


Code for me to test with?
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2551
Posted: 08:03am 10 Jun 2025
Copy link to clipboard 
Print this post

This writes and reads all pages on a 24C32. If you don't want write to them all reduce For n = 0 To 127 to 4 or more.
If you already have data on the EEPROM just use :-
Sub Read_24C32_All ' Read all data from 24C32 EEPROM
at the bottom.

Edit. It uses System I2C.
24C32 EEPROM tester 2.bas
' Test program to fill a 24C32 EEPROM with 128 x 32 byte pages.
Dim Integer n, dummy, I2C.addr, Mem.addr
Dim D$, R$, txt$

For n = &H50 To &H58 'find the I2C address - if more than one the first or last can be used
  I2C CHECK n
  If Not MM.I2C Then  ' test for slave response. 1 = no response
   I2C.addr = n
   Print "&H";Hex$(I2C.addr),
  EndIf
Next
Print

' Write to all pages on 24C32 EEPROM
Print "Assembled I2C data, including the 2 pointer address bytes."

For n = 0 To 127  'make 32 byte pages
  Mem.addr = n * 32 'set the memory pointer
  D$ = "<-ptr A="+Str$(Mem.addr,4)+", Page "+Str$(n,3)+", A="+Str$(Mem.addr+31,4)+"->" 'make a page
  D$ = Chr$(Mem.addr>>8) + Chr$(Mem.addr And 255) + D$  'Add 2 byte Mem. address to the start of the Data'
  I2C WRITE I2C.addr,0,Len(D$),D$   'write 2 memory address bytes + data bytes
  For m=1 To 34 : If Asc(Mid$(D$,m,1))<32 Or Asc(Mid$(D$,m,1))>127 Then : MID$(D$,m,1)="." : EndIf : Next
  Print d$+"  "; :If n Mod 4 = 3 Then :Print :EndIf  'show the pages written, non-ASCII characters shown as "."
  Pause 6  'allow time to write
Next

Print :Print :Print "Data read from EEPROM"
Read_24C32_All

Sub Read_24C32_All ' Read all data from 24C32 EEPROM
 Mem.addr = 0 : I2C WRITE I2C.addr, 0, 2, Mem.addr >> 8, Mem.addr And 255  'return the pointer to 0
 For n = 0 To 31
  I2C read I2C.addr, 0, 128, R$  'print all data, 4 pages per line, showing non-ASCII characters as "."
  For m=1 To 32 : If Asc(Mid$(R$,m,1))<32 Or Asc(Mid$(R$,m,1))>127 Then : MID$(R$,m,1)="." : EndIf : Next
  Print R$
 Next
End Sub

End

Edited 2025-06-10 18:07 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10169
Posted: 08:12am 10 Jun 2025
Copy link to clipboard 
Print this post

I'm getting reams of output. How do I know if it has worked?

  Quote  Assembled I2C data, including the 2 pointer address bytes.
..<-ptr A=   0, Page   0, A=  31->  . <-ptr A=  32, Page   1, A=  63->  .@<-ptr A=  64, Page   2, A=  95->  .`<-ptr A=  96, Page   3, A= 127->
..<-ptr A= 128, Page   4, A= 159->  ..<-ptr A= 160, Page   5, A= 191->  ..<-ptr A= 192, Page   6, A= 223->  ..<-ptr A= 224, Page   7, A= 255->
..<-ptr A= 256, Page   8, A= 287->  . <-ptr A= 288, Page   9, A= 319->  .@<-ptr A= 320, Page  10, A= 351->  .`<-ptr A= 352, Page  11, A= 383->
..<-ptr A= 384, Page  12, A= 415->  ..<-ptr A= 416, Page  13, A= 447->  ..<-ptr A= 448, Page  14, A= 479->  ..<-ptr A= 480, Page  15, A= 511->
..<-ptr A= 512, Page  16, A= 543->  . <-ptr A= 544, Page  17, A= 575->  .@<-ptr A= 576, Page  18, A= 607->  .`<-ptr A= 608, Page  19, A= 639->
..<-ptr A= 640, Page  20, A= 671->  ..<-ptr A= 672, Page  21, A= 703->  ..<-ptr A= 704, Page  22, A= 735->  ..<-ptr A= 736, Page  23, A= 767->
..<-ptr A= 768, Page  24, A= 799->  . <-ptr A= 800, Page  25, A= 831->  .@<-ptr A= 832, Page  26, A= 863->  .`<-ptr A= 864, Page  27, A= 895->
..<-ptr A= 896, Page  28, A= 927->  ..<-ptr A= 928, Page  29, A= 959->  ..<-ptr A= 960, Page  30, A= 991->  ..<-ptr A= 992, Page  31, A=1023->
..<-ptr A=1024, Page  32, A=1055->  . <-ptr A=1056, Page  33, A=1087->  .@<-ptr A=1088, Page  34, A=1119->  .`<-ptr A=1120, Page  35, A=1151->
..<-ptr A=1152, Page  36, A=1183->  ..<-ptr A=1184, Page  37, A=1215->  ..<-ptr A=1216, Page  38, A=1247->  ..<-ptr A=1248, Page  39, A=1279->
..<-ptr A=1280, Page  40, A=1311->  . <-ptr A=1312, Page  41, A=1343->  .@<-ptr A=1344, Page  42, A=1375->  .`<-ptr A=1376, Page  43, A=1407->
..<-ptr A=1408, Page  44, A=1439->  ..<-ptr A=1440, Page  45, A=1471->  ..<-ptr A=1472, Page  46, A=1503->  ..<-ptr A=1504, Page  47, A=1535->
..<-ptr A=1536, Page  48, A=1567->  . <-ptr A=1568, Page  49, A=1599->  .@<-ptr A=1600, Page  50, A=1631->  .`<-ptr A=1632, Page  51, A=1663->
..<-ptr A=1664, Page  52, A=1695->  ..<-ptr A=1696, Page  53, A=1727->  ..<-ptr A=1728, Page  54, A=1759->  ..<-ptr A=1760, Page  55, A=1791->
..<-ptr A=1792, Page  56, A=1823->  . <-ptr A=1824, Page  57, A=1855->  .@<-ptr A=1856, Page  58, A=1887->  .`<-ptr A=1888, Page  59, A=1919->
..<-ptr A=1920, Page  60, A=1951->  ..<-ptr A=1952, Page  61, A=1983->  ..<-ptr A=1984, Page  62, A=2015->  ..<-ptr A=2016, Page  63, A=2047->
..<-ptr A=2048, Page  64, A=2079->  . <-ptr A=2080, Page  65, A=2111->  .@<-ptr A=2112, Page  66, A=2143->  .`<-ptr A=2144, Page  67, A=2175->
..<-ptr A=2176, Page  68, A=2207->  ..<-ptr A=2208, Page  69, A=2239->  ..<-ptr A=2240, Page  70, A=2271->  ..<-ptr A=2272, Page  71, A=2303->
..<-ptr A=2304, Page  72, A=2335->  . <-ptr A=2336, Page  73, A=2367->  .@<-ptr A=2368, Page  74, A=2399->  .`<-ptr A=2400, Page  75, A=2431->
..<-ptr A=2432, Page  76, A=2463->  ..<-ptr A=2464, Page  77, A=2495->  ..<-ptr A=2496, Page  78, A=2527->  ..<-ptr A=2528, Page  79, A=2559->
..<-ptr A=2560, Page  80, A=2591->  . <-ptr A=2592, Page  81, A=2623->  .@<-ptr A=2624, Page  82, A=2655->  .`<-ptr A=2656, Page  83, A=2687->
..<-ptr A=2688, Page  84, A=2719->  ..<-ptr A=2720, Page  85, A=2751->  ..<-ptr A=2752, Page  86, A=2783->  ..<-ptr A=2784, Page  87, A=2815->
..<-ptr A=2816, Page  88, A=2847->  . <-ptr A=2848, Page  89, A=2879->  .@<-ptr A=2880, Page  90, A=2911->  .`<-ptr A=2912, Page  91, A=2943->
..<-ptr A=2944, Page  92, A=2975->  ..<-ptr A=2976, Page  93, A=3007->  ..<-ptr A=3008, Page  94, A=3039->  ..<-ptr A=3040, Page  95, A=3071->
..<-ptr A=3072, Page  96, A=3103->  . <-ptr A=3104, Page  97, A=3135->  .@<-ptr A=3136, Page  98, A=3167->  .`<-ptr A=3168, Page  99, A=3199->
..<-ptr A=3200, Page 100, A=3231->  ..<-ptr A=3232, Page 101, A=3263->  ..<-ptr A=3264, Page 102, A=3295->  ..<-ptr A=3296, Page 103, A=3327->
..<-ptr A=3328, Page 104, A=3359->  . <-ptr A=3360, Page 105, A=3391->  .@<-ptr A=3392, Page 106, A=3423->  .`<-ptr A=3424, Page 107, A=3455->
..<-ptr A=3456, Page 108, A=3487->  ..<-ptr A=3488, Page 109, A=3519->  ..<-ptr A=3520, Page 110, A=3551->  ..<-ptr A=3552, Page 111, A=3583->
..<-ptr A=3584, Page 112, A=3615->  . <-ptr A=3616, Page 113, A=3647->  .@<-ptr A=3648, Page 114, A=3679->  .`<-ptr A=3680, Page 115, A=3711->
..<-ptr A=3712, Page 116, A=3743->  ..<-ptr A=3744, Page 117, A=3775->  ..<-ptr A=3776, Page 118, A=3807->  ..<-ptr A=3808, Page 119, A=3839->
..<-ptr A=3840, Page 120, A=3871->  . <-ptr A=3872, Page 121, A=3903->  .@<-ptr A=3904, Page 122, A=3935->  .`<-ptr A=3936, Page 123, A=3967->
..<-ptr A=3968, Page 124, A=3999->  ..<-ptr A=4000, Page 125, A=4031->  ..<-ptr A=4032, Page 126, A=4063->  ..<-ptr A=4064, Page 127, A=4095->


Data read from EEPROM
<-ptr A=   0, Page   0, A=  31-><-ptr A=  32, Page
1, A=  63-><-ptr A=  64, Page   2, A=  95-><-ptr A=
96, Page   3, A= 127-><-ptr A= 128, Page   4, A= 15
-><-ptr A= 160, Page   5, A= 191-><-ptr A= 192, Page
 6, A= 223-><-ptr A= 224, Page   7, A= 255-><-ptr A
256, Page   8, A= 287-><-ptr A= 288, Page   9, A= 3
9-><-ptr A= 320, Page  10, A= 351-><-ptr A= 352, Pag
 11, A= 383-><-ptr A= 384, Page  12, A= 415-><-ptr
= 416, Page  13, A= 447-><-ptr A= 448, Page  14, A=
79-><-ptr A= 480, Page  15, A= 511-><-ptr A= 512, Pa
e  16, A= 543-><-ptr A= 544, Page  17, A= 575-><-ptr
A= 576, Page  18, A= 607-><-ptr A= 608, Page  19, A=
639-><-ptr A= 640, Page  20, A= 671-><-ptr A= 672, P
ge  21, A= 703-><-ptr A= 704, Page  22, A= 735-><-pt
A= 736, Page  23, A= 767-><-ptr A= 768, Page  24, A
799-><-ptr A= 800, Page  25, A= 831-><-ptr A= 832,
age  26, A= 863-><-ptr A= 864, Page  27, A= 895-><-p
r A= 896, Page  28, A= 927-><-ptr A= 928, Page  29,
= 959-><-ptr A= 960, Page  30, A= 991-><-ptr A= 992,
Page  31, A=1023-><-ptr A=1024, Page  32, A=1055-><-
tr A=1056, Page  33, A=1087-><-ptr A=1088, Page  34,
A=1119-><-ptr A=1120, Page  35, A=1151-><-ptr A=1152
Page  36, A=1183-><-ptr A=1184, Page  37, A=1215-><
ptr A=1216, Page  38, A=1247-><-ptr A=1248, Page  39
A=1279-><-ptr A=1280, Page  40, A=1311-><-ptr A=131
, Page  41, A=1343-><-ptr A=1344, Page  42, A=1375->
-ptr A=1376, Page  43, A=1407-><-ptr A=1408, Page  4
, A=1439-><-ptr A=1440, Page  45, A=1471-><-ptr A=14
2, Page  46, A=1503-><-ptr A=1504, Page  47, A=1535-
<-ptr A=1536, Page  48, A=1567-><-ptr A=1568, Page
9, A=1599-><-ptr A=1600, Page  50, A=1631-><-ptr A=1
32, Page  51, A=1663-><-ptr A=1664, Page  52, A=1695

Edited 2025-06-10 18:13 by matherp
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2551
Posted: 08:18am 10 Jun 2025
Copy link to clipboard 
Print this post

The bottom section "Data read from EEPROM" should show 4 pages of 32 bytes per line like this from RC19.
Data read from EEPROM
<-ptr A=   0, Page   0, A=  31-><-ptr A=  32, Page   1, A=  63-><-ptr A=  64, Page   2, A=  95-><-ptr A=  96, Page   3, A= 127->
<-ptr A= 128, Page   4, A= 159-><-ptr A= 160, Page   5, A= 191-><-ptr A= 192, Page   6, A= 223-><-ptr A= 224, Page   7, A= 255->
<-ptr A= 256, Page   8, A= 287-><-ptr A= 288, Page   9, A= 319-><-ptr A= 320, Page  10, A= 351-><-ptr A= 352, Page  11, A= 383->
<-ptr A= 384, Page  12, A= 415-><-ptr A= 416, Page  13, A= 447-><-ptr A= 448, Page  14, A= 479-><-ptr A= 480, Page  15, A= 511->
...

It looks like you are only getting 52 characters out of 128 per line.
As the EEPROM address pointer stops incrementing at the point where it stops reading the next 128 byte read starts where the last finished but once again stops short so the last half of it doesn't get read. The last page shown is 52 out of 128 that were written.
Edited 2025-06-10 18:38 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10169
Posted: 08:43am 10 Jun 2025
Copy link to clipboard 
Print this post

Any chance of a simpler program?
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2551
Posted: 08:47am 10 Jun 2025
Copy link to clipboard 
Print this post

Ok I will start on it after dinner.
The <- and -> point to the start and end of each 32 byte page and the A= is the byte address at the start and end.
Edited 2025-06-10 18:51 by phil99
 
     Page 51 of 52    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025