![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 release candidates - all versions
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4824 |
@Peter, RC8 2040 VGA PS2 platform (OPTION RESET VGA DESIGN 2) make sure there is a program in memory (LOAD "xxx.bas") , just for the demo. RESTART (or cold boot) FONT 7 .... the screen goes black, cursor gone. blindly type: LIST Several things happen 1/ top part of the screen is not part of the listing 2/ at the listing end, when typing LIST again, the screen goes white. Other fonts seem okay, only font 7 is affected (although font 6 is a unusable for LIST, it seems to function okay). Volhout Edited 2025-04-05 00:58 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10010 |
Here you go PicoMite.zip |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4824 |
@Peter, Yes, that fixed it completely... Volhout PicomiteVGA PETSCII ROBOTS |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Program stopped. Possibly a problem in I2C ???? I can't find anything strange yet. My program worked fine for a few hours until the output to LCD 2004 with I2C stopped. Now a test with heartbeat on was first off to discover more of the problem. After a reset I got the following. RTC is not used. List system i2c does not work anymore. PicoMite MMBasic RP2350A Edition V6.00.02RC9 Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather RTC not found, OPTION RTC AUTO disabled > option list PicoMite MMBasic RP2350A Edition V6.00.02RC9 OPTION SYSTEM I2C GP4,GP5 OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION PICO OFF OPTION CPUSPEED (KHz) 150000 OPTION DISPLAY 44, 96 OPTION SDCARD GP15, GP10, GP11, GP12 > option system i2c Error : Syntax > list pins GP0 1 OFF GP1 2 OFF GP2 4 OFF GP3 5 OFF GP4 6 Boot Reserved : SYSTEM I2C SDA GP5 7 Boot Reserved : SYSTEM I2C SCL GP6 9 OFF GP7 10 OFF GP8 11 OFF GP9 12 OFF GP10 14 Boot Reserved : SD CLK GP11 15 Boot Reserved : SD MOSI GP12 16 Boot Reserved : SD MISO GP13 17 OFF GP14 19 OFF GP15 20 Boot Reserved : SD CS GP16 21 OFF GP17 22 OFF GP18 24 OFF GP19 25 OFF GP20 26 OFF GP21 27 OFF GP22 29 OFF GP23 41 OFF GP24 42 OFF GP25 43 HEARTBEAT GP26 31 OFF GP27 32 OFF GP28 34 OFF GP29 44 OFF > ? mm.info$(system i2c) I2C > ? mm.info(boot count) 35 > ? mm.info$(lcdpanel) > ? mm.info(heap) 294400 > ? mm.info(stack) 537401288 > ? mm.info(system heap) 53328 > ? mm.info(varcnt) 1 > ? mm.watchdog 0 > > list system i2c HEX 0 1 2 3 4 5 6 7 8 9 A B C D E F 00: Greetings, Jan. Edited 2025-04-05 04:23 by JanVolk |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4824 |
Jan, When the LCD blocks the I2C bus for some reason, the bus (shared with RTC) cannot find RTC, and will disable the RTC AUTO function. What are your I2C pullups ? 2k2 ? What is your RTC ? 3.3V device I assume. I assume the LCD is driven from a 3.3V PCA7584 (not a PCF7584, that is 5V). If you use 5V devices on a 3.3V I2C bus, technically it is possible Vhigh is not met. use a level shifter to be sure (*) Pullups are needed becuase the 2350 GPIO issue. Volhout I fought a DS1307 RTC for times and times, it was connected to the 3.3V bus, and worked (at least that is what I thought). In the end, I added a level shifter, and never had a problem since. Edited 2025-04-05 04:26 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10010 |
list system i2c locks up if one of sda/sck is permanently low. Something is locking up the I2C bus |
||||
ville56 Senior Member ![]() Joined: 08/06/2022 Location: AustriaPosts: 213 |
@Peter, is it intentinally that e.g. line aa 0,100,100,100,5,rgb(red) only draws a line 1 pixel wide, whereas line 0,100,100,100,5,rgb(red) draws a line 5 px wide? Conclusion: if a line has either 0, 90,180, 270 degrees orientation, the line width is not correct in LINE AA Env.: PicoMiteHDMI MMBasic RP2350B Edition V6.00.02RC9 note: seems to apply also other configs in RC9 Gerald Edited 2025-04-05 05:01 by ville56 73 de OE1HGA, Gerald |
||||
electricat![]() Senior Member ![]() Joined: 30/11/2020 Location: LithuaniaPosts: 288 |
HDMI/USB/2350 RC8 Not a big deal, however "user manual pg. 37 "Either forward or back slashes can be used in paths" Accidently found : SPRITE LOAD "b:/pathto/sprite.spr",51 will load SPRITE LOAD "b:\pathto/sprite.spr",51 will load SPRITE LOAD "b:/pathto\sprite.spr",51 will load SPRITE LOAD "b:\pathto\sprite.spr",51 Will throw error: The logical drive number is invalid My MMBasic 'sand box' |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Hello Harm, I have a 3231 RTC module on the bottom of my MAKER PI PICO board and a 2004 LCD with an I2C to parallel print on the back and placed on the side with nylon spacers as a sturdy whole. It is true that the 4x20 works on 5V but I removed the SDA and SCL pullup resistors of 4K7 from the LCD I2C print (5V) and moved them to a 3V3 connection, so that the I2C bus works on 3V3. This has been working like this for a few years without any problems. Then no problem with the 5V on the pins of the display. I had problems with the output of the display with self-made characters before. I think this has been fixed. As you may know, it is possible to use Chr$(0) to Chr$(7) for this. But with Chr$(0-255) you can also place the AscII characters on the screen with LCDI2C lineno, charno, "test" or LCDI2C lineno, charno, Chr$(nr) or LCDI2C lineno, charno, Str$( ). I called the character on the screen with Chr$(2) which resulted in a distorted Chr$(0). It turned out that I had not defined Chr$(2) which caused Chr$(0) to give nonsense. After making Chr$(2) the empty character (data byte 8 x 0) I had no more problems. I use this Chr$(nr) to show the status on the display with a letter R=Rain etc. It may happen again if I choose Chr$(1) and Chr$(3) to Chr$(7) in the program that I have not tested yet. One problem at a time. (I made this program 10 years ago with BascomAVR and it still works and now converted to MMBasic). Greetings, Jan. |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Peter, Reset on MAKER PI PICO does not help. List system i2c does not work yet. USB plug out and in and then it worked again. Possibly the LCD screen is stuck. I do use an RP2350A ??? But there is no proof yet that this is the problem? I will apply some check points to clarify the problem. Greetings, Jan. |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Harm and Peter, The I2C chips I have are HLF8574T and on the MAKER PI PICO a PCF8574T and a 2004 LCD 4x20 and a blue DS3231 module with 24C32N EEProm and CR2032 button cell from China. The I2C bus is loaded with 2x4K7 parallel, so 2K35 on the SDA and on the SCL. The LCDI2C subroutine I use is the same as the pdf I recently posted with I2C examples. If there are any questions, please let me know. Greetings, Jan. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10010 |
V6.00.02RC10 is available on https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip Fixes bug in SPRITE LOAD filename parsing Stops LIST SYSTEM I2C locking up Fixes bug in switching to Font 7 in mode 1 VGA Fixes reported characters in line when font 8 used in 1280x720 and 1024x768 resolution Supports variable frequency for BACKLIGHT command BACKLIGHT n [,FreqInHz] Adds: MM.HEIGHT 'the number of character across the physical display with the current font MM.WIDTH ' the number of characters down the display with the current font MM.DISPLAY 'returns 1 if a physical display is configured, otherwise 0 Edited 2025-04-06 17:35 by matherp |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Peter, I tested the firmware version PicoMite MMBasic RP2350A Edition V6.00.02RC10 and it worked all day without any problems without any error messages and everything continues to work. Now the option autorun on is enabled. Unfortunately, it now goes wrong with regard to the DS18B20 OneWire temperature sensors. I see that the DS18B20 sensor on GP13 still works correctly but the DS18B20 sensor on GP14 returns 10 degrees too high, which was not the case with OPTION AUTORUN disabled and both indicated the correct value. This problem occurred on my MAKER PI PICO and on my OLIMEX board. On the Olimex there is a RaspBerry Pi Pico W with PicoMite MMBasic RP2350A Edition V6.00.02RC10 firmware with the same problem. With this list it went well. > option list PicoMite MMBasic RP2350A Edition V6.00.02RC10 OPTION SYSTEM I2C GP4,GP5 OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION PICO OFF OPTION CPUSPEED (KHz) 150000 OPTION DISPLAY 44, 96 OPTION SDCARD GP15, GP10, GP11, GP12 OPTION RTC AUTO ENABLE This list is wrong. > option autorun on > option list PicoMite MMBasic RP2350A Edition V6.00.02RC10 OPTION SYSTEM I2C GP4,GP5 OPTION AUTORUN ON OPTION FLASH SIZE 16777216 OPTION COLOR CODE ON OPTION PICO OFF OPTION CPU SPEED (KHz) 150000 OPTION DISPLAY 44, 96 OPTION SDCARD GP15, GP10, GP11, GP12 OPTION RTC AUTO ENABLE > Greetings, Jan. |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Peter, Original program option autorun on --------------------- Outside temp. : 28.95 Inside temp. : 18.625 Window position_adc : 2.583992674 Window position : 0 Rain detector : 2.606153846 ........ > Original program option autorun off --------------------- Outside temp. : 18.7625 Inside temp. : 18.8125 Window position_adc : 2.592857143 Window position : 0 Rain detector : 2.619450549 ........ Here is a shortened program where it works fine with option autorun on. Rest of the week I will do further research in the original program. Program is 1100 lines so some research and I'll come back to it or something will come to light sooner? Dim Temperature(5) Dim Inside_temp Dim Outside_temp Dim Windowposition Windowposition = 10 LCDI2C_Init &H20, 1, 0, 2, 3 ' 4x20 LCD PCF8574A LCDI2C_BackLightOn LCDI2C_CLEAR() Do Read_ds1 Read_ds2 LCDI2C_CMD(64) LCDI2C_DATA(7) : LCDI2C_DATA(5) : LCDI2C_DATA(7) : LCDI2C_DATA(0) LCDI2C_DATA(0) : LCDI2C_DATA(0) : LCDI2C_DATA(0) : LCDI2C_DATA(0) LCDI2C 1, 1, "OutdoorTemp.:R C" LCDI2C 1, 15, Str$(Temperature(2), 2, 1) LCDI2C 1, 19, Chr$(0) LCDI2C 2, 1, "Indoor Temp.: C" LCDI2C 2, 15, Str$(Temperature(1), 2, 1) LCDI2C 2, 19, Chr$(0) LCDI2C 3, 1, "Window position :R %" LCDI2C 3, 15, Str$(Window position, 2, 1) LCDI2C 4, 1, " " LCDI2C 4, 1, "zo" LCDI2C 4, 4, Left$(Date$, 5) LCDI2C 4, 16, Left$(Time$, 5) Print " ******* Log climate ********" Print " Outside temperature :" ; Temperature(2) Print " Inside temperature :" ; Temperature(1) Print " Window position :" ; Window position Print " Date : "; Date$ Print " Time : "; Time$ Pause 10000 Loop End Sub Read_ds1 ' Read DS18B20 out TEMPR START GP13, 3 ' 2=0.125C 400mS 3=0.0625 800mS 1=0.25C 200mS stand. ' Tempr(GP13) Temperature(1) = TEMPR(GP13) ' InsideTemperature(13) Pause 800 End Sub Sub Read_ds2 ' Read DS18B20 out TEMPR START GP14, 3 ' 2=0.125C 400mS 3=0.0625C 800mS 1=0.25C 200mS stand. ' Tempr(GP14) Temperature(2) = TEMPR(GP14)-0.3 ' Outside Temperature(14) Pause 800 End Sub ' ******************************************************** ' ** All subroutines for LCD 16x2 and 20x4 ** ' ** Line=1-4, Char=1-16, Text$=CHR$+ALL CHARACTERS ** ' ******************************************************** ' LCDI2C Line, Char, Text$ Sub LCDI2C(LineNum, CharPos, Text$) Local I If LineNum = 1 Then I = (&H80 + CharPos - 1) If LineNum = 2 Then I = (&HC0 + CharPos - 1) If LineNum = 3 Then I = (&H94 + CharPos - 1) If LineNum = 4 Then I = (&HD4 + CharPos - 1) LCDI2C_CMD(I) For I = 1 To Len(Text$) LCDI2C_DATA(Asc(Mid$(Text$, I, 1))) Next I End Sub The remaining subroutines of LCDI2C are continued below. Greetings, Jan. |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2407 |
Unable to replicate the TEMPR issue AHT10 DS3231 Temp distance DS18B20 DS18B20 DHT11 The difference between the DS18B20s is mainly due to their different locations plus 0.4°C calibration error in a non-genuine unit.67 % 12.3`C 12`C 232 mm 13.6`C 12.7`C 12.5`C 78 % The Sub Sub DS18B20 TEMPR START 9,3 TEMPR START 10,3 DS1 = Cint(TEMPR(9)*10)/10 DS2 = Cint(TEMPR(10)*10)/10 End Sub But when loading options from .OPT file OPTION DISPLAY changed to 0,0 which was quite confusing. For RP2350A VGA RC10. using TeraTerm. Edited 2025-04-07 11:53 by phil99 |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Gentlemen, The problem with option autorun on and off has become a bit clearer. Program run with OPTION AUTORUN OFF works well with regard to outside temperature. Program run with OPTION AUTORUN ON works well with regard to outside temperature. If I restart the module with a reset, no problem yet. If I disconnect the USB cable and reconnect it, no problem yet. In both cases, Tera Term was active. If I do not log in with Tera Term and give a reset, I have the problem that outside temperature measures 10 degrees higher than before. This is also the case if I use a separate 5V adapter instead of a USB laptop and therefore have OPTION AUTORUN ON. Unfortunately, the above is not always the case with Tera Term connected. Also did some tests for a second Tera Term connection, after which it all goes wrong. See further. My suspicions are in the direction of data control via USB from Tera Term with OPTION AUTORUN ON? But still not clear why measure 10 degrees higher with OPTION AUTORUN ON and only a separate power supply? Looked a bit further and now a blocking of the I2C bus. > RTC not found, OPTION RTC AUTO disabled > > option heartbeat on > option list PicoMite MMBasic RP2350A Edition V6.00.02RC10 OPTION SYSTEM I2C GP4,GP5 OPTION AUTORUN ON OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION PICO OFF OPTION CPUSPEED (KHz) 150000 OPTION DISPLAY 44, 96 OPTION SDCARD GP15, GP10, GP11, GP12 > 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > run Now heartbeat has also stopped. Maybe I need to flash the firmware again? To be continued. Greetings, Jan. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10010 |
Try a short pause before doing the first temperature reading to allow everything to stabilise |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Peter, When starting up I already have a wait of 6 seconds for a welcome screen before the measurements start. Another observation. The program was stuck, no heartbeat and no I2C but I could still look into the controller. > list pins GP0 1 OFF GP1 2 OFF GP2 4 OFF GP3 5 OFF GP4 6 Boot Reserved : SYSTEM I2C SDA GP5 7 Boot Reserved : SYSTEM I2C SCL GP6 9 OFF GP7 10 DIN GP8 11 DIN GP9 12 DIN GP10 14 Boot Reserved : SD CLK GP11 15 Boot Reserved : SD MOSI GP12 16 Boot Reserved : SD MISO GP13 17 OFF GP14 19 OFF GP15 20 Boot Reserved : SD CS GP16 21 DOUT GP17 22 DOUT GP18 24 OFF GP19 25 OFF GP20 26 OFF GP21 27 OFF GP22 29 OFF GP23 41 OFF GP24 42 OFF GP25 43 DOUT GP26 31 AIN GP27 32 AIN GP28 34 OFF GP29 44 OFF > option list PicoMite MMBasic RP2350A Edition V6.00.02RC10 OPTION SYSTEM I2C GP4,GP5 OPTION AUTORUN ON OPTION FLASH SIZE 16777216 OPTION COLOURCODE ON OPTION PICO OFF OPTION CPUSPEED (KHz) 150000 OPTION DISPLAY 44, 96 OPTION SDCARD GP15, GP10, GP11, GP12 > 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: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- > But I thought the flashing went well but it really didn't because OPTION AUTORUN ON held everything up. If I stop this with OPTION AUTORUN OFF the I2c works again and the flashing works again. Does it all sound intense? Greetings, Jan. |
||||
JanVolk Senior Member ![]() Joined: 28/01/2023 Location: NetherlandsPosts: 217 |
Peter, I deleted a few old OneWire lines which may have caused the problems? Option autorun on Option rtc auto enable. HEARTBEAT GP25 had the same number in my program so changed to GP21. At start Pause 2000 At welcome screen Pause 3000 At sub outside and sub inside temperature Pause 2000 Calculate every 60 seconds. So far it works fine with an external USB power supply so only 2004 LCD 4x20 for checking and waiting. Greetings, Jan. |
||||
circuit Senior Member ![]() Joined: 10/01/2016 Location: United KingdomPosts: 268 |
Peter, where are we with retaining the BIT() command and function? I was overjoyed when you introduced this command/function because I mainly use my pico/micromites for embedded control. The BIT command/function has made switching PORT outputs so much simpler in coding. It is also simply fantastic for serial protocols using shift registers. I am now stuck with having loaded up my picomites with the last code to retain the BIT command/function and it is not clear to me whether or not the latest download will have these available; I don't want to overwrite and find that I have lost these command/functions. PLEASE, if it is at all possible, can we retain this most welcome functionality? I realise that you were thinking originally only of a neat way to provide flags, but what you provided was a REALLY neat way of engaging serial protocols for shift registers. The TPIC6595N Power Logic Shift Register provides 8 x 250mA switched outputs per chip and that is where I am using the BIT command/function. |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |