PicoMite: Possible console timing issue with V5.05.05 betas


Author Message
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 10:39am 13 Sep 2022      

I think this issue may have been solved for someone a few months ago but I can't find the thread.

I have a breadboard setup with a standard PicoMite and SPI ILI9488 touchscreen with SD card, also several other modules; DS3231 RTC & BME280 using I2C, a buzzer and a single pin digital input from a 433MHz receiver module via a voltage divider. The console is connected to my Win7/64 notebook with TeraTerm at 38400 baud. It's all worked fine for six months or so up to and including V5.05.04 but for the last few beta versions of V5.05.05 it hangs when I try to run it - as shown below. I'm not sure exactly at which beta version the problem started.

Version 5.07.04 flashed, then program loaded via AUTOSAVE & ^Z - all OK
> ? mm.info(version)
5.0704
> run
'now running OK so try AUTORUN
> option autorun on
'plug into USB port and it runs OK again
> 24.69   36.76         29.99  '^C, program halted - back to console
>


Version 5.07.05b18 flashed, then program again loaded via AUTOSAVE & ^Z
>Saved 21520 bytes
> flash save 1
> run
'system hangs with just "[" on next line of console.
'USB port power cycled, splash screen overwrites the "[" character
PicoMite MMBasic Version 5.07.05b18
Copyright 2011-2022 Geoff Graham
Copyright 2016-2022 Peter Mather

>
> flash run 1
[
'gives same hanging problem and "[" response when trying from flash.


The OPTIONS and pin settings in the program are as below. A few lines of the program's BME280 initialisation (copied from PeterM's work) are included to show the non sytem I2C channel setup.
> option list
OPTION SYSTEM SPI GP18,GP19,GP20
OPTION SYSTEM I2C GP14,GP15
OPTION COLOURCODE ON
OPTION DISPLAY 40, 100
OPTION LCDPANEL ILI9488, RLANDSCAPE,GP26,GP27,GP28
OPTION TOUCH GP22,GP21,GP5
GUI CALIBRATE 0, 254, 139, 1289, 841
OPTION SDCARD GP0, GP16, GP1, GP17
>
' Pico Pin Settings
 Const highrestimer = 9, receiveblip = 11  'Pico pins 9 & 11 (GP6 & GP8)
 SetPin 4, PWM1A
 PWM 1,10000,50 'PWM1A pin 4 out to high resol'n timer on counting pin 9 (GP6).
 SetPin 9,CIN   'input (counting) pin for the high resolution timer.
 SetPin 11,INTL,blip  'input (receive) pin for data out (DO) of the 433MHz
 SetPin 16,17,I2C   'DA & CLK pins for the BME280

Sub bme280_init
 Local i%,cal%(17)
 I2C open 400,1000 '400KHz bus speed
 I2C write BME280_ADDRESS,1,1,BME280_REGISTER_CHIPID
 I2C read BME280_ADDRESS,0,1,i%
 If i%<>&H60 Then Print "Error BME280 not found"

On the face of it this looks like a problem with TeraTerm settings or the V5.05.05 betas. However I don't trust my OPTIONs, pin settings or the copied BME280 initialisation either, even though they work OK under V5.05.04. Can anyone suggest a fix?

Greg