Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:38 22 Nov 2024 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 : ArmmiteF407 V5.07.02 betas - Library - No Battery and more.

     Page 3 of 7    
Author Message
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 142
Posted: 02:04am 26 Aug 2023
Copy link to clipboard 
Print this post

I tried both yours and Peters last firmware loads. Both do the same error with lcd console on. I went back to Peters previous firmware from 2021 and no error. Edit works and saves fine. Somewhere in Peters last update got a bug and followed into your update too. I was thinking I screwed something up on my board. I hope it is an easy fix as I love all the new stuff you both added.
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 03:34am 26 Aug 2023
Copy link to clipboard 
Print this post

Can you give a printout of results of  for commands.
a) OPTION LIST
b) MEMORY

Thanks
Gerry
Latest F4 Latest H7
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 02:57pm 26 Aug 2023
Copy link to clipboard 
Print this post

I have an F4 set up with an 800x480 IPS LCD:
OPTION LCDPANEL IPS_4_16, LANDSCAPE

That works fine.

Every time I unplug it, though, it resets to the default: OPTION LCDPANEL ILI9341_16, RLANDSCAPE

Is there something I'm doing wrong?

OPTION LIST after setting LCDPANEL and other things:

ARMmite F407 MMBasic Version 5.07.02b0
OPTION COLOURCODE ON
OPTION DISPLAY 40, 120
OPTION LCDPANEL IPS_4_16, LANDSCAPE
OPTION TOUCH PB12, PC5
GUI CALIBRATE 0, 3969, 3931, -2047, -1272
DEFAULT BACKLIGHT 50


This has now happened 5 times.

~
Edited 2023-08-27 01:00 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 142
Posted: 03:41pm 26 Aug 2023
Copy link to clipboard 
Print this post

I got my second board and display out , never programmed before. I loaded your program and did a k0 reset with power before use. I left it no console and tried to edit. It worked ok. I put a small basic program in. It ran ok. I then changed to lcdpanel console and ran the program. Ran ok. I tried to edit the program and the error shows up about not enough memory. Pictures attached....




 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 04:16pm 26 Aug 2023
Copy link to clipboard 
Print this post

  lizby said  Every time I unplug it, though, it resets to the default: OPTION LCDPANEL ILI9341_16, RLANDSCAPE


Correction: only sometimes when unplugged does it reset to the default. Could this be a battery problem?
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9084
Posted: 05:25pm 26 Aug 2023
Copy link to clipboard 
Print this post

  Quote  Correction: only sometimes when unplugged does it reset to the default. Could this be a battery problem?


As I understand Gerry's changes, options are still stored in battery-backed ram but you can now set and save options in a program so if the battery fails the program can restore the options and you can use OPTION SAVE to make options set in a program permanent (see the first post)

Don't know how, if, this handles option autorun as if options are lost and then presumably the program won't autorun to re-establish them - one for Gerry to explain
 
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 244
Posted: 06:20pm 26 Aug 2023
Copy link to clipboard 
Print this post

  lizby said  
Correction: only sometimes when unplugged does it reset to the default. Could this be a battery problem?


Certainly the most likely reason.  With ten boards in the store cupboard (batteries out) brought back to life, I see the same issue. The batteries supplied with the boards seem not to be of the best quality and lose volts within months even when not on the boards.  Check the voltages under load on the board.  I have replaced the battery holder on a couple of my working boards with 2450 cells - perhaps a little overkill, but should last a decade.  

As Peter said, the new option save system is designed to allow the boards to operate without the battery but I have not yet had time to try this out. And that is despite me asking specifically for this mode of operation; but with so much new stuff on the Mites at the moment it is like Christmas.  It will take a little while to open all the new presents! -especially with a Micromite Extreme update on the horizon...
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 08:45pm 26 Aug 2023
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Correction: only sometimes when unplugged does it reset to the default. Could this be a battery problem?


As I understand Gerry's changes, options are still stored in battery-backed ram but you can now set and save options in a program so if the battery fails the program can restore the options and you can use OPTION SAVE to make options set in a program permanent


  circuit said  Certainly the most likely reason.


Thanks for that. What am I doing wrong below, that it says "Error : Display already configured"? If I do "OPTION LCDPANEL DISABLE" before running the code, it works, but then doesn't work on re-running it.

> run
[4] Option LCDPANEL IPS_4_16, LANDSCAPE
Error : Display already configured
> option list
ARMmite F407 MMBasic Version 5.07.02b0
OPTION COLOURCODE ON
OPTION DISPLAY 40, 120
OPTION LCDPANEL IPS_4_16, LANDSCAPE
OPTION TOUCH PB12, PC5
GUI CALIBRATE 0, 3969, 3931, -2047, -1272
DEFAULT BACKLIGHT 50
> list
' mazist
Option COLOURCODE ON
Option DISPLAY 40, 120
Option LCDPANEL IPS_4_16, LANDSCAPE
Option TOUCH PB12, PC5
GUI CALIBRATE 0, 3969, 3931, -2047, -1272
Option SAVE
'-------------------------------------------------------------------
'       MAZIST - by Geoff Camp, 2021 - v0.9
'-------------------------------------------------------------------


Hmmm, I see that I have to put "Option LCDPANEL DISABLE" in the code first.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2129
Posted: 09:52pm 26 Aug 2023
Copy link to clipboard 
Print this post

To avoid the need for OPTION AUTORUN add this to the program or Library.
SUB MM.Startup
  RUN
End Sub
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 12:02am 27 Aug 2023
Copy link to clipboard 
Print this post

Error: Not Enough Memory
I can see on the ILI9341_16 screens when OPTION LCDPANEL CONSOLE is set, I think I have a fix for that. This does not affect the SSD1963_x_16 displays with hardware scrolling.I suspect the IPS_4_6 will has this issue as well, same fix.

I also am seeing the editor not quite working correctly when OPTION LCDPANEL CONSOLE is set.
It seems to use double spaced lines, it corrects itself if scrolling with UP/DOWN arrows only, but PgUp,PgDown, Home and End show the double spacing.Its double spaced when initially opened.

running without a battery

The manual has a section for running without a battery.
Here is an example , I think its correct. Most of the key stuff has been mentioned above. i.e.
OPTION DISABLE is required
..
.
OPTION SAVE is required to for the restart with the new options

OPTION AUTORUN ON in MM.STARTUP so it knows to run the program


'This block of code will disable the default LCDPANEL
'Configure the ILI9486_16 and the Touch panel and switch to the serial
'console at 38400 and then restart with the new settings


OPTION LCDPANEL DISABLE
OPTION LCDPANEL ILI9486_16, LANDSCAPE
OPTION TOUCH PB12, PC5
'GUI CALIBRATE 0, 3756, 3901, -882, -647
GUI CALIBRATE 0, 4012, 3900, -1271, -868
BACKLIGHT 80,S
OPTION FLASH_CS 35 '35 for VET6 77 for Mini VET6
' =====================================================
' the Options below need a restart.
' The saving of the Option is delayed when they are
' included in a program. They are saved and a Restart
' is initiaited when OPTION SAVE is initiated. The
' OPTION SAVE must directly follow these options.
' ======================================================
OPTION CONTROLS 100
OPTION SERIAL PULLUP DISABLE
'OPTION SERIAL CONSOLE ON
'OPTION BAUDRATE 38400
OPTION SAVE
'The main program is then placed here
'it must include the MM.STARTUP Subroutine somewhere
CLS RGB(GREEN)
TEXT 10,10,"READY",,2,2
PRINT "READY"
PRINT "----------------"
OPTION LIST
PRINT "----------------"
VAR FRESTORE     'get the saved  vars from winbond flash to RAM
VAR RESTORE      ' restore the variables
'IF MM.info(STARTUP)=1 THEN
'  OPTION RESTART 2                'This command coming beta1
'  INC powercount%
'  VAR SAVE powercount%
'  VAR FSAVE       ' backup the RAM to Windbond Flash
'END IF
'PRINT "POWER COUNT=",powercount%  

'MM.STARTUP cannot be located in the Library if battery is missing or
'or battery is flat as the Libray pointer would not be restored before
'MM.STARTUP is called. Also OPTION FLASH_CS would not be set to the correct value
'for the VET6 MINI.
SUB MM.STARTUP
 PRINT "Begin MM.STARTUP"
 PRINT "   Option restart="+MM.INFO(RESTART)
 OPTION FLASH_CS 35  '77 for VET6 MINI
 LIBRARY CHECK
 OPTION AUTORUN ON
 PRINT "End MM.STARTUP"
 
 
END SUB

' Put this code in the library first
'? "Code in Library Executed"




I will post an updated when I can resolve these.

Regards
Gerry
Latest F4 Latest H7
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 10:19am 27 Aug 2023
Copy link to clipboard 
Print this post

Armmite F4 5.07.02 Beta 1

Manual and Firmware
ArmmiteF4_5.07.02betas.zip


Fixes
Resolves the Not Enough Memory when using EDIT with OPTION LCDPANEL CONSOLE.
It affected all LCDs without hardware scrolling. i.e. all except SSD1963_x_16

Resolves issue of double spacing of lines when using the EDIT command with OPTION LCDPANEL CONSOLE set.

Function RGB() now accepts  GREY
ST7735S IPS 160*80 SPI LCDPanel support added.

Updates for no Battery
These additions can help to setup running without a battery.
New Option
OPTION RESTART [0|1|2]

Option.Restart is save in the Options.
It can have three values.
0 - This is the default value set by MMBasic at power up or OPTION RESET.
1 - This is set only whenever the OPTION SAVE command finds it at 0
2 - This can only ever be set explicitly by a MMBasic program with command
   OPTION RESTART 2
The value of Option.Reset can be read  by MM.INFO(RESTART)

When you might used these.
1.During testing you can use these two commands to simulate a power restart.
OPTION RESET 0            'Put it to the default value
CPU RESTART               'Restarts MMBasic
These are nearly equivalent to a power refresh it you don't want to keep pulling the power.

2.To test in code when a power restart has occured.
IF MM.INFO(RESTART)=1 THEN
  OPTION.STARTUP 2
  Print "Power restart"
ENDIF
Option.Restart is only ever set to 1 when OPTION SAVE is encountered while it is 0
If you set it to 2, it wont update UNLESS it first goes to 0 .i.e. power restart.

Example of No Battery Setup

'This block of code will disable the default LCDPANEL
'Configure the ILI9486_16 and the Touch panel and switch to the serial
'console at 38400 and then restart with the new settings


OPTION LCDPANEL DISABLE
OPTION LCDPANEL ILI9486_16, LANDSCAPE
OPTION TOUCH PB12, PC5
'GUI CALIBRATE 0, 3756, 3901, -882, -647
GUI CALIBRATE 0, 4012, 3900, -1271, -868
BACKLIGHT 80,S
OPTION FLASH_CS 35 '35 for VET6 77 for Mini VET6
' =====================================================
' the Options below need a restart.
' The saving of the Option is delayed when they are
' included in a program. They are saved and a Restart
' is initiaited when OPTION SAVE is initiated. The
' OPTION SAVE must directly follow these options.
' ======================================================
OPTION CONTROLS 100
OPTION SERIAL PULLUP DISABLE
'OPTION SERIAL CONSOLE ON
'OPTION BAUDRATE 38400
OPTION SAVE
'The main program is then placed here
'it must include the MM.STARTUP Subroutine somewhere
CLS RGB(GREEN)
TEXT 10,10,"READY",,2,2
PRINT "READY"
PRINT "----------------"
OPTION LIST
PRINT "----------------"
VAR FRESTORE     'get the saved  vars from winbond flash to RAM
VAR RESTORE      ' restore the variables
IF MM.info(STARTUP)=1 THEN
 OPTION RESTART 2
 INC powercount%
 VAR SAVE powercount%
 VAR FSAVE       ' backup the RAM to Windbond Flash
END IF
PRINT "POWER COUNT=",powercount%  

'MM.STARTUP cannot be located in the Library if battery is missing or
'or battery is flat as the Library pointer would not be restored before
'MM.STARTUP is called. Also OPTION FLASH_CS would not be set to the correct value
'for the VET6 MINI.
SUB MM.STARTUP
 PRINT "Begin MM.STARTUP"
 PRINT "   Option restart="+MM.INFO(RESTART)
 OPTION FLASH_CS 35  '77 for VET6 MINI
 LIBRARY CHECK
 OPTION AUTORUN ON
 PRINT "End MM.STARTUP"
 
 
END SUB

' Put this code in the library first
'? "Code in Library Executed"


Latest F4 Latest H7
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 142
Posted: 03:16pm 27 Aug 2023
Copy link to clipboard 
Print this post

Gerry , Thank you very much. It works perfect now. I did not expect you to do it so fast.
And by the way , welcome to the "Can you fix this?" club. Might give Peter a well deserved break.
Jack
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 144
Posted: 07:18pm 31 Aug 2023
Copy link to clipboard 
Print this post

Having trouble with 5" ssd1963 and touch. TFT works OK on its own, but enable touch and TFT no longer works, no error messages, not sure wether mmbasic is still running. disable touch and normal service resumes. using 5.07.02b0, option ssd1963_5_16,L, option touch pb12,pc5 and a V36 board with the different LCD pinout. touch connections have been hardware checked & are OK.
Has anyone had ssd1963 and touch working OK???

Trevor
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:24pm 31 Aug 2023
Copy link to clipboard 
Print this post

Just retested here OK with one of my original boards V2.1 with orginal pin out.
Does it work OK with BACKLIGHT 100 without the touch. The SSD1963 5" will normally run OK from USB power but worth checking it runs OK with full brightness.

Gerry
Latest F4 Latest H7
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 04:51am 01 Sep 2023
Copy link to clipboard 
Print this post

I think this is the alternate FSMC connector that some have received. The board is identified by the New-TFT on the silkscreen next to the connector.
Can anyone who has received one lately verify the version on the back of the board.
Could be V36 based on Trevor's post above. What is the version of the recent boards still  with the original FSMC layout, anything later that V33 ?



Will add to the next manual update.

Thanks
Gerry
Latest F4 Latest H7
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3797
Posted: 07:00am 01 Sep 2023
Copy link to clipboard 
Print this post

I just received a board marked V36.

If you want me to report anything about it please let me know what.

Oh - typo above: I think FMSC should be FSMC.

John
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 144
Posted: 09:16am 01 Sep 2023
Copy link to clipboard 
Print this post

Is this a peculiarity with the later version board only, as clearly the old FSMC connector board works OK. Will do some more testing today. The pinout is identical except for pins 1,2,29 & 32, correct me if I am wrong.
I have done the LED-A mod on the display and used backlight 100 OK.
Trevor
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:59am 01 Sep 2023
Copy link to clipboard 
Print this post

  TrevorH said  The pinout is identical except for pins 1,2,29 & 32, correct me if I am wrong.

Yes these appear to be the only difference that I can see (I don't have one).
I guess you have connected the SSD1963 by wiring the relevant pins with jumpers.
As I understand it, once you enable touch with OPTION TOUCH PB12,PC5 it appears just to freeze.i.e can't get a response from the console. How do you recover from there, unplug the LCD Panel and restart? Power Restart with K1 held down?
You could try BACKLIGHT 0,S to turn backlight completely off, then check whether enabling touch causes the same freeze.(This will prevent backlight using any power to prove it not a power issue.)

You are probably the first to use the SSD1963 with the new FSMC layout, but on the surface this should not cause a problem.

Regards
Gerry
Latest F4 Latest H7
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 144
Posted: 12:10pm 01 Sep 2023
Copy link to clipboard 
Print this post

I have done my own PCB for the conversion using SL6, home etched, will do some more testing and report back.

Trevor
 
TrevorH
Senior Member

Joined: 06/04/2018
Location: United Kingdom
Posts: 144
Posted: 12:59pm 01 Sep 2023
Copy link to clipboard 
Print this post

If I load a picture onto LCD from SDcard, works OK, enable touch and then run gui test lcdpanel, the picture stays on the LCD but is flashing on and off. If I then ctrl-c to exit the test (console NOT frozen) and run cls rgb(red) console responds OK but nothing on LCD. It's as if the LCD is not enabled any more.

I did check 3v3 with and without LCD and with or without touch, also backlight %, no change.

Trevor
Edited 2023-09-01 23:09 by TrevorH
 
     Page 3 of 7    
Print this page
© JAQ Software 2024