Interesting and strange too. Thanks @guu
In the meanwhile I have done something: I installed a Pico 2 with MicroPython v1.26.0 (from micropython.org) on the PicoCalc and ran I2C scan varying the speed from 10KHz to 30MHz without errors (without/with DS3231 RTC). Scanning the bus with a Pico 2W under WebMite produced intermittent errors with the “default” 10Khz bus speed. The following is an example of the result with the RTC attached:
PicoMite System I2C2 Scanner
0 1 2 3 4 5 6 7 8 9 A B C D E F
00: . . . . . . . . - - - - - - - -
10: - - - - - - - - - - - - - - -1F
20: - - - -24 - - - - - - - - -2E -
30: - - - - - - - - - - - - - - - -
40: - - - - - - - - - - - - - - - -
50: - - - - - - -57 - - - - - -5E -
60: - - - - - - - -68 - - - - - - -
70: 70 - - - - - - - - -7A - - - - -
The next run: (correct)
PicoMite System I2C2 Scanner
0 1 2 3 4 5 6 7 8 9 A B C D E F
00: . . . . . . . . - - - - - - - -
10: - - - - - - - - - - - - - - -1F
20: - - - - - - - - - - - - - - - -
30: - - - - - - - - - - - - - - - -
40: - - - - - - - - - - - - - - - -
50: - - - - - - -57 - - - - - - - -
60: - - - - - - - -68 - - - - - - -
70: - - - - - - - - - - - - - - - -
and once more:
PicoMite System I2C2 Scanner
0 1 2 3 4 5 6 7 8 9 A B C D E F
00: . . . . . . . . - - - - - - - -
10: - -12 - - - - - - - - -1C - -1F
20: - - - - - - - - - - - - - - - -
30: - - - - - - - - - - - - - - - -
40: - - - - - - - - - - - - - - - -
50: - - - - - - -57 - - - - - - - -
60: - - - - - - - -68 - - - - - - -
70: - -72 - - - - - - - - -7C - - -
1F PicoCalc
57 EEPROM
68 RTC DS3231
I have this horrible feeling that there might be a software problem somewhere.
Um, you misunderstand. I said the firmware on the stm32 has the problem, not the stm32 platform.
No worries, I understood that, but the platform itself (F1 series) is also a source of problems in some cases (especially memory management).
Think I read somewhere there’s a more capable STM that is pin and footprint compatible. Now there’s a thought….
I had touched on the subject at one point too… The STM32F405 is the only candidate in the F4 series (and I believe across the entire range) that is pin-to-pin compatible.
But at this point, a new motherboard is worth the time invested I think.
I have done something unexpected and the result is surprising ![]()
I have done a few changes to the sources to enable 400KHz (really 367Khz) on I2C2 (PicoMite RP2350) and I have not (yet)* noticed any problems. Somehow it seems to perform better with I2C although sometimes phantom devices get reported while scanning the I2C bus, but not as much as running at 10KHz.
Surprising is that “I2C2 CHECK &H1F” does not bring up the error message “I2C Keyboard not responding” with the higher (100&400) clock speed. This is a permanent error with the 10KHz clock speed.
Update 1: Something is going wrong at 400KHz:
”[6] Loop” and “[6] Text” printing continuously on the LCD.
Update 2: With 400KHz there are regular crashes:
as above but also “[6] Colo” being printed. Now looking at 100KHz, I2C scan still occasionally shows ghosts, waiting to see what happens next.
Update 3: With 100KHz there are still problems not as many as with 400KHz. Now running with 50KHz and seems to be stable although I2C scan is still reporting ghost devices. The I2C Check error did not yet appear.
Please be aware that there a DS3231 is attached to the bus.
Bad me, I should have made a final post.
The problems have been identified and solved in the V6.01.00 and later, a few rewrites in the keyboard routine were needed.
Hi all,
I have problems using I2C with Picocalc. I am using MMBasic RP2350A v6.00.03.
I have connected a RTC to GP6 and GP7 but when I try to play with RTC it doesn’t work.
I don’t know what to do, I’m not a software specialist. May be some one has the solution ?
Thanks in advance
Did you read the manual ? (hint: Ver 6.00.03 page 51) **
Did you search/read the forum ? (a lot of messages about internal RTC)
Did you connect a supported RTC ? (DS3107,DS3231,DS3232, PCF8563, but not RV3028***)
Did you use 4 wires to connect the RTC ? ****
** It is very worthwhile to read the documentation from page 1 to page 232
*** RV3028 is supported with a later version
**** SDA,SLC,GND,VCC
Thanks for your replies.
I found only MMBasic BASIC Interpreter Ver 6.02.00.
I ‘ve connected 3.3V, GND, SDA and SCL directly to the Pico socket of Picocalc. It seems there is no signal on those pins. I tried to assign other GPIO for SDA and SCL for I2C but when I enter ‘option list’ I2C remains GP6 and GP7.
If there is another documentation, I will be happy to read it.
The Ver. 6.02.00 should also be good but there are some changes.
GND = pin 8
SDA = GP6 = pin 9
SCL = GP7 = pin 10
VCC = pin 36
OPTION SYSTEM I2C GP6,GP7,SLOW will open bus as I2C2
Now you should be able to use RTC SETTIME and RTC GETTIME
OPTION SYSTEM I2C DISABLE should also work (not in docs)
