23-Show (MMBasic auf dem STM32F746)


Hier entsteht wieder ein etwas größeres Projekt.
Und zwar der Port vom MMBasic von Geoff Graham auf das
STM32F746-Discovery Board.

Hier der Link zur Quelle von MMBasic : MMBasic
und hier der Link zu seiner Color-Maximite-Seite : Maximite
(dort gibt es auch eine super Doku zu allem)

Die Alpha kann im Moment per USB-Keyboard
oder VCP bedient werden, Files von uSD oder USB
laden/speichern und der Editor kann benutzt werden.
(siehe Screenshots)

Der Befehlsumfang vom MMBasic ist sehr groß
(siehe Language-Manual von Geoff)
Ich portiere nach und nach die einzelnen Funktionen.
Bei allen Befehlen die noch nicht funktionieren,
wird eine Fehlermeldung auf dem Display angezeigt.
Also einfach ausprobieren was schon alles geht
oder in meinem PDF nachlesen (siehe Doku)
Da findet ihr eine Kurzbeschreibung.

Hier ein Link zu einem englischen Forums Thread : FORUM

Ich stelle während der Alpha und Beta-Phase
hier das BIN-File für das STM32F746-Disco Board rein.
Das muss per ST-Link Utility geflasht oder
per Drag&Drop mit einem Filebrowser auf das Board
kopiert werden.

Mit dem Sprite-Editor und Map-Konverter können
am PC Sprites und Maps erstellt werden.

Hinweis: Wenn jemand die Sourcen von diesem Projekt benötigt, dann muss er diese bei Geoffrey R Graham anfordern: http://mmbasic.com/source.html

Downloads :

Version : 1.07 / 20.02.2016

MMBASIC-STM32F746 V1.07 / 20.02.2016
MMBASIC-STM32F746 V1.07 / 20.02.2016

Hier das STM32F746 Bin-File und Doku zur MMBasic Version 1.07.

MMBasic_F746_V107.PDF
MMBasic_F746_V107.PDF

Doku zu MMBasic

Sprite Editor von Fabrice

Sprite_Editor_v22b
Sprite_Editor_v22b

Sprite Editor, Version 2.2b

Fix Google Chrome Failed Download Error

Map Konverter von Fabrice

map_converter_v2
map_converter_v2

Map Konverter, Version 2

Fix Google Chrome Failed Download Error

Polygon Editor von Fabrice

polyedit_v2.0
polyedit_v2.0

Polygon Editor, Version 2.0

Fix Google Chrome Failed Download Error

3DS ASC converter von Fabrice

algo3d_v1.0
algo3d_v1.0

3DS ASC converter, Version 1.0

Fix Google Chrome Failed Download Error

Funktionen :
-Basic Grundfunktionen
-Graphic, Sprite, Polygon, 3D-Funktionen (DANKE an Fabrice !!)
-File-Funktionen
-FullScreen-Editor
-GPIO-Funktionen
-Multi-Touch-Funktionen
-Touch-Objekte
-Sound-Funktionen
-UART (COM1+COM2)
-SPI (SPI1+SPI2)
-I2c (I2C1)

Ein/Ausgabe über VCP (CN14) mit 115200bd (8N1)
Ausgabe auf dem Display vom Disco-Board
Eingabe per USB-Keyboard an CN13 (3 Keyboard Layouts)
Laufwerke (b:=uSD an CN3 und c:=USB-Drive an CN12)
Laden/speichern/löschen von Files
Erzeugen/löschen von Unterverzeichnissen
Anzeigen/ändern vom Direktory
FullScreen Editor-Mode
6 verschiedene Fonts
Sprites laden/anzeigen (color=ARGB1555)
Maps laden/anzeigen (color=ARGB1555)
JPG+BMP laden/anzeigen
Polygone laden/erstellen/anzeigen
3D-Objekte laden/anzeigen
23 GPIO-Pins (Digital-IO, Analog-IN)
MultiTouch (bis zu 5 Positionen)
WAVE-Files laden/abspielen (bis zu 4 gleichzeitig)
Zwei einstellbare UARTs (4800,9600,19200,38400,57600,115200)
Zwei einstellbare SPIs im Master-Mode (195 kHz bis 50MHz)
Eine einstellbare I2C im Master-Mode (10 kHz bis 400 kHz)
Settings im externen Flash speicherbar
Basic-Funktionen für : PCF8563, PCF8583, MPU6050, Joystick

Tastenbelegung :

ALT+F11 = umschalten vom Keyboard-Layout (QWERTZ, QWERTY, AZERTY)
ALT+F12 = Screenshot per VCP senden (Übertragung dauert ca. 30sek)

GPIO-Pins STM32F746-Disco:

01 = CN4/1  Arduino D0 (DIN,DOUT, COM1_RX)
02 = CN4/2  Arduino D1 (DIN,DOUT, COM1_TX)
03 = CN4/3  Arduino D2 (DIN,DOUT)
04 = CN4/4  Arduino D3 (DIN,DOUT)
05 = CN4/5  Arduino D4 (DIN,DOUT)
06 = CN4/6  Arduino D5 (DIN,DOUT)
07 = CN4/7  Arduino D6 (DIN,DOUT)
08 = CN4/8  Arduino D7 (DIN,DOUT)
09 = CN7/1  Arduino D8 (DIN,DOUT)
10 = CN7/2  Arduino D9 (DIN,DOUT)
11 = CN7/3  Arduino D10 (DIN,DOUT, SPI1_SS)
12 = CN7/4  Arduino D11 (DIN,DOUT, SPI1_MOSI)
13 = CN7/5  Arduino D12 (DIN,DOUT, SPI1_MISO)
14 = CN7/6  Arduino D13 User-LED (DIN,DOUT, SPI1_SCK)
15 = CN7/9  Arduino D14 (DIN,DOUT, I2C_SDA)
16 = CN7/10  Arduino D15 (DIN,DOUT, I2C_SCL)
17 = CN5/1  Arduino A0 (DIN,DOUT,AIN)
18 = CN5/2  Arduino A1 (DIN,DOUT,AIN)
19 = CN5/3  Arduino A2 (DIN,DOUT,AIN, COM2_CTS, SPI2_MOSI)
20 = CN5/4  Arduino A3 (DIN,DOUT,AIN, COM2_RTS, SPI2_MISO)
21 = CN5/5  Arduino A4 (DIN,DOUT,AIN, COM2_TX, SPI2_SCK)
22 = CN5/6  Arduino A5 (DIN,DOUT,AIN, COM2_RX, SPI2_SS)
23 = User-Button       (DIN)

Basic-Test-Programme :

primes : berechnet die ersten 1000 Primzahlen und stoppt die Zeit dafür
gfxtst : demo der Grafik-Funktionen
QUAD : demo der zwei Grafik-Layer mit einem sich drehenden Rechteck
maptest : demo der Sprite+Map Funktionen
mtouch : demo vom Multitouch
obj3d : demo der 3D-Objekte
polygon3 : demo der Polygon Funktion
POLYGON6 : moving Polygon
blitter2 : demo der Blitter Funktion
gyro3 : demo vom MPU6050 am I2C-Bus
BUTTON1 : demo der Touch-Objekte
jpg2 : demo der JPG load funktion

Screenshot :

Demo-Videos bei YouTube:

Touch-Objekte video : LINK

RTC video : LINK

Polygon video : LINK

MPU6050 video : LINK

3d-objects video : LINK

Multitouch video : LINK

Sprite Demo:


37 Antworten auf F746_Show_MMBasic

  1. Fabrice sagt:

    Aktuell müssen wir Linien Nummer eingeben , erste wird dann Programm von USB Stick laden :) … so konnten wir alles in strukturierte Basic machen ;)
    Gut gemach wie immer !

    Gruß.

    Fabrice.

  2. Fabrice sagt:

    Für die erste 1000 primes , Optimierung von Compiler auf -o3 gibt nur noch 6996mS ;)

    Gruß.

    Fabrice.

    • admin_ub sagt:

      ok,
      ich arbeite mit der “Debug” Version…die ist sowieso nochmal langsamer
      als die “Release”

  3. phantomnet sagt:

    My config:
    CN14>PuTTy
    CN12>Flash drive 8GB
    CN13>USB keyboard
    CN3>uSD 8GB

    Issues:
    1. command CLS do not clearing screen on Putty
    2. keyboard is QWERTZ (for someone why using QWERTY it’s difficult)
    3. BackSpace not working on Putty

    by the way, good job

    • admin_ub sagt:

      thanks for the bug report. please download version A.24
      1. clear screen on cls should work now.
      2. Change Keyboard Layout with “ALT+F11″ to QWERTY
      3. Switch the putty keyboard setting for the backspace key
      from “Control-?” to “Control-H”

      • phantomnet sagt:

        Another issue to ver.A24.
        After finish any basic program which using colors and then start full screen editor, some lines on lcd are left in background color.
        Above and under “ESC:exit F1:save ……”.
        Regards
        PS. Please could you publish update to Your libraries with some demo, how you using two filesystems with subdirectories.

        • admin_ub sagt:

          yep no problem. give me a few days.

        • admin_ub sagt:

          please download demo #08 “F746_Demo_UsbMscHost” from here : http://mikrocontroller.bplaced.net/wordpress/?page_id=5329
          i have added two demo functions to “add” and “delete” a subdirectory. and read chans docu to fatfs.

  4. phantomnet sagt:

    You said “..hier das BIN-File für das STM32F746-Disco Board rein.
    (das muss per ST-Link Utility geflasht werden)”
    There is another way to flash new BIN file to memory without ST-Link Utility.
    In Windows after install board drivers, you have a small HD (1MB) with two files: Mbed.htm and Details.txt. If you “copy” Bin file and “paste” it to that drive it will be saved to program flash. Easy and painless

    • admin_ub sagt:

      yes, you are right. i add this way. can you verify the qwerty layout ?
      i dont have a us-keyboard so its a “shot in the dark”.

      • phantomnet sagt:

        QWERTY layout is ok.

        • admin_ub sagt:

          thanks

  5. Fabrice sagt:

    Hallo ,
    in Grafik Funktionen List kannst die addieren …
    SetLayer , Showlayer , CopyLayer , Quad
    und Gleich Sprite und Maps und wenn noch platz in der stm32f7 Flash platz ist mache in eine Konvertierung von alle meine 3D graphisch Funktion auch :)

    Gruß.

    Fabrice.

    • admin_ub sagt:

      du bist zu schnell für mich :-) man müsste ein komplette Doku über die neuen
      Befehle schreiben, ist halt noch mehr Arbeit.

  6. phantomnet sagt:

    Are commands for serial, SPI and I2C comunication of MMBasic working ??

    • admin_ub sagt:

      not yet…at the moment you can only use “print” to send a message to vcp.
      but its on my list :-)

  7. phantomnet sagt:

    update to last issue: “After finish any basic program which using colors and then start full screen editor, some lines on lcd are left in background color.
    Above and under “ESC:exit F1:save ……”.
    and no mater did you will use “cls black” or not it is still visible on edit command and changing background color after that command.

    • admin_ub sagt:

      thanks, bugfix in A.26
      new command : “color fg,bg”

  8. phantomnet sagt:

    any way to break runing program?
    “10 goto 10″
    at now only board reset working

    • admin_ub sagt:

      its a bug in alpha version. you must readout keyboard periodically :
      “10 k=keydown”
      “20 goto 10″
      then “CTRL+c” works

      • phantomnet sagt:

        mayby something like in ZX Spectrum :

        BREAK(CRTL+c or/and ESC) to break program and CONTINUE command to continue run??? :)

        • admin_ub sagt:

          command “option break 27″ configs the “esc” key as break button. and “continue” is a command but throws an error at the moment.

  9. phantomnet sagt:

    In full screen editor cursor just “OR” some fonts.
    Change the font spacing to have a room for the cursor.
    It will decrease screeen capacity, but it will look much better.
    It’s just a visual effect.

    • phantomnet sagt:

      it happens at column “zero” of the screen only

    • admin_ub sagt:

      its a feature of MMBasic and a minor problem at the moment.

  10. phantomnet sagt:

    When You planning to :
    1. Implement SPI, I2C, Serial comunication functions?( for pins available on Arduino connectors)
    2. Implement “setpin” interrupt (INTH, INTL, INTB)
    3. Implement LIBRARY LOAD file$ and LIBRARY UNLOAD $file
    4. Use SDRAM (except “lcd buffer” of course) for basic programs and libraries (aprox 7.75 MBytes free for use)
    5. Use some file name like “autorun.bas” for files to automatically run after system start.

    New features :
    1. precompiled library files for faster run (it will be a lot of work to do)
    2. Fully implement “CTRL-C” to break running program without “keydown” reading

    It will be very useful for me and other users who planning to use MMBasic
    to control additional hardware.
    I have change my plans and i will use MMBasic for my project.

    • admin_ub sagt:

      CTRL+c should work in actual Version A.33
      I have just made an account at “http://www.thebackshed.com/”
      and waiting for confirmation.
      Its easier to post news and receive bugreports in a forum.
      GPIO and communication is a big topic but it will work
      sooner or later :-)
      Fabrice is using a big amount of RAM for Graphic and Sprites
      (ARGB1555 background picture with 800×600 Pixel needs 1Mbyte :-)
      but JPG is also working and needs much less ram.
      Perhaps we can make a “priority list” in the forum to
      see whats comming next.

  11. Fabrice sagt:

    @Phantomnet : you said :
    4. Use SDRAM (except “lcd buffer” of course) for basic programs and libraries (aprox 7.75 MBytes free for use)
    Do not forget that sdram run at 100Mhz …. it’s the halve than the cpu SRAM :)
    Actually , Sprite , map , video buffer use SDRAM. Music modules , 3D Graphics and
    other stuff will use SDRAM too for keep free the SRAM.
    And , allot of Fast SRAM will be available due to that … he he .
    Actually it is so :
    Still available in SDRAM : 8.388.608 – 5.809.364 = 2.579.244 bytes
    This is after we allocated 3 video buffer , 500 Sprites , 1.000.000 pixels for Map , 1.000.000 bytes for Music module , and 1.000.000 bytes for 3D Graphics.
    If it is really needed , I’m sure we found a way to use some of the more than 2Mb rest for MMBasic variable and/or Library.

    Cheers.

    • admin_ub sagt:

      alpha version is to include all the major functions.
      in beta we can made improvements.
      P.S. COM1+COM2 are working with fixed settings
      and coming soon.

    • phantomnet sagt:

      1.”Memory” command showing now more clearly available memory amount.
      2. COMs ports are workin good.

      2.46Mbytes its a lot of memory and i think it will be much better then 122Kbytes
      for libraries.

      Please let us know when forum be ready.
      I promise that i’ll be very active user :)

      Vielen Dank dafür.

  12. phantomnet sagt:

    if i’ll write :
    10 color red,black
    20 cls 0
    30 color blue,white
    40 print “anything”

    it should to be printed on lcd as fore color: blue and background color: white
    but is not?! :(
    lines 10 and 20 doing their job but line 30 isnt

    • admin_ub sagt:

      should be fixed in Version A36
      the command “color” in a running basic program
      change the color until the end of the program.
      if you want to change the color of the editor
      and input promt use the “color” command at the promt.

  13. Edmonton sagt:

    It’s very cool project, programming could be simplified. If there are many DSP functions in C, and they have to be used in a project. Is it possible to be built in MMbasic?

    • admin_ub sagt:

      if you work with the source code you can add every c-function you want
      and call it from the basic program. but at the moment (in alpha state) we only generates binary files. Here you must use what we added :-)

  14. sgyuri sagt:

    Lieber Fabrice!

    Herzlichen Glückwunsch und vielen Dank für die gute Arbeit.
    Will der Veröffentlichung der Quelle, denn ich will an die Ethernet IoT Projekte drehen, um zu tun.
    Autorun.bas Konto ist das Betriebssystem ?

    Grüße, George

  15. Fabrice sagt:

    @sgyuri :

    Ich habe Graphik Sache programmiert.
    Uwe ist der Spezialist für die ändere komische Dings :)

    Gruß.


Wie hat Dir dieser Artikel gefallen?

1 Stern2 Sterne3 Sterne4 Sterne5 Sterne (Noch keine Bewertungen)
Loading...

18 Antworten zu 23-Show (MMBasic auf dem STM32F746)

  1. Giporu sagt:

    And where did the version 1.07 go?

  2. Walter Hynson sagt:

    Hello,so far so good st746 with mmbasic is perfect….now is it posible to use a otg thermal in place of the usb memory stick and get it to print ?

  3. Walter Hynson sagt:

    Hello,Well I know this project is a little old,but I got my 746 about a month ago and have version 1.7 of MMbasic running,now I want to connect a serial RS232 printer to the com port,I have RS3232 module which converts rs232 to 3.3vdc ttl,now has anyone done anything like this and will it work,yes I know there are 2 other signals (clear to send and device ready)which can be handled using level translators,then it should work using rx/tx lines…What are your thoughts?

    • admin_mb sagt:

      Hi Walter,
      I’ve never tried out, but have you checked the MMBasic Manual?

      Chapter 5 gives you the GPIO-Ports:
      Pin-Nr/Name, CPU, Pinhead, Function
      1 / D0, PC7, CN4/1, COM1_RX
      2 / D1, PC6, CN4/2, COM1_TX
      19 / A2, PF9, CN5/3, COM2_CTS
      20 / A3, PF8, CN5/4, COM2_RTS
      21 / A4, PF7, CN5/5, COM2_TX
      22 / A5, PF6, CN5/6, COM2_RX

      So, you should try to use COM2.

      And these are the infos about the Serial Communications:

      Two serial ports are available for asynchronous serial communications. They are
      labelled COM1:, COM2:, etc and are opened in a manner similar to opening a file. After being opened they will
      have an associated file number (like an opened disk file) and you can use any commands that operate with a file
      number to read and write to/from the serial port. A serial port is also closed using the CLOSE command.
      The following is an example:
      OPEN „COM2:4800,1024,0,0,FC“ AS #5 ‘ open the second serial port with a speed of 4800 baud
      PRINT #5, “Hello” ‘ send the string “Hello” out of the serial port
      dat$ = INPUT$(20, #5) ‘ get up to 20 characters from the serial port
      CLOSE #5 ‘ close the serial port

      This are the infos about the OPEN command:
      OPEN „comspec“ as #nbr
      or
      OPEN „comspec“ as console
      comspec :
      COMn:bd,buf,int,intlevel,FC,DE,OC,S2
      e.g. : open „COM1:“ as 1

      Opens a seriell port „COM1“ or „COM2“
      bd = 115200, 57600, 38400, 19200, 9600, 4800
      fixed buf size
      interrupt not implemented yet
      FC only at COM2
      DE not implemented yet
      OC not implemented yet
      S2 = two stopbits

      good luck,
      Manfred

      • Walter Hynson sagt:

        Sorry for the slow response my wife got real sick and had emergency surgery so everything stopped,but all is good now so here I go . Thanks for the info, now I plan on hooking a 3g moden for cell, gps and sms while i am out fishing…Thanks

  4. hamamimed med sagt:

    good day I’m looking for how to use xmodem in the program mmbasic stm32F746 DISC
    help me please

    • admin_mb sagt:

      Hello,
      there is a XMODEM command available im MMBasic – it should work.

      XMODEM SEND file$
      or
      XMODEM RECEIVE file$

      Transfers a file to or from a remote computer using the XModem
      protocol. The transfer is done over the USB connection or, if a serial
      port is opened as console, over that serial port.
      ‘file$’ is the file (on the SD card or internal flash) to be sent or received.
      The XModem protocol requires a cooperating software program running
      on the remote computer and connected to its serial port.
      The transfer can take up to 15 seconds to start and if the XMODEM
      command fails to establish communications it will return to the
      MMBasic prompt after 60 seconds.

      • hamamimed med sagt:

        thank you for your
        Reply but the result is like this> XMODEM RECEIVE „18B20.BAS“
        Error: Unknown command

        • admin_mb sagt:

          oh dear, that means the command unfortunately has not been implemented.
          Unfortunately I do not have the source codes of this project and I have to ask my brother if he has saved them somewhere.
          Without the source code, unfortunately, the new features can not be implemented.
          Ciao, Manfred

  5. GpsI sagt:

    Hi!! could this work on STM32F769-Discovery?

  6. Kabron sagt:

    Binaries in F746_MMBasic_v107.zip and in F746_MMBasic_va65.zip are the same.
    Where is the truth?

  7. Dirk Poloczek sagt:

    Hello Manfred
    Is ther any specific MCU type of the STMF746 series, that I can use the mcu without the Discovery Board from ST, so I can make my own board.
    Other question, is there a new MANUAL and a new version of the MMBASIC from your side?

    Best regards
    Dirk

    • admin_mb sagt:

      Hello Dirk,
      STMicroelectronics has a overview of the STM32F7 Series on their homepage. And there is the faster STM32H7 Series, too.

      I found this on eBay and thought you might like it! Check it out now! STM32H750VBT6 Development Board ARM STM32H7 Programmable Controller Module https://ebay.us/JVRZfu

      No I have no new manuals or new software version of MMBasic.

      Ciao,
      Manfred

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert