Home
JAQForum Ver 19.8.18
Log In or Join  
Active Topics
Local Time 12:39 22 Aug 2019 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 : Armmite - STM32H7: Developments

     Page 1 of 11    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 12:20pm 09 Jun 2018
Copy link to clipboard 

Thought I would create a new thread for the Armmite H7 as I've had a few minutes to work on it. I'll post updates to this thread as they occur and please use it for comments/bug reports etc.

This release supports the normal range of MM+/MMX file handling functions (I hope!!!)







2018-06-09_221110_STM32H743ZI_Nucleo.zip

Pinout is fixed:

SD-CS = PF6
SD-CLK = PF7
SD-MISO = PF8
SD-MOSI = PF9

These pins are not available for any other use and there is therefore no associated "OPTION" command needed.

The software automatically detects insertion and removal of a card and will deal with this appropriately. There in no requirement to connect anything to the card-detect output from the sdcard slot

Performance has also been increased significantly

  Quote  > load "benchmark"
> RUN
Micromite Benchmark tests

Benchmark 1
0.003

Benchmark 2
0.023

Benchmark 3
0.038

Benchmark 4
0.042

Benchmark 5
0.067

Benchmark 6
0.098

Benchmark 7
0.146

Benchmark 8
0.065
>
> save "grainbench"
> run
MMBASIC benchmark (C) KnivD 2016
Calculating...
Performance: 8804 grains


Edited by matherp 2018-06-10
 
goc30

Senior Member

Joined: 12/04/2017
Location: France
Posts: 230
Posted: 04:35pm 09 Jun 2018
Copy link to clipboard 

Hi
What "user manual" i can use for instructions/functions aviable ?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 04:46pm 09 Jun 2018
Copy link to clipboard 

  Quote  What "user manual" i can use for instructions/functions aviable ?


There isn't one - this is in early stages of development.

The Basic language should be as per the Micromite language. Digital I/O should be working as per the previous thread and now SDcard I/O is working as per the MM+ manualEdited by matherp 2018-06-11
 
goc30

Senior Member

Joined: 12/04/2017
Location: France
Posts: 230
Posted: 05:42pm 09 Jun 2018
Copy link to clipboard 

Thank Peter
In fact, i would like to know if it is possible to connect screen (ILI ou ssd) and if a can use "Cfunction"
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 06:05pm 09 Jun 2018
Copy link to clipboard 

  Quote  In fact, i would like to know if it is possible to connect screen (ILI ou ssd)


Not yet - probably next on the to-do list

  Quote  and if a can use "Cfunction"


The ARM processor is much better for CFunctions than the PIC as the compiler produces better position independent code. The very first version of the Armmite had Cfunctions but the work to make them work on the ARM was done by Peter Carnegie who no longer posts so I would have to re-invent quite a lot of stuff. It is not something for the near future. Of course the need for Cfunctions is less on the H7 as it is so fast anyway
 
goc30

Senior Member

Joined: 12/04/2017
Location: France
Posts: 230
Posted: 06:22pm 09 Jun 2018
Copy link to clipboard 

Ok, thank
i use time before an armmite with LCd to learn this card
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3055
Posted: 08:01am 10 Jun 2018
Copy link to clipboard 

The MMEdit File Manager is happy with it.


Copy to and from the armmite works well but I have found a bug in MMEdit that cause a lockup (in MMEdit) when you try to copy the edit window contents to a file on the armmite.

Jim


It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3055
Posted: 05:41am 11 Jun 2018
Copy link to clipboard 

Today's progress. I have started mapping the CPU pin numbers (which MMBasic) uses to the descriptions that the connector diagrams use.
Starting with the blue push button and the red and blue LEDs.
  Quote   'nucleo tests
SETPIN 7, DIN ' pushbutton 1 (Blue)
SETPIN 137, DOUT ' blue LED
SETPIN 75, DOUT ' red LED
DO
x =
PIN(7)
PIN(137) = x
PIN(75) = 1 - x
'PRINT x
PAUSE 100
LOOP


Not very exciting stuff but it does confirm that my reading of the schematics is correct.

I have also learnt to wait while doing a NEW or saving programs. If you don't wait the 5 seconds it takes for the prompt to appear, you will be reaching for the reset button!

Jim

It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3055
Posted: 06:48am 12 Jun 2018
Copy link to clipboard 

Inbuilt editor seems to be happy.

I have created a spreadsheet with the pin mappings. MMBasic uses the CPU pin numbers.
The spreadsheet data is taken from the datasheet for the processor and the module.
There appears to be a lot of 5V tolerant pins which is nice to see.
2018-06-12_164535_NUCLEO-H743ZI-pinout.zip

Jim
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 03:40pm 13 Jun 2018
Copy link to clipboard 

All change I'm afraid V5.04.08

2018-06-14_013523_Armmite.zip

The performance of the SD card was not good enough using the SPI inteface so I have converted the code to use the full 4-bit parallel SD card interface. I've also implemented full audio output using the on-chip DAC.

This is a major rework of the codebase as I have converted from a hack of a demo program to a full start-from-scratch CubeMX project (in other words bugs are possible/likely).




The revised pinout is as follows:

PF6, PF7, PF8, PF9: are now available for general use.

PC8: SD-D0 (pin-98)
PC9: SD-D1 (pin-99)
PC10: SD-D2 (pin-111)
PC11: SD-D3 (pin-112)
PC12: SD-CLK (pin-113)
PD2: SD-CMD (pin-116)
PG2: SD-CardDetect (pin-87)
The SD pins are dedicated and may not be used for anything else.

These pins are all available on CN8 (labelled SDMMC) in the order above from the top right of the connector down.

The Dac pins are:

PA4: DAC1 (pin-40)
PA5: DAC2 (pin-41)
The DAC pins are dedicated and may not be used for anything else.

These are available on CN7 (D13 and left of D8)

Audio commands supported are as per the MMX

PLAY TONE f1, f2 [,duration]
PLAY WAV "filename" [,interrupt]
PLAY FLAC "filename" [,interrupt]
TTS string$

In addition the DACs can be used directly from Basic when not otherwise in use.

DAC n, voltage 'n=1 or 2, voltage = 0-3.3

Dim s(359),c(359)
For i=0 To 359
s(i)=(Sin(Rad(i))+1)*1.65
c(i)=(Cos(Rad(i))+1)*1.65
Next i
Do
For i=0 To 359
DAC 1,s(i)
DAC 2,c(i)
Next i
Loop
Edited by matherp 2018-06-15
 
goc30

Senior Member

Joined: 12/04/2017
Location: France
Posts: 230
Posted: 05:20pm 13 Jun 2018
Copy link to clipboard 

  TassyJim said   Inbuilt editor seems to be happy.


2018-06-12_164535_NUCLEO-H743ZI-pinout.zip

Jim


Hi
thank for job
just a small point: signal (arduino) "D2" seem to be lost. In package's doc, pin "d2" is the PF15 pin (n° 55)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 09:22pm 13 Jun 2018
Copy link to clipboard 

  Quote  just a small point: signal (arduino) "D2" seem to be lost. In package's doc, pin "d2" is the PF15 pin (n° 55)


[code]Setpin 55,dout
pin(55)=1
pin(55)=0[/code]

works perfectly for me
 
goc30

Senior Member

Joined: 12/04/2017
Location: France
Posts: 230
Posted: 09:32pm 13 Jun 2018
Copy link to clipboard 

  matherp said  
works perfectly for me


sorry, I misspoke, it is not a functional problem but only in the document excel, where signal "d2" is not registered
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3055
Posted: 11:34pm 13 Jun 2018
Copy link to clipboard 

  goc30 said  
just a small point: signal (arduino) "D2" seem to be lost. In package's doc, pin "d2" is the PF15 pin (n° 55)

Thanks for that, there might/will be a few more errors.

Peter,
I have ordered a suitable SD card module but it will take a few weeks to arrive. It won't stop me playing with the other features.

You might be in the height of summer but I am about to take delivery of a little bit of sunshine here.

Electronics might get put on the back burner for a while.

Jim
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3055
Posted: 05:48am 14 Jun 2018
Copy link to clipboard 

TONE works from the command line but I am having problems when it is in a program.

There should be a tone when the blue button is pressed.
  Quote   'nucleo tests
SETPIN 7, DIN ' pushbutton 1 (Blue)
SETPIN 137, DOUT ' blue LED
SETPIN 75, DOUT ' red LED
SETPIN 46, DOUT ' green LED
DO
IF PIN(7) = 1 THEN

x =
1 - x
PIN(137) = x
PIN(75) = 1 - x
PULSE 46, 50
PRINT "tone"
PLAY TONE 1000,2000,200
PRINT "Tone OFF"
PAUSE 200
ENDIF
'PRINT x
PAUSE 100
LOOP


The program locks up and I have to RESET to recover.

Jim

It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 09:10am 14 Jun 2018
Copy link to clipboard 

Jim

Many thanks for all your testing. I'll try and diagnose the problem with TONE in programs. Should be able to post SSD1963 support soon.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 12:12pm 14 Jun 2018
Copy link to clipboard 

Version 5.04.09

2018-06-15_062752_Armmite.zip



I have tested this version with Jim's program above and it works fine for me but I haven't made any specific changes in that area. It is worth doing a complete chip erase when loading new versions.

This version now supports SSD1963 displays

Valid displays are:
8-bit RGB888: SSD1963_4, SSD1963_5, SSD1963_5A, SSD1963_7, SSD1963_7A, SSD1963_8
16-bit RGB565: SSD1963_4_16, SSD1963_5_16, SSD1963_5A_16, SSD1963_7_16, SSD1963_7A_16, SSD1963_8_16

The command to initialise the display is

OPTION LCDPANEL SSD1963xxx, orientation


No other parameters are required.

You should set the display to use 1963_PWM for the backlight and then the "BACKLIGHT" command will work

Connections are:
DB0-DB15 on the display connect to PE0 to PE15 on the Nucleo (only DB0-DB7 to PE0-PE7 are needed for 8-bit modes)

SSD-WR to PG10
SSD-RS to PG11
SSD-RESET to PG12
SSD-RD to PG13 (Note this is mandatory)

Remember to connect SSD-CS to GND

NB: the firmware captures all 16 PORT-E pins irrespective of whether 8 or 16-bit communication is used. This simplifies and speeds up the code. Trying to use any of the PORT-E pins when the TFT is enabled will give the error:

  Quote  Error: Pin n is reserved on startup


The picture above is of a 5" display. Note I am having to use an external power supply for the display as the Nucleo was showing an over current warning (LD5) when powering the 5" display direct.

Performance is good. Displaying the 800x480 image takes less than 1 second. CLS in 16-bit mode takes 53mSec.

All displays support transparent text and BLIT. GUI commands appear to work but aren't tested, however as touch is not yet implemented they are of little use. "SAVE IMAGE filename$" works as expected and saves the screen contents as a .BMP file

UPDATE:

Console mode is now also supported.



Also SETPIN CIN, PER, and FIN should work

Pins are PF0, PF1, PF2, PF3 (10, 11, 12, 13)

and IR may work but completely untested

IR pin is PF4 (pin 14)




Edited by matherp 2018-06-16
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 3055
Posted: 09:59pm 14 Jun 2018
Copy link to clipboard 

TONE works for me now with the latest update.
I did take your advice and do a full erase before updating.

I like the speed of updating - much faster than the PIC chips.

Jim
It all started with the ZX81....
VK7JH
http://www.c-com.com.au/MMedit.htm
 
goc30

Senior Member

Joined: 12/04/2017
Location: France
Posts: 230
Posted: 12:52am 15 Jun 2018
Copy link to clipboard 

  matherp said   Version 5.04.09



Very very good job, thanks

just somes questions:

1 - with this version, mmbasic say that is "v5.04.10"

2 - I have a 5" LCD, but with sd card. I have seen that you disable spi5-sdcard and use 4bits-sd. Can i use spi1 (arduino D10/D13) for my SdCard on lcd?

3 - maybe it's too early, I need to use COM1 and COM2. on what pin this signals will be connected?, and is it possible to have interrupt functions (the best is to have rec and emit interruptions calls (not only rec as in pic-mmbasic)

Edited by goc30 2018-06-16
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 2880
Posted: 07:33am 15 Jun 2018
Copy link to clipboard 

  Quote  1 - with this version, mmbasic say that is "v5.04.10"


Yes I updated it when I included the console functionality

  Quote  2 - I have a 5" LCD, but with sd card. I have seen that you disable spi5-sdcard and use 4bits-sd. Can i use spi1 (arduino D10/D13) for my SdCard on lcd?


No - sorry. Testing showed the SPI driver was too slow to be usable for things like picture load and sound

  Quote  3 - maybe it's too early, I need to use COM1 and COM2. on what pin this signals will be connected?, and is it possible to have interrupt functions (the best is to have rec and emit interruptions calls (not only rec as in pic-mmbasic)


Can't be certain on pins yet but com ports should be fairly soon. pic-mmbasic does use interrupts for both TX and RX for coms except com2 on MM2 which is bitbanged. Armmite will use interrupts for all coms. Console already uses interrupts for TX and RX.

I am looking at a PCB design that will interface the Nucleo to a SSD1963 screen and has a SD card on it. Suggestions for other facilities welcome.
 
     Page 1 of 11    
© JAQ Software 2019