Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:12 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 4 of 7    
Author Message
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6761
Posted: 01:20pm 01 Sep 2023
Copy link to clipboard 
Print this post

Watch the resistance of the GND connection on the SSD1963. The backlight current can "lift" the GND rail unless you make it really low resistance and that messes up the data signals. Ideally you should have a heavy track or wire back to the incoming 5V capacitor, with a separate GND line to the controller (F4 / Pico) from the same point.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 07:53pm 01 Sep 2023
Copy link to clipboard 
Print this post

Board arrived and programmed OK. LCD panel configured OK ILI341, but touch will not configure I use 'OPTION TOUCH PB12 ,PC5 ' and I get an error, Pin 0,PA-1 is invalid
What is my problem.

Edit.... I loaded the latest version of the software and with the defaults the panel tested ok but touch was reversed right to left on the lcdpanel, so I disabled the options and entered them again.
OPTION LCDPANEL ILI931, L, PE0, PD6, PC4  and all I get is a white screen.
Also how do I get the default options back, when I repower the board the defaults are not there.
Edited 2023-09-02 07:07 by palcal
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9084
Posted: 09:41pm 01 Sep 2023
Copy link to clipboard 
Print this post

  Quote  Also how do I get the default options back,


Option reset

then GUI cqalibrate


should sort it for you based on your post
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 11:09pm 01 Sep 2023
Copy link to clipboard 
Print this post

Thanks Peter, that fixed it.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 206
Posted: 06:32am 03 Sep 2023
Copy link to clipboard 
Print this post

  disco4now said  Armmite F4 5.07.02 Beta 1

Manual and Firmware
ArmmiteF4_5.07.02betas.zip

(...)



ARMmite MMBasic Version 5.07.02b1

                                Copyright 2011-2023 Geoff Graham

                                                                Copyright 2016-2023 Peter Mather



                                                                                                > ARMmite MMBasic
> list
Print Time$,MM.Ver
> run
08:25:59         5.070201
08:25:59         5.070201
> new
Error : Flash write fail
> new
Error : SPI1 Already open
> new
Error : SPI1 Already open

-andreas
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 07:52am 03 Sep 2023
Copy link to clipboard 
Print this post

Anymore info.
Has the board worked before on previous version of MMBasic?
What does OPTION LIST produce?
Anything in the Library ? Library List
Have you tried a reset of MMBasic i.e. K1 held down while powering up.


Regards
Gerry
Latest F4 Latest H7
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2132
Posted: 08:07am 03 Sep 2023
Copy link to clipboard 
Print this post

  Quote  reset of MMBasic i.e. K1 held down while powering up
As noted previously that step is mandatory after updating the firmware or odd things may happen.
 
disco4now

Guru

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

OK I think this is what is happening. I see you have a new board that was started with an older version of MMBasic, i.e. pre Library.

OPTION PROG_FLASH_SIZE did not exist in that version. The options are saved in backup RAM and are not deleted when new firmware is loaded. The new firmware reads OPTION PROG_FLASH_SIZE to see if a Library exists, it gets it where its expected to be and the value is rubbish, but does say a library exists at this rubbish address.

A NEW command will always Append the Library after it clears the program as a NEW does not get rid of the Library. It will open SPI1 to read the library from the Windbond flash and saves to the internal Flash at the specified (rubbish) address. This attempt to write at a bad address results in the Error : Flash write fail. So the append never completes and SPI1 is not closed, hence subsequent NEW commands can't even get past trying to access the Windbond.
In Beta2 I will close SPI1 before it attempts the Append so you will always continue to get the Error : Flash write fail.

RESETTING MMBASIC
DON'T FORGET HOW TO DO THIS - It will save you when you think all is lost!!!

MMBasic can be reset to its original configuration using the following method:
Holding KEY 1 down, while applying power (or pressing the RST button).
Using the RST in lieu of applying power does not always seem to work so applying power needs to be used if RST does not seem to be doing it.
You can connect ground to PE3 pin if you find it difficult to hold the small button down.
This will result in the program memory , saved variables and Library being completely erased and all options (security PIN, console baud rate, etc.) will be reset to their initial defaults. This includes setting the console to the USB.
A following Key 0 down with a RST (or power up) will switch to the Serial Console if you are not using USB console.

You will need to Reset MMBasic after you upgrade to the new firmware as commands have changed and updating the firmware will not explicitly delete the program memory or reset the Options .

I have many times thought I have killed an Armmite F4 and resetting MMBasic fixed it..
Edited 2023-09-03 18:29 by disco4now
Latest F4 Latest H7
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9084
Posted: 08:55am 03 Sep 2023
Copy link to clipboard 
Print this post

Gerry

In the MMX code I'm thinking of getting rid of the buffered display drivers and implementing the framebuffer concept from the PicoMite. This is more powerful, improves compatibility, and with parallel displays things like framebuffer copy will be extremely fast. I haven't decided whether to make the framebuffer RGB232 or RGB121. For the MMX and ArmmiteH7 RGB232 is doable but the F4 would need 121 to allow the most flexibility.

Thoughts?
Edited 2023-09-03 18:55 by matherp
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6091
Posted: 09:34am 03 Sep 2023
Copy link to clipboard 
Print this post

  matherp said  Gerry

In the MMX code I'm thinking of getting rid of the buffered display drivers and implementing the framebuffer concept from the PicoMite.
Thoughts?


Yes please.

Jim
VK7JH
MMedit   MMBasic Help
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 10:58am 03 Sep 2023
Copy link to clipboard 
Print this post

  matherp said  Gerry

In the MMX code I'm thinking of getting rid of the buffered display drivers and implementing the framebuffer concept from the PicoMite. This is more powerful, improves compatibility, and with parallel displays things like framebuffer copy will be extremely fast. I haven't decided whether to make the framebuffer RGB232 or RGB121. For the MMX and ArmmiteH7 RGB232 is doable but the F4 would need 121 to allow the most flexibility.

Thoughts?

OK I have just read about FRAMEBUFFER and think I understand them. On the F4 the frame buffer would come off the MMBASIC 128K of ram.i.e. 38400 bytes for each frame buffer on a 320x240 display(I think this is how the Picomites work?). The F4 is pretty full as far as flash for the firmware goes so depending on size something else might have to make way.
Latest F4 Latest H7
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 206
Posted: 03:39pm 03 Sep 2023
Copy link to clipboard 
Print this post

  disco4now said  Anymore info.
Has the board worked before on previous version of MMBasic?
What does OPTION LIST produce?
Anything in the Library ? Library List
Have you tried a reset of MMBasic i.e. K1 held down while powering up.


Regards
Gerry


I think I had a jumper missing between BT1 and GND. I looked at the picture in the handbook page 14. There are two jumpers dragging BT0 & BT1 to GND. I had only one jumper between BT0 and GND.

Now it seems to work.

To answer your questions:
- yes it worked before with 5.0701
- OPTION LIST is standard

ARMmite F407 MMBasic Version 5.07.02b1
OPTION COLOURCODE ON
OPTION LCDPANEL ILI9341_16, RLANDSCAPE
OPTION TOUCH PB12, PC5
GUI CALIBRATE 0, 355, 205, 944, 668
DEFAULT BACKLIGHT 50

empty library
no K1 key during boot (I didn't know that this is required)

-andreas
 
TrevorH
Senior Member

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

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


Have you got an SSD1963 TFT board to hook up and test to see if your board does same as mine with touch enabled?
The problem I have is that enabling touch seems to disable writing to the TFT although TFT is still enabled. I wonder if there is something else different with the board other than the pinout difference.

Trevor
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3797
Posted: 05:05pm 04 Sep 2023
Copy link to clipboard 
Print this post

It's ILI9341

John
 
andreas

Senior Member

Joined: 07/12/2020
Location: Germany
Posts: 206
Posted: 08:34pm 04 Sep 2023
Copy link to clipboard 
Print this post

Hello,

I missed the TURTLE Graphics in ARMmite F4, so I wrote a tiny library:

> list "turtle-library.bas"
' turtle library
' (c) 2023 Andreas Mueller, Gerolsbach (AMI), version 1.3

Dim gx,gy,pen,farbe,heading As integer

Sub turtle_reset
 gx=0
 gy=0
 pen=0
 heading=0
 farbe=RGB(black) AND &hFFFFFFFFFFFEFEFE
End Sub

Sub turtle_pen_up
 pen=0
End Sub

Sub turtle_pen_down
 pen=1
End Sub

Sub turtle_move(x,y)
 If pen=1 Then
   Line gx,gy,x,y,,farbe
 EndIf
 gx = x
 gy = y
End Sub

Sub turtle_pen_colour(c)
 farbe = c AND &hFFFFFFFFFFFEFEFE
End Sub

Sub turtle_heading(h)
 heading = h
End Sub

Sub turtle_forward(f)
phi = Pi*(heading+270)/180
If pen=1 Then
  Line gx,gy,gx+f*Cos(phi),gy+f*Sin(phi),,farbe
EndIf
gx=gx+f*Cos(phi)
gy=gy+f*Sin(phi)
End Sub


Here is a test program:

> list
' test turtle

CLS
t = Timer
turtle_reset
turtle_pen_colour(RGB(yellow))
turtle_move(100,100)
turtle_pen_down
turtle_heading(90)
turtle_forward(100)
turtle_heading(180)
turtle_forward(100)
turtle_pen_colour(RGB(cyan))
turtle_heading(270)
turtle_forward(100)
turtle_heading(0)
turtle_forward(100)

Text 110,110,Str$(Timer-t)+" ms"


It needs 2.72 ms to draw a two-colored square.



-andreas
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:43pm 04 Sep 2023
Copy link to clipboard 
Print this post

  TrevorH said  

Have you got an SSD1963 TFT board to hook up and test to see if your board does same as mine with touch enabled?
The problem I have is that enabling touch seems to disable writing to the TFT although TFT is still enabled. I wonder if there is something else different with the board other than the pinout difference.

Trevor


I have an SSD1963 on the old board. It works with Touch, but SDCard stops working when backlight is above 1% . Also the performance of GUI TEST TOUCH varies quite a bit depending on the setting of Backlight at 100% is all over the place. I am in the process of giving the the SSD1963 its own 3.3v regulator to see if its power/noise related. I am suspicious the 5" SSD1963 might be marginal running off the 3.3v from the board itself.

Gerry
Latest F4 Latest H7
 
ice2642

Regular Member

Joined: 27/05/2023
Location: Brazil
Posts: 82
Posted: 02:12am 05 Sep 2023
Copy link to clipboard 
Print this post

Hello,

I wold like to know if is it possible to connect one esp32 running fabGL by i2c to one demo board like this STM32xxx running mmbasic to be used like a graphics chip/card for VGA output?

Best regards,
MMBasic 5.0707 on PicoMite VGA
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4213
Posted: 06:17am 05 Sep 2023
Copy link to clipboard 
Print this post

There is technically no objection, but the software does not exist.
So you will have to write it yourself.

Using I2C to transfer ASCII data is perfectly possible. If you want the VGA display to show graphics, you will need to transfer pixel data. That may be slow on the I2C bus.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4213
Posted: 06:23am 05 Sep 2023
Copy link to clipboard 
Print this post

  andreas said  Hello,

I missed the TURTLE Graphics in ARMmite F4, so I wrote a tiny library:

> list "turtle-library.bas"
' turtle library
' (c) 2023 Andreas Mueller, Gerolsbach (AMI), version 1.3

Dim gx,gy,pen,farbe,heading As integer

Sub turtle_reset
 gx=0
 gy=0
 pen=0
 heading=0
 farbe=RGB(black) AND &hFFFFFFFFFFFEFEFE
End Sub

Sub turtle_pen_up
 pen=0
End Sub

Sub turtle_pen_down
 pen=1
End Sub

Sub turtle_move(x,y)
 If pen=1 Then
   Line gx,gy,x,y,,farbe
 EndIf
 gx = x
 gy = y
End Sub

Sub turtle_pen_colour(c)
 farbe = c AND &hFFFFFFFFFFFEFEFE
End Sub

Sub turtle_heading(h)
 heading = h
End Sub

Sub turtle_forward(f)
phi = Pi*(heading+270)/180
If pen=1 Then
  Line gx,gy,gx+f*Cos(phi),gy+f*Sin(phi),,farbe
EndIf
gx=gx+f*Cos(phi)
gy=gy+f*Sin(phi)
End Sub


Here is a test program:

> list
' test turtle

CLS
t = Timer
turtle_reset
turtle_pen_colour(RGB(yellow))
turtle_move(100,100)
turtle_pen_down
turtle_heading(90)
turtle_forward(100)
turtle_heading(180)
turtle_forward(100)
turtle_pen_colour(RGB(cyan))
turtle_heading(270)
turtle_forward(100)
turtle_heading(0)
turtle_forward(100)

Text 110,110,Str$(Timer-t)+" ms"


It needs 2.72 ms to draw a two-colored square.



-andreas


That is not bad at all !! 2.7ms for 13 function calls that also include some graphics. Thanks Andreas !
PicomiteVGA PETSCII ROBOTS
 
TrevorH
Senior Member

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

Hi, Gerry thanks for coming back to me, I will do the same and test but watching the voltages it all "looks" OK, so could it be noise, will report back after having a play.

Trevor
 
     Page 4 of 7    
Print this page
© JAQ Software 2024